summaryrefslogtreecommitdiff
path: root/ext
diff options
context:
space:
mode:
authorNicholas Clark <nick@ccl4.org>2011-03-06 10:16:22 +0000
committerNicholas Clark <nick@ccl4.org>2011-03-06 10:16:22 +0000
commit013e295df0c07448c793c2b6d60b0a2400261e88 (patch)
treef4b4da90869e2b4d2d3711490a2f4f0a96492fdb /ext
parentf3b02925aeacaac5636cac62dc3bf78525fdbe3d (diff)
downloadperl-013e295df0c07448c793c2b6d60b0a2400261e88.tar.gz
In inet_aton(), use newSVpvn_flags() instead of sv_newmortal(), sv_setpvn()
The API calls are equivalent, but the object code is slightly smaller.
Diffstat (limited to 'ext')
-rw-r--r--ext/Socket/Socket.xs4
1 files changed, 1 insertions, 3 deletions
diff --git a/ext/Socket/Socket.xs b/ext/Socket/Socket.xs
index e9a8c56cc8..3e81105e0c 100644
--- a/ext/Socket/Socket.xs
+++ b/ext/Socket/Socket.xs
@@ -431,9 +431,7 @@ inet_aton(host)
ok = 1;
}
- ST(0) = sv_newmortal();
- if (ok)
- sv_setpvn( ST(0), (char *)&ip_address, sizeof ip_address );
+ ST(0) = newSVpvn_flags(ok ? (char *)&ip_address : NULL, sizeof ip_address, SVs_TEMP);
}
void