In perl.git, the branch blead has been updated <http://perl5.git.perl.org/perl.git/commitdiff/bee8aa44140bbc2d7566da206b8e0cbf146397d0?hp=5f211341d665e81a03fbd4935e4e87f70d937fc3>
- Log ----------------------------------------------------------------- commit bee8aa44140bbc2d7566da206b8e0cbf146397d0 Author: Nicholas Clark <[email protected]> Date: Sun Oct 24 09:59:08 2010 +0100 In pp_getlogin, use sv_setpv_mg() to avoid needing an explicit strlen() call. It was using PUSHp() here, meaning local object code for a call to strlen(), and for SvSETMAGIC(). ----------------------------------------------------------------------- Summary of changes: pp_sys.c | 3 ++- 1 files changed, 2 insertions(+), 1 deletions(-) diff --git a/pp_sys.c b/pp_sys.c index ed4ec13..39daad6 100644 --- a/pp_sys.c +++ b/pp_sys.c @@ -5517,7 +5517,8 @@ PP(pp_getlogin) EXTEND(SP, 1); if (!(tmps = PerlProc_getlogin())) RETPUSHUNDEF; - PUSHp(tmps, strlen(tmps)); + sv_setpv_mg(TARG, tmps); + PUSHs(TARG); RETURN; #else DIE(aTHX_ PL_no_func, "getlogin"); -- Perl5 Master Repository
