summaryrefslogtreecommitdiff
path: root/proto.h
diff options
context:
space:
mode:
authorFather Chrysostomos <sprout@cpan.org>2011-11-21 21:57:21 -0800
committerFather Chrysostomos <sprout@cpan.org>2011-11-21 21:57:58 -0800
commit156d738fbb36dec69a83032866786dd3b6a1c2e9 (patch)
treea538f4a9441b726a96c027a37101201d0758ba12 /proto.h
parent971c5244800c9017603979e4f5202b8e5e374b62 (diff)
downloadperl-156d738fbb36dec69a83032866786dd3b6a1c2e9.tar.gz
Put sub redef warnings in one place
The logic surrounding subroutine redefinition warnings (to warn or not to warn?) was in three places. Over time, they drifted apart, to the point that newXS was following completely different rules. It was only warning for redefinition of functions in the autouse namespace. Recent commits have brought it into conformity with the other redefi- nition warnings. Obviously it’s about time we put it in one function.
Diffstat (limited to 'proto.h')
-rw-r--r--proto.h8
1 files changed, 8 insertions, 0 deletions
diff --git a/proto.h b/proto.h
index 19f52d58aa..0906acf0ed 100644
--- a/proto.h
+++ b/proto.h
@@ -5803,6 +5803,14 @@ STATIC void S_forget_pmop(pTHX_ PMOP *const o, U32 flags)
# endif
#endif
+#if defined(PERL_IN_OP_C) || defined(PERL_IN_SV_C)
+PERL_CALLCONV void Perl_report_redefined_cv(pTHX_ const SV *name, const CV *old_cv, SV * const *new_const_svp)
+ __attribute__nonnull__(pTHX_1)
+ __attribute__nonnull__(pTHX_2);
+#define PERL_ARGS_ASSERT_REPORT_REDEFINED_CV \
+ assert(name); assert(old_cv)
+
+#endif
#if defined(PERL_IN_PAD_C)
STATIC PADOFFSET S_pad_alloc_name(pTHX_ SV *namesv, U32 flags, HV *typestash, HV *ourstash)
__attribute__nonnull__(pTHX_1);