Integrate with Sarathy.
[p5sagit/p5-mst-13.2.git] / gv.c
diff --git a/gv.c b/gv.c
index d1cf7ae..470ef11 100644 (file)
--- a/gv.c
+++ b/gv.c
@@ -947,14 +947,16 @@ Perl_gp_ref(pTHX_ GP *gp)
 void
 Perl_gp_free(pTHX_ GV *gv)
 {
+    dTHR;  
     GP* gp;
     CV* cv;
-    dTHR;  
 
     if (!gv || !(gp = GvGP(gv)))
        return;
-    if (gp->gp_refcnt == 0 && ckWARN_d(WARN_INTERNAL)) {
-        Perl_warner(aTHX_ WARN_INTERNAL, "Attempt to free unreferenced glob pointers");
+    if (gp->gp_refcnt == 0) {
+       if (ckWARN_d(WARN_INTERNAL))
+           Perl_warner(aTHX_ WARN_INTERNAL,
+                       "Attempt to free unreferenced glob pointers");
         return;
     }
     if (gp->gp_cv) {
@@ -1466,7 +1468,7 @@ Perl_amagic_call(pTHX_ SV *left, SV *right, int method, int flags)
       case dec_amg:
        SvSetSV(left,res); return left;
       case not_amg:
-       ans=!SvOK(res); break;
+       ans=!SvTRUE(res); break;
       }
       return boolSV(ans);
     } else if (method==copy_amg) {