summaryrefslogtreecommitdiff
path: root/cop.h
diff options
context:
space:
mode:
authorDavid Mitchell <davem@iabyn.com>2015-12-26 12:45:01 +0000
committerDavid Mitchell <davem@iabyn.com>2016-02-03 09:19:19 +0000
commitc83cbdf5936b95912a7ef5ec1e23c92eb03accc2 (patch)
tree2c0a96d389d3e4e7170d0866da969b03d31b1c12 /cop.h
parentceb12bd8658d8542570022026702734394fec792 (diff)
downloadperl-c83cbdf5936b95912a7ef5ec1e23c92eb03accc2.tar.gz
PUSHEVAL: make n param an SV rather than a string
Rather than doing cx->blk_eval.old_namesv = (n ? newSVpv(n,0) : NULL); make the caller responsible for creating and passing in the SV. Since only only place (pp_require) passes a non-null value, this saves the other places having to test for nullness.
Diffstat (limited to 'cop.h')
-rw-r--r--cop.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/cop.h b/cop.h
index 268c24fdcc..2657ffbd6e 100644
--- a/cop.h
+++ b/cop.h
@@ -752,7 +752,7 @@ struct block_eval {
assert(!(PL_in_eval & ~0x7F)); \
assert(!(PL_op->op_type & ~0x1FF)); \
cx->blk_u16 = (PL_in_eval & 0x7F) | ((U16)PL_op->op_type << 7); \
- cx->blk_eval.old_namesv = (n ? newSVpv(n,0) : NULL); \
+ cx->blk_eval.old_namesv = (n); \
cx->blk_eval.old_eval_root = PL_eval_root; \
cx->blk_eval.cur_text = PL_parser ? PL_parser->linestr : NULL; \
cx->blk_eval.cv = NULL; /* set by doeval_compile() as applicable */ \