Skip to content
This repository was archived by the owner on Jun 1, 2023. It is now read-only.

Commit 9684ef2

Browse files
author
Reini Urban
committed
pp_sys: Remove unnecessary uses of sv_mortalcopy.
From evalEmpire/parfait@aa8be68 Author: Michael G. Schwern <schwern@pobox.com> Date: Mon Nov 2 18:38:51 2015 -0800 Remove unnecessary uses of sv_mortalcopy. It seems `sv_mortalcopy(&sv_no);` used to be how you created a new SV back in 5.000. The code would do things like this... PUSHs(sv = sv_mortalcopy(&sv_no)); sv_setpvn(sv, hent->h_addr, len); Not all of this got converted to use the new macros.
1 parent 7407a67 commit 9684ef2

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

pp_sys.c

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5032,7 +5032,7 @@ PP(pp_ghostent)
50325032
if (hent->h_addr)
50335033
mPUSHp(hent->h_addr, len);
50345034
else
5035-
PUSHs(sv_mortalcopy(&PL_sv_no));
5035+
PUSHs(&PL_sv_no);
50365036
#endif /* h_addr */
50375037
}
50385038
RETURN;
@@ -5532,7 +5532,7 @@ PP(pp_gpwent)
55325532
mPUSHs(newSVpv(pwent->pw_age, 0));
55335533
# else
55345534
/* I think that you can never get this compiled, but just in case. */
5535-
PUSHs(sv_mortalcopy(&PL_sv_no));
5535+
PUSHs(&PL_sv_no);
55365536
# endif
55375537
# endif
55385538
# endif
@@ -5546,7 +5546,7 @@ PP(pp_gpwent)
55465546
mPUSHs(newSVpv(pwent->pw_comment, 0));
55475547
# else
55485548
/* I think that you can never get this compiled, but just in case. */
5549-
PUSHs(sv_mortalcopy(&PL_sv_no));
5549+
PUSHs(&PL_sv_no);
55505550
# endif
55515551
# endif
55525552

@@ -5625,7 +5625,7 @@ PP(pp_ggrent)
56255625
#ifdef GRPASSWD
56265626
mPUSHs(newSVpv(grent->gr_passwd, 0));
56275627
#else
5628-
PUSHs(sv_mortalcopy(&PL_sv_no));
5628+
PUSHs(&PL_sv_no);
56295629
#endif
56305630

56315631
sv_setgid(PUSHmortal, grent->gr_gid);

0 commit comments

Comments
 (0)