This is a live mirror of the Perl 5 development currently hosted at
https://github.com/perl/perl5
https://perl5.git.perl.org
/
perl5.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
In inet_aton(), use newSVpvn_flags() instead of sv_newmortal(), sv_setpvn()
[perl5.git]
/
ext
/
Socket
/
Socket.xs
diff --git
a/ext/Socket/Socket.xs
b/ext/Socket/Socket.xs
index
e9a8c56
..
3e81105
100644
(file)
--- a/
ext/Socket/Socket.xs
+++ b/
ext/Socket/Socket.xs
@@
-431,9
+431,7
@@
inet_aton(host)
ok = 1;
}
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
}
void