mirror of
https://github.com/zeek/zeek.git
synced 2025-10-03 15:18:20 +00:00
The Great Embooleanating
A large number of functions had return values and/or arguments changed to use ``bool`` types instead of ``int``.
This commit is contained in:
parent
3c470ffe13
commit
fd5e15b116
145 changed files with 1288 additions and 1331 deletions
10
src/Func.h
10
src/Func.h
|
@ -39,7 +39,7 @@ public:
|
|||
|
||||
~Func() override;
|
||||
|
||||
virtual int IsPure() const = 0;
|
||||
virtual bool IsPure() const = 0;
|
||||
function_flavor Flavor() const { return FType()->Flavor(); }
|
||||
|
||||
struct Body {
|
||||
|
@ -123,7 +123,7 @@ public:
|
|||
BroFunc(ID* id, IntrusivePtr<Stmt> body, id_list* inits, size_t frame_size, int priority);
|
||||
~BroFunc() override;
|
||||
|
||||
int IsPure() const override;
|
||||
bool IsPure() const override;
|
||||
IntrusivePtr<Val> Call(const zeek::Args& args, Frame* parent) const override;
|
||||
|
||||
/**
|
||||
|
@ -195,10 +195,10 @@ using built_in_func = Val* (*)(Frame* frame, const zeek::Args* args);
|
|||
|
||||
class BuiltinFunc : public Func {
|
||||
public:
|
||||
BuiltinFunc(built_in_func func, const char* name, int is_pure);
|
||||
BuiltinFunc(built_in_func func, const char* name, bool is_pure);
|
||||
~BuiltinFunc() override;
|
||||
|
||||
int IsPure() const override;
|
||||
bool IsPure() const override;
|
||||
IntrusivePtr<Val> Call(const zeek::Args& args, Frame* parent) const override;
|
||||
built_in_func TheFunc() const { return func; }
|
||||
|
||||
|
@ -208,7 +208,7 @@ protected:
|
|||
BuiltinFunc() { func = 0; is_pure = 0; }
|
||||
|
||||
built_in_func func;
|
||||
int is_pure;
|
||||
bool is_pure;
|
||||
};
|
||||
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue