This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
Change sv_setpvn(…, "…", …) to sv_setpvs(…, "…")
[perl5.git] / dist / Storable / Storable.xs
index 83cd001..a5f8ecd 100644 (file)
@@ -4894,7 +4894,7 @@ static SV *retrieve_lscalar(pTHX_ stcxt_t *cxt, const char *cname)
        SEEN_NN(sv, stash, 0);  /* Associate this new scalar with tag "tagnum" */
 
        if (len ==  0) {
-           sv_setpvn(sv, "", 0);
+           sv_setpvs(sv, "");
            return sv;
        }
 
@@ -5684,7 +5684,7 @@ static SV *retrieve_code(pTHX_ stcxt_t *cxt, const char *cname)
        SAVETMPS;
 
        errsv = get_sv("@", GV_ADD);
-       sv_setpvn(errsv, "", 0);        /* clear $@ */
+       sv_setpvs(errsv, "");   /* clear $@ */
        if (SvROK(cxt->eval) && SvTYPE(SvRV(cxt->eval)) == SVt_PVCV) {
                PUSHMARK(sp);
                XPUSHs(sv_2mortal(newSVsv(sub)));