X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=xsutils.c;h=86620083af78be8f6479afbafc0589827bdeb338;hb=d7507f7459e6b42ee8cfc80abf2510fc2ff6a5c0;hp=7b968cf6258945cfd591c0b138c9153e8aa0b548;hpb=7423f6db106ad471398838e82e73b22d8c1e166e;p=p5sagit%2Fp5-mst-13.2.git diff --git a/xsutils.c b/xsutils.c index 7b968cf..8662008 100644 --- a/xsutils.c +++ b/xsutils.c @@ -61,7 +61,7 @@ modify_SV_attributes(pTHX_ SV *sv, SV **retlist, SV **attrlist, int numattrs) for (nret = 0 ; numattrs && (attr = *attrlist++); numattrs--) { STRLEN len; - const char *name = SvPV(attr, len); + const char *name = SvPV_const(attr, len); const bool negated = (*name == '-'); if (negated) { @@ -132,10 +132,11 @@ modify_SV_attributes(pTHX_ SV *sv, SV **retlist, SV **attrlist, int numattrs) case 'e': if (memEQ(name, "uniqu", 5)) { if (SvTYPE(sv) == SVt_PVGV) { - if (negated) + if (negated) { GvUNIQUE_off(sv); - else + } else { GvUNIQUE_on(sv); + } } /* Hope this came from toke.c if not a GV. */ continue; @@ -305,8 +306,7 @@ usage: rv = ST(0); ST(0) = TARG; - if (SvGMAGICAL(rv)) - mg_get(rv); + SvGETMAGIC(rv); if (!(SvOK(rv) && SvROK(rv))) goto usage; sv = SvRV(rv);