diff options
author | Nicholas Clark <nick@ccl4.org> | 2009-10-15 23:17:02 +0100 |
---|---|---|
committer | Nicholas Clark <nick@ccl4.org> | 2009-10-15 23:17:02 +0100 |
commit | d3d348849d1e04f91e458937b2aba39c00de63af (patch) | |
tree | a0047853d605841c279608b3e98ad555131ae1f4 /ext/POSIX | |
parent | f584eb2d9f7ac11f83863d38a4f1f95cd9775aa2 (diff) | |
download | perl-d3d348849d1e04f91e458937b2aba39c00de63af.tar.gz |
Replace sv_2mortal(newSVpvn(...)) with newSVpvn_flags(..., SVs_TEMP)
Diffstat (limited to 'ext/POSIX')
-rw-r--r-- | ext/POSIX/POSIX.xs | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/ext/POSIX/POSIX.xs b/ext/POSIX/POSIX.xs index 392ba12aaf..eccbb3170d 100644 --- a/ext/POSIX/POSIX.xs +++ b/ext/POSIX/POSIX.xs @@ -1457,7 +1457,7 @@ nice(incr) errno = 0; if ((incr = nice(incr)) != -1 || errno == 0) { if (incr == 0) - XPUSHs(sv_2mortal(newSVpvn("0 but true", 10))); + XPUSHs(newSVpvs_flags("0 but true", SVs_TEMP)); else XPUSHs(sv_2mortal(newSViv(incr))); } @@ -1512,11 +1512,11 @@ uname() struct utsname buf; if (uname(&buf) >= 0) { EXTEND(SP, 5); - PUSHs(sv_2mortal(newSVpv(buf.sysname, 0))); - PUSHs(sv_2mortal(newSVpv(buf.nodename, 0))); - PUSHs(sv_2mortal(newSVpv(buf.release, 0))); - PUSHs(sv_2mortal(newSVpv(buf.version, 0))); - PUSHs(sv_2mortal(newSVpv(buf.machine, 0))); + PUSHs(newSVpvn_flags(buf.sysname, strlen(buf.sysname), SVs_TEMP)); + PUSHs(newSVpvn_flags(buf.nodename, strlen(buf.nodename), SVs_TEMP)); + PUSHs(newSVpvn_flags(buf.release, strlen(buf.release), SVs_TEMP)); + PUSHs(newSVpvn_flags(buf.version, strlen(buf.version), SVs_TEMP)); + PUSHs(newSVpvn_flags(buf.machine, strlen(buf.machine), SVs_TEMP)); } #else uname((char *) 0); /* A stub to call not_here(). */ @@ -1813,8 +1813,8 @@ void tzname() PPCODE: EXTEND(SP,2); - PUSHs(sv_2mortal(newSVpvn(tzname[0],strlen(tzname[0])))); - PUSHs(sv_2mortal(newSVpvn(tzname[1],strlen(tzname[1])))); + PUSHs(newSVpvn_flags(tzname[0], strlen(tzname[0]), SVs_TEMP)); + PUSHs(newSVpvn_flags(tzname[1], strlen(tzname[1]), SVs_TEMP)); SysRet access(filename, mode) |