mirror of
https://github.com/zeek/zeek.git
synced 2025-10-05 08:08:19 +00:00
Frame: use class IntrusivePtr
This commit is contained in:
parent
79570fdfd6
commit
78e736621c
4 changed files with 17 additions and 37 deletions
|
@ -4,6 +4,7 @@
|
|||
|
||||
#include "BroList.h" // for typedef val_list
|
||||
#include "Obj.h"
|
||||
#include "IntrusivePtr.h"
|
||||
|
||||
#include <unordered_map>
|
||||
#include <string>
|
||||
|
@ -189,7 +190,7 @@ public:
|
|||
* and the second is the unserialized frame with reference count +1, or
|
||||
* null if the serialization wasn't successful.
|
||||
*/
|
||||
static std::pair<bool, Frame*> Unserialize(const broker::vector& data);
|
||||
static std::pair<bool, IntrusivePtr<Frame>> Unserialize(const broker::vector& data);
|
||||
|
||||
/**
|
||||
* Sets the IDs that the frame knows offsets for. These offsets will
|
||||
|
@ -210,9 +211,9 @@ public:
|
|||
|
||||
// If the frame is run in the context of a trigger condition evaluation,
|
||||
// the trigger needs to be registered.
|
||||
void SetTrigger(trigger::Trigger* arg_trigger);
|
||||
void SetTrigger(IntrusivePtr<trigger::Trigger> arg_trigger);
|
||||
void ClearTrigger();
|
||||
trigger::Trigger* GetTrigger() const { return trigger; }
|
||||
trigger::Trigger* GetTrigger() const { return trigger.get(); }
|
||||
|
||||
void SetCall(const CallExpr* arg_call) { call = arg_call; }
|
||||
void ClearCall() { call = 0; }
|
||||
|
@ -290,7 +291,7 @@ private:
|
|||
bool break_before_next_stmt;
|
||||
bool break_on_return;
|
||||
|
||||
trigger::Trigger* trigger;
|
||||
IntrusivePtr<trigger::Trigger> trigger;
|
||||
const CallExpr* call;
|
||||
bool delayed;
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue