mirror of
https://github.com/zeek/zeek.git
synced 2025-10-02 06:38:20 +00:00
-O gen-C++ tweaks to be compatible with ZAM changes
This commit is contained in:
parent
d89b39a0bb
commit
65a7e3de5f
3 changed files with 3 additions and 3 deletions
|
@ -105,7 +105,7 @@ ValPtr when_invoke__CPP(Func* f, std::vector<ValPtr> args, Frame* frame, void* c
|
|||
|
||||
auto res = f->Invoke(&args, frame);
|
||||
if ( ! res )
|
||||
throw DelayedCallException();
|
||||
throw CPPDelayedCallException();
|
||||
|
||||
return res;
|
||||
}
|
||||
|
|
|
@ -80,7 +80,7 @@ inline ValPtr invoke__CPP(Func* f, std::vector<ValPtr> args, Frame* frame)
|
|||
extern ValPtr when_invoke__CPP(Func* f, std::vector<ValPtr> args, Frame* frame, void* caller_addr);
|
||||
|
||||
// Thrown when a call inside a "when" delays.
|
||||
class DelayedCallException : public InterpreterException
|
||||
class CPPDelayedCallException : public InterpreterException
|
||||
{
|
||||
};
|
||||
|
||||
|
|
|
@ -446,7 +446,7 @@ void CPPCompile::GenWhenStmt(const WhenStmt* w)
|
|||
{
|
||||
Emit("ValPtr retval = {NewRef{}, curr_t->Lookup(curr_assoc)};");
|
||||
Emit("if ( ! retval )");
|
||||
Emit("\tthrow DelayedCallException();");
|
||||
Emit("\tthrow CPPDelayedCallException();");
|
||||
Emit("return %s;", GenericValPtrToGT("retval", ret_type, GEN_NATIVE));
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue