From: Nicholas Clark Date: Sat, 27 Jan 2007 15:36:49 +0000 (+0000) Subject: newPADOP is only used under ithreads, so don't waste space by compiling X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=392d04bb758cd08529ab92bc6bac169774c64676;p=p5sagit%2Fp5-mst-13.2.git newPADOP is only used under ithreads, so don't waste space by compiling it for non-threaded builds. p4raw-id: //depot/perl@30032 --- diff --git a/embed.fnc b/embed.fnc index fa499bf..a51b6b0 100644 --- a/embed.fnc +++ b/embed.fnc @@ -566,7 +566,9 @@ ApdaR |HV* |newHV ApaR |HV* |newHVhv |NULLOK HV* hv Apa |IO* |newIO Apa |OP* |newLISTOP |I32 type|I32 flags|NULLOK OP* first|NULLOK OP* last +#ifdef USE_ITHREADS Apa |OP* |newPADOP |I32 type|I32 flags|NULLOK SV* sv +#endif Apa |OP* |newPMOP |I32 type|I32 flags Apa |OP* |newPVOP |I32 type|I32 flags|NULLOK char* pv Apa |SV* |newRV |NN SV* sv diff --git a/embed.h b/embed.h index 998d73e..a2f4230 100644 --- a/embed.h +++ b/embed.h @@ -562,7 +562,9 @@ #define newHVhv Perl_newHVhv #define newIO Perl_newIO #define newLISTOP Perl_newLISTOP +#ifdef USE_ITHREADS #define newPADOP Perl_newPADOP +#endif #define newPMOP Perl_newPMOP #define newPVOP Perl_newPVOP #define newRV Perl_newRV @@ -2775,7 +2777,9 @@ #define newHVhv(a) Perl_newHVhv(aTHX_ a) #define newIO() Perl_newIO(aTHX) #define newLISTOP(a,b,c,d) Perl_newLISTOP(aTHX_ a,b,c,d) +#ifdef USE_ITHREADS #define newPADOP(a,b,c) Perl_newPADOP(aTHX_ a,b,c) +#endif #define newPMOP(a,b) Perl_newPMOP(aTHX_ a,b) #define newPVOP(a,b,c) Perl_newPVOP(aTHX_ a,b,c) #define newRV(a) Perl_newRV(aTHX_ a) diff --git a/makedef.pl b/makedef.pl index ceb6e3f..ea06236 100644 --- a/makedef.pl +++ b/makedef.pl @@ -746,6 +746,7 @@ unless ($define{'USE_ITHREADS'}) { Perl_sharedsv_unlock Perl_stashpv_hvname_match Perl_regdupe_internal + Perl_newPADOP )]; } diff --git a/op.c b/op.c index 14f1a7d..8c5891f 100644 --- a/op.c +++ b/op.c @@ -3421,6 +3421,7 @@ Perl_newSVOP(pTHX_ I32 type, I32 flags, SV *sv) return CHECKOP(type, svop); } +#ifdef USE_ITHREADS OP * Perl_newPADOP(pTHX_ I32 type, I32 flags, SV *sv) { @@ -3442,6 +3443,7 @@ Perl_newPADOP(pTHX_ I32 type, I32 flags, SV *sv) padop->op_targ = pad_alloc(type, SVs_PADTMP); return CHECKOP(type, padop); } +#endif OP * Perl_newGVOP(pTHX_ I32 type, I32 flags, GV *gv) diff --git a/proto.h b/proto.h index b96cb8b..a76e001 100644 --- a/proto.h +++ b/proto.h @@ -1549,10 +1549,12 @@ PERL_CALLCONV OP* Perl_newLISTOP(pTHX_ I32 type, I32 flags, OP* first, OP* last) __attribute__malloc__ __attribute__warn_unused_result__; +#ifdef USE_ITHREADS PERL_CALLCONV OP* Perl_newPADOP(pTHX_ I32 type, I32 flags, SV* sv) __attribute__malloc__ __attribute__warn_unused_result__; +#endif PERL_CALLCONV OP* Perl_newPMOP(pTHX_ I32 type, I32 flags) __attribute__malloc__ __attribute__warn_unused_result__;