Skip to content

Commit

Permalink
Make BIFs just return ValPtr directly instead of BifReturnVal
Browse files Browse the repository at this point in the history
  • Loading branch information
timwoj committed Jan 17, 2024
1 parent cfbd7e9 commit bb5d2ac
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions builtin-func.y
Original file line number Diff line number Diff line change
Expand Up @@ -594,11 +594,11 @@ head_1: TOK_ID opt_ws arg_begin
// (e.g. ones at global scope that may be used to implement
// the BIF itself).
fprintf(fp_func_h,
"namespace zeek { %sextern zeek::detail::BifReturnVal %s_bif(zeek::detail::Frame* frame, const zeek::Args*);%s }\n",
"namespace zeek { %sextern zeek::ValPtr %s_bif(zeek::detail::Frame* frame, const zeek::Args*);%s }\n",
decl.c_namespace_start.c_str(), decl.bare_name.c_str(), decl.c_namespace_end.c_str());

fprintf(fp_func_def,
"zeek::detail::BifReturnVal zeek::%s_bif(zeek::detail::Frame* frame, const zeek::Args* %s)",
"zeek::ValPtr zeek::%s_bif(zeek::detail::Frame* frame, const zeek::Args* %s)",
decl.c_fullname.c_str(), arg_list_name);

record_bif_item(decl.zeek_fullname.c_str(), "FUNCTION");
Expand Down

0 comments on commit bb5d2ac

Please sign in to comment.