diff options
author | David Mitchell <davem@iabyn.com> | 2017-07-14 15:23:29 +0100 |
---|---|---|
committer | David Mitchell <davem@iabyn.com> | 2017-07-27 11:30:23 +0100 |
commit | 12dc5f9406fbb8389be8b9f9406ad247ca07f210 (patch) | |
tree | 43c1d807a312fb0ded41d8e8ace03a6ef339a5d7 /pp_sys.c | |
parent | a9372a4640d52f451e21d4f26b1105811563d003 (diff) | |
download | perl-12dc5f9406fbb8389be8b9f9406ad247ca07f210.tar.gz |
pp_readline,close,getc: explain NULL stack arg
add code comments to explain why these functions can sometimes be called
with a NULL pointer on the stack.
(feature introduced by v5.15.2-112-g30901a8)
Diffstat (limited to 'pp_sys.c')
-rw-r--r-- | pp_sys.c | 4 |
1 files changed, 4 insertions, 0 deletions
@@ -664,6 +664,8 @@ PP(pp_open) PP(pp_close) { dSP; + /* pp_coreargs pushes a NULL to indicate no args passed to + * CORE::close() */ GV * const gv = MAXARG == 0 || (!TOPs && !POPs) ? PL_defoutgv : MUTABLE_GV(POPs); @@ -1369,6 +1371,8 @@ PP(pp_select) PP(pp_getc) { dSP; dTARGET; + /* pp_coreargs pushes a NULL to indicate no args passed to + * CORE::getc() */ GV * const gv = MAXARG==0 || (!TOPs && !POPs) ? PL_stdingv : MUTABLE_GV(POPs); IO *const io = GvIO(gv); |