X-Git-Url: http://git.vpit.fr/?p=perl%2Fmodules%2FScope-Upper.git;a=blobdiff_plain;f=Upper.xs;h=e3713ae95ffccae1ced4042185b620c704947522;hp=728cfecd663bfca78f00c7cd3161f51f8a758673;hb=181496f2ca2ce70348ee900a89f3e8854958c385;hpb=f8031112ec9eddeae6ab2a23f703c80a456529c1 diff --git a/Upper.xs b/Upper.xs index 728cfec..e3713ae 100644 --- a/Upper.xs +++ b/Upper.xs @@ -973,10 +973,50 @@ done: /* --- Pop a context back -------------------------------------------------- */ -#if SU_DEBUG && defined(DEBUGGING) +#ifdef DEBUGGING # define SU_CXNAME(C) PL_block_type[CxTYPE(C)] #else -# define SU_CXNAME(C) "XXX" +# if SU_HAS_PERL(5, 11, 0) +static const char *su_block_type[] = { + "NULL", + "WHEN", + "BLOCK", + "GIVEN", + "LOOP_FOR", + "LOOP_PLAIN", + "LOOP_LAZYSV", + "LOOP_LAZYIV", + "SUB", + "FORMAT", + "EVAL", + "SUBST" +}; +# elif SU_HAS_PERL(5, 9, 3) +static const char *su_block_type[] = { + "NULL", + "SUB", + "EVAL", + "WHEN", + "SUBST", + "BLOCK", + "FORMAT", + "GIVEN", + "LOOP_FOR", + "LOOP_PLAIN", + "LOOP_LAZYSV", + "LOOP_LAZYIV" +}; +# else +static const char *su_block_type[] = { + "NULL", + "SUB", + "EVAL", + "LOOP", + "SUBST", + "BLOCK" +}; +# endif +# define SU_CXNAME(C) su_block_type[CxTYPE(C)] #endif static void su_pop(pTHX_ void *ud) {