]> git.vpit.fr Git - perl/modules/Variable-Magic.git/blobdiff - ptable.h
Abstract the MGWIZ creation into a new vmg_mgwiz_alloc() function
[perl/modules/Variable-Magic.git] / ptable.h
index 055f0a5cd008d2471c620c8321996e023e118a7a..5e9e8ed531465282078c8b650f9aedbadd49a457 100644 (file)
--- a/ptable.h
+++ b/ptable.h
@@ -29,7 +29,7 @@
 # define aPTBLMS  aTHX
 # define aPTBLMS_ aTHX_
 #else
-# define pPTBLMS
+# define pPTBLMS  void
 # define pPTBLMS_
 # define aPTBLMS
 # define aPTBLMS_
@@ -206,7 +206,8 @@ STATIC void ptable_walk(pTHX_ ptable * const t, void (*cb)(pTHX_ ptable_ent *ent
   do {
    ptable_ent *entry;
    for (entry = array[i]; entry; entry = entry->next)
-    cb(aTHX_ entry, userdata);
+    if (entry->val)
+     cb(aTHX_ entry, userdata);
   } while (i--);
  }
 }