]> git.vpit.fr Git - perl/modules/Variable-Magic.git/blobdiff - Magic.xs
Pass the 'data' callback after the 'op_info' flag when calling _wizard()
[perl/modules/Variable-Magic.git] / Magic.xs
index 6136d4b9b7e4283e2ef4963cb5451e7edac63484..062cdb30fe595b841a61d0bdb59d1a2a3a623908 100644 (file)
--- a/Magic.xs
+++ b/Magic.xs
@@ -759,7 +759,7 @@ STATIC SV *vmg_data_get(pTHX_ SV *sv, const SV *wiz) {
 #define vmg_data_get(S, W) vmg_data_get(aTHX_ (S), (W))
  const MAGIC *mg = vmg_find(sv, wiz);
  return mg ? mg->mg_obj : NULL;
-} 
+}
 
 /* ... Magic cast/dispell .................................................. */
 
@@ -1469,14 +1469,14 @@ CODE:
  Newx(t, 1, MGVTBL);
  Newx(w, 1, MGWIZ);
 
- VMG_SET_CB(ST(i++), data);
-
  cb = ST(i++);
  opinfo = SvOK(cb) ? SvUV(cb) : 0;
  w->opinfo = (U8) ((opinfo < 255) ? opinfo : 255);
  if (w->opinfo)
   vmg_op_info_init(w->opinfo);
 
+ VMG_SET_CB(ST(i++), data);
+
  VMG_SET_SVT_CB(ST(i++), get);
  VMG_SET_SVT_CB(ST(i++), set);
  VMG_SET_SVT_CB(ST(i++), len);