I was mistaken. Borland and gcc do have snprintf() and vsnprintf()
[p5sagit/p5-mst-13.2.git] / pad.c
diff --git a/pad.c b/pad.c
index 4a24216..80e930e 100644 (file)
--- a/pad.c
+++ b/pad.c
@@ -287,7 +287,7 @@ Perl_pad_undef(pTHX_ CV* cv)
                        CvWEAKOUTSIDE_off(innercv);
                        CvOUTSIDE(innercv) = outercv;
                        CvOUTSIDE_SEQ(innercv) = seq;
-                       SvREFCNT_inc_void_NN(outercv);
+                       SvREFCNT_inc_simple_void_NN(outercv);
                    }
                    else {
                        CvOUTSIDE(innercv) = NULL;
@@ -352,7 +352,7 @@ Perl_pad_add_name(pTHX_ const char *name, HV* typestash, HV* ourstash, bool fake
     if (ourstash) {
        SvPAD_OUR_on(namesv);
        OURSTASH_set(namesv, ourstash);
-       SvREFCNT_inc_void_NN(ourstash);
+       SvREFCNT_inc_simple_void_NN(ourstash);
     }
 
     av_store(PL_comppad_name, offset, namesv);
@@ -592,9 +592,9 @@ Perl_pad_findmy(pTHX_ const char *name)
     SV **name_svp;
 
     pad_peg("pad_findmy");
-    offset =  pad_findlex(name, PL_compcv, PL_cop_seqmax, 1,
+    offset = pad_findlex(name, PL_compcv, PL_cop_seqmax, 1,
                NULL, &out_sv, &out_flags);
-    if (offset != NOT_IN_PAD) 
+    if ((PADOFFSET)offset != NOT_IN_PAD) 
        return offset;
 
     /* look for an our that's being introduced; this allows
@@ -814,7 +814,7 @@ S_pad_findlex(pTHX_ const char *name, const CV* cv, U32 seq, int warn,
 
     if (!CvOUTSIDE(cv))
        return NOT_IN_PAD;
-    
+
     /* out_capture non-null means caller wants us to capture lex; in
      * addition we capture ourselves unless it's an ANON/format */
     new_capturep = out_capture ? out_capture :
@@ -822,9 +822,9 @@ S_pad_findlex(pTHX_ const char *name, const CV* cv, U32 seq, int warn,
 
     offset = pad_findlex(name, CvOUTSIDE(cv), CvOUTSIDE_SEQ(cv), 1,
                new_capturep, out_name_sv, out_flags);
-    if (offset == NOT_IN_PAD)
+    if ((PADOFFSET)offset == NOT_IN_PAD)
        return NOT_IN_PAD;
-    
+
     /* found in an outer CV. Add appropriate fake entry to this pad */
 
     /* don't add new fake entries (via eval) to CVs that we have already
@@ -853,7 +853,7 @@ S_pad_findlex(pTHX_ const char *name, const CV* cv, U32 seq, int warn,
 
        SvNV_set(new_namesv, (NV)0);
        if (SvPAD_OUR(new_namesv)) {
-           /*EMPTY*/;   /* do nothing */
+           NOOP;   /* do nothing */
        }
        else if (CvLATE(cv)) {
            /* delayed creation - just note the offset within parent pad */
@@ -1031,7 +1031,8 @@ Perl_pad_leavemy(pTHX)
            if (sv && sv != &PL_sv_undef
                    && !SvFAKE(sv) && ckWARN_d(WARN_INTERNAL))
                Perl_warner(aTHX_ packWARN(WARN_INTERNAL),
-                                       "%"SVf" never introduced", sv);
+                           "%"SVf" never introduced",
+                           (void*)sv);
        }
     }
     /* "Deintroduce" my variables that are leaving with this scope. */
@@ -1493,7 +1494,7 @@ Perl_cv_clone(pTHX_ CV *proto)
                }
                else {
                    assert(!SvPADSTALE(sv));
-                   SvREFCNT_inc_simple_void(sv);
+                   SvREFCNT_inc_simple_void_NN(sv);
                }
            }
            if (!sv) {
@@ -1510,7 +1511,7 @@ Perl_cv_clone(pTHX_ CV *proto)
            }
        }
        else if (IS_PADGV(ppad[ix]) || IS_PADCONST(ppad[ix])) {
-           sv = SvREFCNT_inc(ppad[ix]);
+           sv = SvREFCNT_inc_NN(ppad[ix]);
        }
        else {
            sv = newSV(0);
@@ -1626,7 +1627,7 @@ Perl_pad_push(pTHX_ PADLIST *padlist, int depth)
                }
            }
            else if (IS_PADGV(oldpad[ix]) || IS_PADCONST(oldpad[ix])) {
-               av_store(newpad, ix, SvREFCNT_inc(oldpad[ix]));
+               av_store(newpad, ix, SvREFCNT_inc_NN(oldpad[ix]));
            }
            else {
                /* save temporaries on recursion? */