Re: [PATCH] add pTHX_ parameter to new_warnings_bitfield()
Steve Hay [Thu, 13 Apr 2006 10:27:52 +0000 (11:27 +0100)]
Message-ID: <443E1998.9090909@uk.radan.com>
Date: Thu, 13 Apr 2006 10:27:52 +0100

p4raw-id: //depot/perl@27784

embed.fnc
mg.c
perl.c
pp_ctl.c
proto.h
util.c

index 9133ed5..689ac51 100644 (file)
--- a/embed.fnc
+++ b/embed.fnc
@@ -1666,7 +1666,7 @@ Ap        |GV*    |gv_SVadd       |NN GV* gv
 #endif
 Apo    |bool   |ckwarn         |U32 w
 Apo    |bool   |ckwarn_d       |U32 w
-nopMa  |STRLEN *|new_warnings_bitfield|NULLOK STRLEN *buffer \
+opMa   |STRLEN *|new_warnings_bitfield|NULLOK STRLEN *buffer \
                                |NN const char *const bits|STRLEN size
 
 p      |void   |offer_nice_chunk       |NN void *chunk|U32 chunk_size
diff --git a/mg.c b/mg.c
index 1921902..d7105b5 100644 (file)
--- a/mg.c
+++ b/mg.c
@@ -2286,7 +2286,7 @@ Perl_magic_set(pTHX_ SV *sv, MAGIC *mg)
                        const char *const p = SvPV_const(sv, len);
 
                        PL_compiling.cop_warnings
-                           = Perl_new_warnings_bitfield(PL_compiling.cop_warnings,
+                           = Perl_new_warnings_bitfield(aTHX_ PL_compiling.cop_warnings,
                                                         p, len);
 
                        if (isWARN_on(PL_compiling.cop_warnings, WARN_ONCE))
diff --git a/perl.c b/perl.c
index 83baace..a8fd47f 100644 (file)
--- a/perl.c
+++ b/perl.c
@@ -2038,7 +2038,7 @@ S_parse_body(pTHX_ char **env, XSINIT_t xsinit)
 
     if (PL_taint_warn && PL_dowarn != G_WARN_ALL_OFF) {
         PL_compiling.cop_warnings
-           = Perl_new_warnings_bitfield(NULL, WARN_TAINTstring, WARNsize);
+           = Perl_new_warnings_bitfield(aTHX_ NULL, WARN_TAINTstring, WARNsize);
     }
 
     if (!scriptname)
index 19c2ac5..5288c66 100644 (file)
--- a/pp_ctl.c
+++ b/pp_ctl.c
@@ -3370,7 +3370,7 @@ PP(pp_require)
         PL_compiling.cop_warnings = pWARN_NONE ;
     else if (PL_taint_warn) {
         PL_compiling.cop_warnings
-           = Perl_new_warnings_bitfield(NULL, WARN_TAINTstring, WARNsize);
+           = Perl_new_warnings_bitfield(aTHX_ NULL, WARN_TAINTstring, WARNsize);
     }
     else
         PL_compiling.cop_warnings = pWARN_STD ;
diff --git a/proto.h b/proto.h
index 7153481..2f5e23e 100644 (file)
--- a/proto.h
+++ b/proto.h
@@ -4294,10 +4294,10 @@ PERL_CALLCONV GV*       Perl_gv_SVadd(pTHX_ GV* gv)
 #endif
 PERL_CALLCONV bool     Perl_ckwarn(pTHX_ U32 w);
 PERL_CALLCONV bool     Perl_ckwarn_d(pTHX_ U32 w);
-PERL_CALLCONV STRLEN * Perl_new_warnings_bitfield(STRLEN *buffer, const char *const bits, STRLEN size)
+PERL_CALLCONV STRLEN * Perl_new_warnings_bitfield(pTHX_ STRLEN *buffer, const char *const bits, STRLEN size)
                        __attribute__malloc__
                        __attribute__warn_unused_result__
-                       __attribute__nonnull__(2);
+                       __attribute__nonnull__(pTHX_2);
 
 
 PERL_CALLCONV void     Perl_offer_nice_chunk(pTHX_ void *chunk, U32 chunk_size)
diff --git a/util.c b/util.c
index abd0db9..32aac26 100644 (file)
--- a/util.c
+++ b/util.c
@@ -1533,7 +1533,7 @@ Perl_ckwarn_d(pTHX_ U32 w)
 
 /* Set buffer=NULL to get a new one.  */
 STRLEN *
-Perl_new_warnings_bitfield(STRLEN *buffer, const char *const bits,
+Perl_new_warnings_bitfield(pTHX_ STRLEN *buffer, const char *const bits,
                           STRLEN size) {
     const MEM_SIZE len_wanted = sizeof(STRLEN) + size;