diff options
author | Father Chrysostomos <sprout@cpan.org> | 2011-08-25 18:12:35 -0700 |
---|---|---|
committer | Father Chrysostomos <sprout@cpan.org> | 2011-08-25 23:02:10 -0700 |
commit | 8af2014272725e01526eb3ee0e591a9460cc770f (patch) | |
tree | 9bb3ec56b55df175f8616e380a6875ff1612a29c /pp_sys.c | |
parent | 9d3c658e5c246089e541ed0d652aaccf018f16e9 (diff) | |
download | perl-8af2014272725e01526eb3ee0e591a9460cc770f.tar.gz |
&CORE::getpgrp()
This commit allows &CORE::getpgrp to be called through references and
via ampersand syntax. pp_getpgrp is modified to take into account the
nulls pushed on to the stack in pp_coreargs, since pp_coreargs has no
other way to tell getpgrp how many arguments it’s actually getting.
Diffstat (limited to 'pp_sys.c')
-rw-r--r-- | pp_sys.c | 3 |
1 files changed, 2 insertions, 1 deletions
@@ -4319,7 +4319,8 @@ PP(pp_getpgrp) #ifdef HAS_GETPGRP dVAR; dSP; dTARGET; Pid_t pgrp; - const Pid_t pid = (MAXARG < 1) ? 0 : SvIVx(POPs); + const Pid_t pid = + (MAXARG < 1) ? 0 : TOPs ? SvIVx(POPs) : ((void)POPs, 0); #ifdef BSD_GETPGRP pgrp = (I32)BSD_GETPGRP(pid); |