Jon Siwek
6ac499882c
Teach Zeekygen to produce source-code-range information
...
Related to https://github.com/zeek/zeek-docs/issues/56
2021-02-26 14:55:59 -08:00
Jon Siwek
8a8a983c49
Add missing zeek/ to header includes
...
Related to https://github.com/zeek/zeek/pull/1377
2021-01-29 19:16:29 -08:00
Tim Wojtulewicz
0618be792f
Remove all of the random single-file deprecations
...
These are the changes that don't require a ton of changes to other files outside
of the original removal.
2021-01-27 10:52:40 -07:00
Tim Wojtulewicz
a94fcad957
Add templated As() method to Val, use in various places we were using dynamic_cast
2021-01-14 11:58:59 -07:00
Vern Paxson
7f92a573d2
Remove BroValUnion by hoisting underlying Val subclass values into subclasses
2021-01-14 11:58:59 -07:00
Tim Wojtulewicz
96d9115360
GH-1079: Use full paths starting with zeek/ when including files
2020-11-12 12:15:26 -07:00
Jon Siwek
2a8de33c63
Merge remote-tracking branch 'origin/topic/jsiwek/gh-1122'
...
* origin/topic/jsiwek/gh-1122:
GH-165: Fix global initializations that indirectly use builtin types
Improve how primary/top-level BIFs get initialized
GH-1122: Allow initializing globals with calls to subdir BIFs
GH-1122: Improve error for global record initialization exceptions
2020-09-04 17:24:50 -07:00
Jon Siwek
5e6bb843ab
Merge remote-tracking branch 'origin/topic/timw/174-duplicate-attributes'
...
- Replaced "tag" with "attribute" in the error message since the former
is not exactly the same concept/meaning and also not user-facing
terminology
* origin/topic/timw/174-duplicate-attributes:
Allow duplicate attributes in full redefs
Short-circuit checking of whether attr exists
Expanded check for other tag types, fixed btest to cover more tags
GH-174: Add warning for duplicate attributes
2020-08-31 17:39:47 -07:00
Tim Wojtulewicz
9106f3f722
Allow duplicate attributes in full redefs
2020-08-28 09:55:40 -07:00
Jon Siwek
5ed13284c3
GH-165: Fix global initializations that indirectly use builtin types
2020-08-27 14:01:08 -07:00
Tim Wojtulewicz
fe0c22c789
Base: Clean up explicit uses of namespaces in places where they're not necessary.
...
This commit covers all of the common and base classes.
2020-08-24 12:07:00 -07:00
Tim Wojtulewicz
ddf48d7529
Move a few of the zeek::util methods and variables to zeek::util::detail
2020-08-20 16:11:44 -07:00
Tim Wojtulewicz
8d2d867a65
Move everything in util.h to zeek::util namespace.
...
This commit includes renaming a number of methods prefixed with bro_ to be prefixed with zeek_.
2020-08-20 16:00:33 -07:00
Jon Siwek
3fc86a39b8
Merge remote-tracking branch 'origin/topic/robin/gh-467-addto'
...
- In this merge commit: fixed parentheses/typo that breaks compilation
* origin/topic/robin/gh-467-addto:
Catch if &add_func/&delete_func is applied to IDs that don't have values.
2020-08-18 12:15:29 -07:00
Robin Sommer
45bef16be0
Catch if &add_func/&delete_func is applied to IDs that don't have values.
...
We do to allow adding &add_func to a global that's not immediately
initialized, as a later redef may fix that.
Closes #467 .
2020-08-18 10:34:05 +00:00
Tim Wojtulewicz
45b5a98420
Move EventMgr, EventHandler, and EventRegistry code to zeek namespace. Rename mgr to event_mgr.
2020-07-31 16:23:32 -04:00
Tim Wojtulewicz
bfab224d7c
Move Reporter to zeek namespace
2020-07-31 16:22:41 -04:00
Tim Wojtulewicz
4d96b7f1cc
Various deprecation fixes, reported by failed Spicy builds
...
- Add deprecated version of ID::SetType() that takes Type*
- Add deprecated versions of zeek::set_location in the global namespace
- Fix global namespace version of lookup_ID to return ID*
2020-07-15 15:24:19 -07:00
Jon Siwek
8597b998bb
Add deprecation expression to deprecated prototype/parameter messages
2020-07-10 10:57:57 -07:00
Tim Wojtulewicz
02cef05f93
Rename BroObj to Obj
2020-07-02 16:15:01 -07:00
Tim Wojtulewicz
a2bc42dd93
Move Func up to zeek namespace, rename BroFunc to ScriptFunc
2020-07-02 16:15:01 -07:00
Tim Wojtulewicz
d6f1ea16ac
Move Func and associated classes into zeek::detail namespace
2020-06-30 20:51:58 -07:00
Tim Wojtulewicz
937a462e70
Move Frame and Scope to zeek::detail namespace
2020-06-30 20:51:53 -07:00
Tim Wojtulewicz
64332ca22c
Move all Val classes to the zeek namespaces
2020-06-30 20:48:09 -07:00
Tim Wojtulewicz
ec9eff0bd5
Use type aliases for IntrusivePtr definitions
2020-06-30 20:37:30 -07:00
Tim Wojtulewicz
9364e6a5b7
Move IntrusivePtr and utility methods to the zeek namespace
2020-06-30 20:19:12 -07:00
Tim Wojtulewicz
7ee8e11a8f
Deprecate init_class and IDScope in another way.
...
This also renamed init_class to InitClass for consistency.
2020-06-30 13:06:34 -07:00
Tim Wojtulewicz
a280bfa0b1
Deprecate attr_tag in a different way, rename to AttrTag
2020-06-30 12:47:54 -07:00
Tim Wojtulewicz
149e3b3c32
Disable some deprecation diagnostics for GCC
...
Clang automatically disables deprecation warnings for types used within
already-deprecated contexts, such as if you use a deprecated type inside
of a method that's beeen marked as deprecated. GCC doesn't have this
feature so it spews a lot more warnings. These functions are now wrapped
in pragmas that disable the warnings for the usage.
2020-06-11 15:43:11 -07:00
Tim Wojtulewicz
137e416a03
Rename BroType to Type
2020-06-10 14:27:36 -07:00
Tim Wojtulewicz
ed13972924
Move Type types to zeek namespace
2020-06-09 17:20:45 -07:00
Tim Wojtulewicz
60ed29c3b6
Move Attr to the zeek::detail namespace
2020-06-03 15:16:19 -07:00
Tim Wojtulewicz
0d623d003c
Move ID to the zeek::detail namespace
2020-06-03 15:16:19 -07:00
Tim Wojtulewicz
cbdb8ee074
Expr: move all classes into zeek::detail
2020-06-03 15:16:18 -07:00
Jon Siwek
5fc78a548c
Deprecate ID::FindAttr(), replace with GetAttr()
2020-05-26 15:31:31 -07:00
Jon Siwek
bee321711f
Deprecate Attributes::FindAttr(), replace with Find()
2020-05-26 15:25:08 -07:00
Jon Siwek
6daa33364b
Deprecate Attributes::AddAttrs(Attributes*)
...
Replaced with version taking an IntrusivePtr parameter
2020-05-26 15:12:20 -07:00
Jon Siwek
ccd1cbbc54
Add Attributes ctor that takes IntrusivePtrs
2020-05-26 15:05:38 -07:00
Jon Siwek
97636e97a5
Deprecate Attr::AttrExpr(), replace with GetExpr()
2020-05-26 12:13:56 -07:00
Jon Siwek
28b4206519
Remove weak_ref param from ID::SetVal()
...
It was not used anywhere.
2020-05-23 09:29:27 -07:00
Jon Siwek
fbc7725278
Change EventHandler to store IntrusivePtr<Func>
...
Also deprecates the LocalHandler() and SetLocalHandler() methods,
replaced with GetFunc() and SetFunc().
2020-05-21 01:06:05 -07:00
Jon Siwek
3b6f60a810
Add Val::AsFuncPtr() convenience method
...
Since it's not trivial to store IntrusivePtr in BroValUnion and also
not satisfying to store IntrusivePtr*.
2020-05-21 00:50:48 -07:00
Jon Siwek
4debad8caf
Switch zeek: 🆔 :lookup to zeek: 🆔 :find
...
For parity with Scope since it now uses Find instead of Lookup
2020-05-14 18:00:18 -07:00
Jon Siwek
3bcf55ce41
Change zeek: 🆔 :lookup functions to use std::string_view
2020-05-14 17:24:21 -07:00
Jon Siwek
8f95a2a0bb
Deprecate Scope::Lookup(), replace with Scope::Find()
2020-05-14 17:24:21 -07:00
Jon Siwek
a5762c12cc
Move various elements into ID.h and zeek::id namespace
...
* A handful of generic/useful/common global type pointers that used
to be in NetVar.h
* Lookup functions that used to be Var.h
2020-05-14 17:24:20 -07:00
Jon Siwek
1eb723fc9d
Deprecate Val::Type(), replace with GetType()
2020-05-14 17:23:20 -07:00
Jon Siwek
32b895f4ba
Deprecate ID::ID_Val(), replace with ID::GetVal()
2020-05-14 17:18:00 -07:00
Jon Siwek
3f07c57523
Deprecate ID::Type(), replace with GetType()
2020-05-14 17:18:00 -07:00
Jon Siwek
103fed9f01
Deprecate RecordType::FieldType(), replace with GetFieldType()
2020-05-14 17:18:00 -07:00