summaryrefslogtreecommitdiff
path: root/pp_sys.c
diff options
context:
space:
mode:
authorNicholas Clark <nick@ccl4.org>2008-01-03 17:15:53 +0000
committerNicholas Clark <nick@ccl4.org>2008-01-03 17:15:53 +0000
commit59cd0e26eb6c10499b25d783562357dd68cc16f2 (patch)
tree68198e7261586c25728270515fa4f9f3acd7735c /pp_sys.c
parentd16d613cbabd929abf5d13edb895c38c5a99bc29 (diff)
downloadperl-59cd0e26eb6c10499b25d783562357dd68cc16f2.tar.gz
Extend newSVpvn_flags() to also call sv_2mortal() if SVs_TEMP is set in
the flags. Move its implementation just ahead of sv_2mortal()'s for CPU cache locality. Refactor all code that can be to use this. p4raw-id: //depot/perl@32818
Diffstat (limited to 'pp_sys.c')
-rw-r--r--pp_sys.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/pp_sys.c b/pp_sys.c
index 6aa86455e8..36e5638957 100644
--- a/pp_sys.c
+++ b/pp_sys.c
@@ -4697,7 +4697,7 @@ PP(pp_ghostent)
PUSHs(sv_2mortal(newSViv((IV)len)));
#ifdef h_addr
for (elem = hent->h_addr_list; elem && *elem; elem++) {
- XPUSHs(sv_2mortal(newSVpvn(*elem, len)));
+ XPUSHs(newSVpvn_flags(*elem, len, SVs_TEMP));
}
#else
if (hent->h_addr)