summaryrefslogtreecommitdiff
path: root/builtin.c
diff options
context:
space:
mode:
authorPaul "LeoNerd" Evans <leonerd@leonerd.org.uk>2021-12-02 13:06:27 +0000
committerPaul Evans <leonerd@leonerd.org.uk>2021-12-03 10:59:24 +0000
commit1c57e39668d648fff43de7f8971c1bf9f23debfc (patch)
tree28c64613317397e289d839617269e7a1cbf4cd8c /builtin.c
parente728f790bcefcaf1d8b42e2f7ee16a9125f0af22 (diff)
downloadperl-1c57e39668d648fff43de7f8971c1bf9f23debfc.tar.gz
Improvements to OP_ISBOOL
* Apply OA_RETSCALAR, OA_TARGLEX and OA_FOLDCONST flags * Handle both 'get' and 'set' magic
Diffstat (limited to 'builtin.c')
-rw-r--r--builtin.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/builtin.c b/builtin.c
index 5ea6e773f5..8919628e05 100644
--- a/builtin.c
+++ b/builtin.c
@@ -121,7 +121,7 @@ static OP *ck_builtin_func1(pTHX_ OP *entersubop, GV *namegv, SV *ckobj)
(void)op_sibling_splice(parent, pushop, 1, NULL);
- U8 flags = entersubop->op_flags;
+ U8 wantflags = entersubop->op_flags & OPf_WANT;
op_free(entersubop);
@@ -132,7 +132,7 @@ static OP *ck_builtin_func1(pTHX_ OP *entersubop, GV *namegv, SV *ckobj)
DIE(aTHX_ "panic: unhandled ckval value %" IVdf " for ck_builtin_func1()", builtin->ckval);
}
- return newUNOP(opcode, flags, argop);
+ return newUNOP(opcode, wantflags, argop);
}
static const char builtin_not_recognised[] = "'%" SVf "' is not recognised as a builtin function";