From: Nicholas Clark Date: Thu, 15 Oct 2009 19:02:51 +0000 (+0100) Subject: Use newSVpvn(), newSVpvs() and gv_fetchpvs(), the later with proper arguments. X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=f584eb2d9f7ac11f83863d38a4f1f95cd9775aa2;p=p5sagit%2Fp5-mst-13.2.git Use newSVpvn(), newSVpvs() and gv_fetchpvs(), the later with proper arguments. Brought to you by the Campaign for the Elimination of strlen(). --- diff --git a/ext/POSIX/POSIX.xs b/ext/POSIX/POSIX.xs index 8572367..392ba12 100644 --- a/ext/POSIX/POSIX.xs +++ b/ext/POSIX/POSIX.xs @@ -1217,7 +1217,7 @@ sigaction(sig, optaction, oldaction = 0) { dVAR; POSIX__SigAction action; - GV *siggv = gv_fetchpv("SIG", TRUE, SVt_PVHV); + GV *siggv = gv_fetchpvs("SIG", GV_ADD, SVt_PVHV); struct sigaction act; struct sigaction oact; sigset_t sset; @@ -1280,7 +1280,7 @@ sigaction(sig, optaction, oldaction = 0) XSRETURN_UNDEF; ENTER; /* Restore signal mask no matter how we exit this block. */ - osset_sv = newSVpv((char *)(&osset), sizeof(sigset_t)); + osset_sv = newSVpvn((char *)(&osset), sizeof(sigset_t)); SAVEFREESV( osset_sv ); SAVEDESTRUCTOR_X(restore_sigmask, osset_sv); @@ -1295,7 +1295,7 @@ sigaction(sig, optaction, oldaction = 0) sv_setsv(*svp, *sigsvp); } else { - sv_setpv(*svp, "DEFAULT"); + sv_setpvs(*svp, "DEFAULT"); } RETVAL = sigaction(sig, (struct sigaction *)0, & oact); if(RETVAL == -1)