In perl.git, the branch blead has been updated <http://perl5.git.perl.org/perl.git/commitdiff/e8d9e9d0c5f9426c78756a60f2b68e10f38ce40e?hp=72581b5b7341e76b3ea364b4d49c8340bb668228>
- Log ----------------------------------------------------------------- commit e8d9e9d0c5f9426c78756a60f2b68e10f38ce40e Author: Vincent Pit <[email protected]> Date: Sun Sep 16 16:31:23 2012 +0200 Make cx_dump() display the correct gimme description Contexts are no longer what they used to be back in 1996. ----------------------------------------------------------------------- Summary of changes: scope.c | 17 ++++++++++++++++- 1 files changed, 16 insertions(+), 1 deletions(-) diff --git a/scope.c b/scope.c index eabdbd2..6f8a8b2 100644 --- a/scope.c +++ b/scope.c @@ -1193,6 +1193,7 @@ Perl_cx_dump(pTHX_ PERL_CONTEXT *cx) #ifdef DEBUGGING PerlIO_printf(Perl_debug_log, "CX %ld = %s\n", (long)(cx - cxstack), PL_block_type[CxTYPE(cx)]); if (CxTYPE(cx) != CXt_SUBST) { + const char *gimme_text; PerlIO_printf(Perl_debug_log, "BLK_OLDSP = %ld\n", (long)cx->blk_oldsp); PerlIO_printf(Perl_debug_log, "BLK_OLDCOP = 0x%"UVxf"\n", PTR2UV(cx->blk_oldcop)); @@ -1200,7 +1201,21 @@ Perl_cx_dump(pTHX_ PERL_CONTEXT *cx) PerlIO_printf(Perl_debug_log, "BLK_OLDSCOPESP = %ld\n", (long)cx->blk_oldscopesp); PerlIO_printf(Perl_debug_log, "BLK_OLDPM = 0x%"UVxf"\n", PTR2UV(cx->blk_oldpm)); - PerlIO_printf(Perl_debug_log, "BLK_GIMME = %s\n", cx->blk_gimme ? "LIST" : "SCALAR"); + switch (cx->blk_gimme) { + case G_VOID: + gimme_text = "VOID"; + break; + case G_SCALAR: + gimme_text = "SCALAR"; + break; + case G_ARRAY: + gimme_text = "LIST"; + break; + default: + gimme_text = "UNKNOWN"; + break; + } + PerlIO_printf(Perl_debug_log, "BLK_GIMME = %s\n", gimme_text); } switch (CxTYPE(cx)) { case CXt_NULL: -- Perl5 Master Repository
