This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
parts/apicheck.pl: Use the passed NEED_foo macros
authorKarl Williamson <khw@cpan.org>
Thu, 15 Aug 2019 03:38:54 +0000 (21:38 -0600)
committerNicolas R <atoomic@cpan.org>
Fri, 27 Sep 2019 22:51:28 +0000 (16:51 -0600)
These no longer need to be hardcoded in two places when adding new ones.

(cherry picked from commit 867650c3a523c9e8f5014ba02ef52e88692a5302)
Signed-off-by: Nicolas R <atoomic@cpan.org>
dist/Devel-PPPort/parts/apicheck.pl

index 65b8217..268ada4 100644 (file)
@@ -148,7 +148,6 @@ my $sep = '~';
 # Things to not try to check.  (The component after $sep is empty.)
 my %ignore = map { ("$_$sep" => 1) } keys %{&known_but_hard_to_test_for()};
 
-# XXX The NEED_foo lines should be autogenerated
 print OUT <<HEAD;
 /*
  * !!!!!!!   DO NOT EDIT THIS FILE   !!!!!!!
@@ -172,41 +171,7 @@ print OUT <<HEAD;
 
 #else
 
-#define NEED_PL_parser
-#define NEED_PL_signals
-#define NEED_caller_cx
-#define NEED_croak_xs_usage
-#define NEED_die_sv
-#define NEED_eval_pv
-#define NEED_grok_bin
-#define NEED_grok_hex
-#define NEED_grok_number
-#define NEED_grok_numeric_radix
-#define NEED_grok_oct
-#define NEED_load_module
-#define NEED_mess
-#define NEED_mess_nocontext
-#define NEED_mess_sv
-#define NEED_mg_findext
-#define NEED_my_snprintf
-#define NEED_my_sprintf
-#define NEED_my_strlcat
-#define NEED_my_strlcpy
-#define NEED_my_strnlen
-#define NEED_newCONSTSUB
-#define NEED_newSVpvn_share
-#define NEED_pv_display
-#define NEED_pv_escape
-#define NEED_pv_pretty
-#define NEED_sv_catpvf_mg
-#define NEED_sv_catpvf_mg_nocontext
-#define NEED_sv_setpvf_mg
-#define NEED_sv_setpvf_mg_nocontext
-#define NEED_sv_unmagicext
-#define NEED_utf8_to_uvchr_buf
-#define NEED_vload_module
-#define NEED_vmess
-#define NEED_warner
+$ENV{'DPPP_NEED'}    /* All the requisite NEED_foo #defines */
 
 #include "ppport.h"