diff options
author | David Mitchell <davem@iabyn.com> | 2015-12-26 12:45:01 +0000 |
---|---|---|
committer | David Mitchell <davem@iabyn.com> | 2016-02-03 09:19:19 +0000 |
commit | c83cbdf5936b95912a7ef5ec1e23c92eb03accc2 (patch) | |
tree | 2c0a96d389d3e4e7170d0866da969b03d31b1c12 /cop.h | |
parent | ceb12bd8658d8542570022026702734394fec792 (diff) | |
download | perl-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.h | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -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 */ \ |