Support namespaces / modules in bif. Checkpoint.

(now actually commiting all the files)

This change is actually two-fold:
a) bif's now accept module XYZ; statements and module::ID for
   function, const, event, enum, etc. declartation
b) Added C++-namespaces to variables, functions, etc. that are declared
   in bif but accessed from C++
   This required some (lightweight) re-factoring of the C++ codes.
   Note, event's don't have their own C++ namespace yet, since this
   would require a rather huge re-factoring.

Compiles and passes test suite.
New namespace feature not tested yet.
Documentation to follow.
This commit is contained in:
Gregor Maier 2011-02-11 09:37:23 -08:00
parent 86fdd1dcf3
commit f79ea244fa
31 changed files with 332 additions and 228 deletions

View file

@ -496,6 +496,18 @@ void builtin_run_time(const char* msg, BroObj* arg)
run_time(msg, arg);
}
#include "bro.bif.func_h"
#include "common-rw.bif.func_h"
#include "finger-rw.bif.func_h"
#include "ftp-rw.bif.func_h"
#include "http-rw.bif.func_h"
#include "ident-rw.bif.func_h"
#include "smtp-rw.bif.func_h"
#include "strings.bif.func_h"
#include "dns-rw.bif.func_h"
#include "bro.bif.func_def"
#include "strings.bif.func_def"
@ -523,7 +535,7 @@ void init_builtin_funcs()
bool check_built_in_call(BuiltinFunc* f, CallExpr* call)
{
if ( f->TheFunc() != bro_fmt )
if ( f->TheFunc() != BifFunc::bro_fmt )
return true;
const expr_list& args = call->Args()->Exprs();