Sys::Hostname::ghname should use newSVpv(s, 0), not newSVpvn(s, strlen(s))
authorNicholas Clark <nick@ccl4.org>
Thu, 21 Oct 2010 16:58:42 +0000 (17:58 +0100)
committerNicholas Clark <nick@ccl4.org>
Thu, 21 Oct 2010 16:58:42 +0000 (17:58 +0100)
commit23933b71b68b2a941ad96656d331a8c2775288cc
tree6f615cdbbef6646ea9db7d8f562039d21bf635b8
parent0de694c509edaf65aac76fe7d6e192754c4b6adc
Sys::Hostname::ghname should use newSVpv(s, 0), not newSVpvn(s, strlen(s))

Whilst functionally identical, the latter will produce more object code.
Also, avoid the strlen() entirely for the case of HAS_PHOSTNAME, where we know
the length.
ext/Sys-Hostname/Hostname.xs