Fix for redefining built-in constants.

Turns out redefs weren't visibile to core-land due to initialization
order.
This commit is contained in:
Robin Sommer 2014-07-31 14:18:49 -07:00
parent 597edcd3b6
commit 2e3b217667
5 changed files with 17 additions and 3 deletions

View file

@ -1,4 +1,13 @@
2.3-86 | 2014-07-31 14:19:58 -0700
* Fix for redefining built-in constants. (Robin Sommer)
* Adding missing check that a plugin's API version matches what Bro
defines. (Robin Sommer)
* Adding NEWS entry for plugins. (Robin Sommer)
2.3-83 | 2014-07-30 16:26:11 -0500
* Minor adjustments to plugin code/docs. (Jon Siwek)

View file

@ -1 +1 @@
2.3-83
2.3-86

View file

@ -634,11 +634,14 @@ void init_builtin_funcs()
#include "reporter.bif.func_init"
#include "strings.bif.func_init"
#include "__all__.bif.init.cc" // Autogenerated for compiling in the bif_target() code.
did_builtin_init = true;
}
void init_builtin_funcs_subdirs()
{
#include "__all__.bif.init.cc" // Autogenerated for compiling in the bif_target() code.
}
bool check_built_in_call(BuiltinFunc* f, CallExpr* call)
{
if ( f->TheFunc() != BifFunc::bro_fmt )

View file

@ -134,6 +134,7 @@ protected:
extern void builtin_error(const char* msg, BroObj* arg = 0);
extern void init_builtin_funcs();
extern void init_builtin_funcs_subdirs();
extern bool check_built_in_call(BuiltinFunc* f, CallExpr* call);

View file

@ -927,6 +927,7 @@ int main(int argc, char** argv)
init_general_global_var();
init_net_var();
init_builtin_funcs_subdirs();
plugin_mgr->InitBifs();