]> git.vpit.fr Git - perl/modules/Scope-Upper.git/commitdiff
Make SU_CXNAME take the context as argument
authorVincent Pit <vince@profvince.com>
Sat, 8 Sep 2012 17:46:21 +0000 (19:46 +0200)
committerVincent Pit <vince@profvince.com>
Sat, 8 Sep 2012 17:46:21 +0000 (19:46 +0200)
Upper.xs

index fd2e00e6a7bedcc2797e373ece6cfcecb475f9f0..76496ac34e683671fa7192cd49a099e5a7cedee5 100644 (file)
--- a/Upper.xs
+++ b/Upper.xs
@@ -893,9 +893,9 @@ done:
 
 #if SU_DEBUG
 # ifdef DEBUGGING
-#  define SU_CXNAME PL_block_type[CxTYPE(&cxstack[cxstack_ix])]
+#  define SU_CXNAME(C) PL_block_type[CxTYPE(C)]
 # else
-#  define SU_CXNAME "XXX"
+#  define SU_CXNAME(C) "XXX"
 # endif
 #endif
 
@@ -908,7 +908,7 @@ STATIC void su_pop(pTHX_ void *ud) {
   PerlIO_printf(Perl_debug_log,
    "%p: --- pop a %s\n"
    "%p: leave scope     at depth=%2d scope_ix=%2d cur_top=%2d cur_base=%2d\n",
-    ud, SU_CXNAME,
+    ud, SU_CXNAME(cxstack + cxstack_ix),
     ud, depth, PL_scopestack_ix,PL_savestack_ix,PL_scopestack[PL_scopestack_ix])
  );