]> git.vpit.fr Git - perl/modules/Variable-Magic.git/blobdiff - Magic.xs
Silence three 'mixed declaration and code' warnings
[perl/modules/Variable-Magic.git] / Magic.xs
index 731c084da72274a381041bcc86dcf054795b723d..6c5b61672c7f74af71b52f5adcc44cdd766bcaea 100644 (file)
--- a/Magic.xs
+++ b/Magic.xs
@@ -652,8 +652,11 @@ STATIC int vmg_wizard_free(pTHX_ SV *wiz, MAGIC *mg) {
  w->owner = NULL;
 #endif /* VMG_MULTIPLICITY */
 
- dMY_CXT;
- wiz = hv_delete(MY_CXT, buf, sprintf(buf, "%u", w->sig), 0);
+ {
+  dMY_CXT;
+  if (hv_delete(MY_CXT, buf, sprintf(buf, "%u", w->sig), 0) != wiz)
+   return 0;
+ }
  SvFLAGS(wiz) |= SVf_BREAK;
  FREETMPS;
 
@@ -741,11 +744,11 @@ STATIC U16 vmg_wizard_sig(pTHX_ SV *wiz) {
   croak(vmg_invalid_wiz);
  }
 
- dMY_CXT;
-
- if (!hv_fetch(MY_CXT, buf, sprintf(buf, "%u", sig), 0))
-  sig = 0;
-
+ {
+  dMY_CXT;
 if (!hv_fetch(MY_CXT, buf, sprintf(buf, "%u", sig), 0))
+   sig = 0;
+ }
  return sig;
 }
 
@@ -768,10 +771,11 @@ STATIC SV *vmg_wizard_wiz(pTHX_ SV *wiz) {
   croak(vmg_invalid_wiz);
  }
 
- dMY_CXT;
-
- return (old = hv_fetch(MY_CXT, buf, sprintf(buf, "%u", sig), 0))
-         ? *old : NULL;
+ {
+  dMY_CXT;
+  return (old = hv_fetch(MY_CXT, buf, sprintf(buf, "%u", sig), 0))
+          ? *old : NULL;
+ }
 }
 
 #define VMG_SET_CB(S, N)              \