From: Jarkko Hietaniemi Date: Sat, 24 Nov 2001 21:45:32 +0000 (+0000) Subject: The debug_pag needs to be visible at all times X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=128e8167dcdd0091242ba8e29bb716abeb5fe027;p=p5sagit%2Fp5-mst-13.2.git The debug_pag needs to be visible at all times because of the re extension. p4raw-id: //depot/perl@13246 --- diff --git a/intrpvar.h b/intrpvar.h index a8695f5..501f0d3 100644 --- a/intrpvar.h +++ b/intrpvar.h @@ -502,9 +502,7 @@ PERLVARI(Idef_layerlist, PerlIO_list_t *,NULL) PERLVARI(Iencoding, SV*, Nullsv) /* character encoding */ -#ifdef DEBUGGING -PERLVAR(Idebug_pad, struct perl_debug_pad) -#endif +PERLVAR(Idebug_pad, struct perl_debug_pad) /* always needed because of the re extension */ /* New variables must be added to the very end for binary compatibility. * XSUB.h provides wrapper functions via perlapi.h that make this diff --git a/makedef.pl b/makedef.pl index f88f52e..40ede54 100644 --- a/makedef.pl +++ b/makedef.pl @@ -424,7 +424,6 @@ unless ($define{'DEBUGGING'}) { Perl_debstackptrs Perl_sv_peek PL_block_type - PL_debug_pad PL_watchaddr PL_watchok )]; diff --git a/perl.c b/perl.c index 13c7d31..14fda35 100644 --- a/perl.c +++ b/perl.c @@ -273,12 +273,6 @@ perl_construct(pTHXx) New(31337, PL_reentrant_buffer->tmbuff,1, struct tm); #endif -#ifdef DEBUGGING - sv_setpvn(PERL_DEBUG_PAD(0), "", 0); - sv_setpvn(PERL_DEBUG_PAD(1), "", 0); - sv_setpvn(PERL_DEBUG_PAD(2), "", 0); -#endif - /* Note that strtab is a rather special HV. Assumptions are made about not iterating on it, and not adding tie magic to it. It is properly deallocated in perl_destruct() */ diff --git a/perl.h b/perl.h index 762ffda..7c51e93 100644 --- a/perl.h +++ b/perl.h @@ -3114,17 +3114,16 @@ enum { /* pass one of these to get_vtbl */ #define RsPARA(sv) (SvPOK(sv) && ! SvCUR(sv)) #define RsRECORD(sv) (SvROK(sv) && (SvIV(SvRV(sv)) > 0)) -#ifdef DEBUGGING -/* A struct for keeping various DEBUGGING related stuff +/* A struct for keeping various DEBUGGING related stuff, * neatly packed. Currently only scratch variables for - * constructing debug output are included. */ + * constructing debug output are included. Needed always, + * not just when DEBUGGING, though, because of the re extension. c*/ struct perl_debug_pad { SV pad[3]; }; #define PERL_DEBUG_PAD(i) &(PL_debug_pad.pad[i]) #define PERL_DEBUG_PAD_ZERO(i) (sv_setpvn(PERL_DEBUG_PAD(i), "", 0), PERL_DEBUG_PAD(i)) -#endif /* Enable variables which are pointers to functions */ typedef void (CPERLscope(*peep_t))(pTHX_ OP* o); diff --git a/regexec.c b/regexec.c index d161c1b..efdd8df 100644 --- a/regexec.c +++ b/regexec.c @@ -1943,6 +1943,12 @@ S_regtry(pTHX_ regexp *prog, char *startpos) New(22,PL_reg_start_tmp, PL_reg_start_tmpl, char*); } +#ifdef DEBUGGING + sv_setpvn(PERL_DEBUG_PAD(0), "", 0); + sv_setpvn(PERL_DEBUG_PAD(1), "", 0); + sv_setpvn(PERL_DEBUG_PAD(2), "", 0); +#endif + /* XXXX What this code is doing here?!!! There should be no need to do this again and again, PL_reglastparen should take care of this! --ilya*/