mirror of
https://github.com/zeek/zeek.git
synced 2025-10-11 11:08:20 +00:00
Allow default function/hook/event parameters. Addresses #972.
And changed the endianness parameter of bytestring_to_count() BIF to default to false (big endian), mostly just to prove that the BIF parser doesn't choke on default parameters.
This commit is contained in:
parent
69c7363147
commit
e2a1d4a233
14 changed files with 239 additions and 28 deletions
|
@ -25,7 +25,10 @@ extern const char* builtin_func_arg_type_bro_name[];
|
|||
class BuiltinFuncArg {
|
||||
public:
|
||||
BuiltinFuncArg(const char* arg_name, int arg_type);
|
||||
BuiltinFuncArg(const char* arg_name, const char* arg_type_str);
|
||||
BuiltinFuncArg(const char* arg_name, const char* arg_type_str,
|
||||
const char* arg_attr_str = "");
|
||||
|
||||
void SetAttrStr(const char* arg_attr_str) { attr_str = arg_attr_str; };
|
||||
|
||||
const char* Name() const { return name; }
|
||||
int Type() const { return type; }
|
||||
|
@ -39,6 +42,7 @@ protected:
|
|||
const char* name;
|
||||
int type;
|
||||
const char* type_str;
|
||||
const char* attr_str;
|
||||
};
|
||||
|
||||
#endif
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue