newPADOP is only used under ithreads, so don't waste space by compiling
Nicholas Clark [Sat, 27 Jan 2007 15:36:49 +0000 (15:36 +0000)]
it for non-threaded builds.

p4raw-id: //depot/perl@30032

embed.fnc
embed.h
makedef.pl
op.c
proto.h

index fa499bf..a51b6b0 100644 (file)
--- 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 (file)
--- a/embed.h
+++ b/embed.h
 #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
 #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)
index ceb6e3f..ea06236 100644 (file)
@@ -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 (file)
--- 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 (file)
--- 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__;