summaryrefslogtreecommitdiff
path: root/embed.h
diff options
context:
space:
mode:
authorFather Chrysostomos <sprout@cpan.org>2011-11-21 16:12:50 -0800
committerFather Chrysostomos <sprout@cpan.org>2011-11-21 16:24:45 -0800
commit8f82b567179d2b438689e3b9818104ecfaee6373 (patch)
treeb73e2fd6e0a32ce326053af217d6cf2481eb21a9 /embed.h
parentfeb8397238ac35fa664623f94191b2f117ff687e (diff)
downloadperl-8f82b567179d2b438689e3b9818104ecfaee6373.tar.gz
Make const redef warnings default in newXS
There is no reason why constant redefinition warnings should be default warnings for sub foo(){1}, but not for newCONSTSUB (which calls newXS, which triggers the warning). To make this work properly, I also had to import sv.c’s ‘are these const subs from the same SV originally?’ logic. Constants created with XS can have NULL for the SV (they return an empty list or &PL_sv_undef), which means sv.c’s logic will stop *this=\&that from warning if both this and that are such XS-created constants. newCONSTSUB needed to be consistent with that. It required tweaking a test I added a few commits ago, which arguably shouldn’t have warned the way it was written. As of this commit (and before it, too, come to think of it), newXS_len_flags’s calling convention is quite awful and would need to be throughly re-thunk before being made into an API, or probably sim- ply never made into an API.
Diffstat (limited to 'embed.h')
-rw-r--r--embed.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/embed.h b/embed.h
index e591762917..75960ede9e 100644
--- a/embed.h
+++ b/embed.h
@@ -1137,7 +1137,7 @@
#define my_stat_flags(a) Perl_my_stat_flags(aTHX_ a)
#define my_swabn Perl_my_swabn
#define my_unexec() Perl_my_unexec(aTHX)
-#define newXS_len_flags(a,b,c,d,e,f) Perl_newXS_len_flags(aTHX_ a,b,c,d,e,f)
+#define newXS_len_flags(a,b,c,d,e,f,g) Perl_newXS_len_flags(aTHX_ a,b,c,d,e,f,g)
#define nextargv(a) Perl_nextargv(aTHX_ a)
#define oopsAV(a) Perl_oopsAV(aTHX_ a)
#define oopsHV(a) Perl_oopsHV(aTHX_ a)