This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
parts/inc/mess: Don't 'provide' a porting test macro
authorKarl Williamson <khw@cpan.org>
Tue, 6 Aug 2019 04:49:01 +0000 (22:49 -0600)
committerNicolas R <atoomic@cpan.org>
Fri, 27 Sep 2019 22:51:28 +0000 (16:51 -0600)
This macro is not for public consumptions, but only for porting tests.
Change so this file doesn't cause D:P to provide it.

(cherry picked from commit fdb67922468b8439f47c1c80bba2ad557bec5dc3)
Signed-off-by: Nicolas R <atoomic@cpan.org>
dist/Devel-PPPort/parts/inc/mess

index ef6024c..fc8d059 100644 (file)
@@ -28,8 +28,6 @@ Perl_croak_no_modify
 croak_memory_wrap
 croak_xs_usage
 
-PERL_ARGS_ASSERT_CROAK_XS_USAGE
-
 =dontwarn
 
 NEED_mess
@@ -203,9 +201,6 @@ mess_sv(pTHX_ SV *basemsg, bool consume)
 #ifndef croak_xs_usage
 #if { NEED croak_xs_usage }
 
-#ifndef PERL_ARGS_ASSERT_CROAK_XS_USAGE
-#define PERL_ARGS_ASSERT_CROAK_XS_USAGE assert(cv); assert(params)
-#endif
 
 void
 croak_xs_usage(const CV *const cv, const char *const params)
@@ -213,7 +208,11 @@ croak_xs_usage(const CV *const cv, const char *const params)
     dTHX;
     const GV *const gv = CvGV(cv);
 
+#ifdef PERL_ARGS_ASSERT_CROAK_XS_USAGE
     PERL_ARGS_ASSERT_CROAK_XS_USAGE;
+#else
+     assert(cv); assert(params);
+#endif
 
     if (gv) {
         const char *const gvname = GvNAME(gv);