3 # Regenerate (overwriting only if changed):
12 # from information stored in
17 # pp.sym (which has been generated by opcode.pl)
19 # plus from the values hardcoded into this script in @extvars.
21 # Accepts the standard regen_lib -q and -v args.
23 # This script is normally invoked from regen.pl.
25 require 5.003; # keep this compatible, an old perl is all we may have before
26 # we build the new one
31 # Get function prototypes
32 require 'regen_lib.pl';
35 my $SPLINT = 0; # Turn true for experimental splint support http://www.splint.org
38 # See database of global and static function prototypes in embed.fnc
39 # This is used to generate prototype headers under various configurations,
40 # export symbols lists for different platforms, and macros to provide an
41 # implicit interpreter context argument.
48 my $years = '1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009';
50 $years =~ s/1999,/1999,\n / if length $years > 40;
53 -*- buffer-read-only: t -*-
57 Copyright (C) $years, by Larry Wall and others
59 You may distribute under the terms of either the GNU General Public
60 License or the Artistic License, as specified in the README file.
62 !!!!!!! DO NOT EDIT THIS FILE !!!!!!!
63 This file is built by embed.pl from data in embed.fnc, embed.pl,
64 pp.sym, intrpvar.h, and perlvars.h.
65 Any changes made here will be lost!
67 Edit those files and run 'make regen_headers' to effect changes.
71 $warning .= <<EOW if $file eq 'perlapi.c';
73 Up to the threshold of the door there mounted a flight of twenty-seven
74 broad stairs, hewn by some unknown art of the same black stone. This
75 was the only entrance to the tower; ...
77 [p.577 of _The Lord of the Rings_, III/x: "The Voice of Saruman"]
82 if ($file =~ m:\.[ch]$:) {
83 $warning =~ s:^: * :gm;
84 $warning =~ s: +$::gm;
89 $warning =~ s:^:# :gm;
90 $warning =~ s: +$::gm;
95 open IN, "embed.fnc" or die $!;
97 # walk table providing an array of components in each line to
98 # subroutine, printing the result
100 my $function = shift;
101 my $filename = shift || '-';
103 defined $leader or $leader = do_not_edit ($filename);
106 if (ref $filename) { # filehandle
110 # safer_unlink $filename if $filename ne '/dev/null';
111 $F = safer_open("$filename-new");
113 print $F $leader if $leader;
114 seek IN, 0, 0; # so we may restart
128 @args = split /\s*\|\s*/, $_;
130 my @outs = &{$function}(@args);
131 print $F @outs; # $function->(@args) is not 5.003
133 print $F $trailer if $trailer;
134 unless (ref $filename) {
136 rename_if_different("$filename-new", $filename);
140 sub munge_c_files () {
143 warn "\@ARGV empty, nothing to do\n";
148 $functions->{$_[2]} = \@_ if $_[@_-1] =~ /\.\.\./;
150 } '/dev/null', '', '';
153 s{(\b(\w+)[ \t]*\([ \t]*(?!aTHX))}
157 if (exists $functions->{$f}) {
159 warn("$ARGV:$.:$`#$repl#$'");
164 close ARGV if eof; # restart $.
172 my $wrote_protected = 0;
181 my ($flags,$retval,$plain_func,@args) = @_;
183 my $has_context = ( $flags !~ /n/ );
184 my $never_returns = ( $flags =~ /r/ );
185 my $commented_out = ( $flags =~ /m/ );
186 my $binarycompat = ( $flags =~ /b/ );
187 my $is_malloc = ( $flags =~ /a/ );
188 my $can_ignore = ( $flags !~ /R/ ) && !$is_malloc;
192 my $splint_flags = "";
193 if ( $SPLINT && !$commented_out ) {
194 $splint_flags .= '/*@noreturn@*/ ' if $never_returns;
195 if ($can_ignore && ($retval ne 'void') && ($retval !~ /\*/)) {
196 $retval .= " /*\@alt void\@*/";
201 $retval = "STATIC $splint_flags$retval";
202 $func = "S_$plain_func";
205 $retval = "PERL_CALLCONV $splint_flags$retval";
206 if ($flags =~ /[bp]/) {
207 $func = "Perl_$plain_func";
212 $ret .= "$retval\t$func(";
213 if ( $has_context ) {
214 $ret .= @args ? "pTHX_ " : "pTHX";
218 for my $arg ( @args ) {
220 if ( $arg =~ /\*/ && $arg !~ /\b(NN|NULLOK)\b/ ) {
221 warn "$func: $arg needs NN or NULLOK\n";
222 our $unflagged_pointers;
223 ++$unflagged_pointers;
225 my $nn = ( $arg =~ s/\s*\bNN\b\s+// );
226 push( @nonnull, $n ) if $nn;
228 my $nullok = ( $arg =~ s/\s*\bNULLOK\b\s+// ); # strip NULLOK with no effect
230 # Make sure each arg has at least a type and a var name.
231 # An arg of "int" is valid C, but want it to be "int foo".
233 $temp_arg =~ s/\*//g;
234 $temp_arg =~ s/\s*\bstruct\b\s*/ /g;
235 if ( ($temp_arg ne "...")
236 && ($temp_arg !~ /\w+\s+(\w+)(?:\[\d+\])?\s*$/) ) {
237 warn "$func: $arg ($n) doesn't have a name\n";
239 if ( $SPLINT && $nullok && !$commented_out ) {
240 $arg = '/*@null@*/ ' . $arg;
242 if (defined $1 && $nn && !($commented_out && !$binarycompat)) {
243 push @names_of_nn, $1;
246 $ret .= join ", ", @args;
249 $ret .= "void" if !$has_context;
253 if ( $flags =~ /r/ ) {
254 push @attrs, "__attribute__noreturn__";
256 if ( $flags =~ /D/ ) {
257 push @attrs, "__attribute__deprecated__";
260 push @attrs, "__attribute__malloc__";
262 if ( !$can_ignore ) {
263 push @attrs, "__attribute__warn_unused_result__";
265 if ( $flags =~ /P/ ) {
266 push @attrs, "__attribute__pure__";
268 if( $flags =~ /f/ ) {
269 my $prefix = $has_context ? 'pTHX_' : '';
270 my $args = scalar @args;
272 my $macro = @nonnull && $nonnull[-1] == $pat
273 ? '__attribute__format__'
274 : '__attribute__format__null_ok__';
275 push @attrs, sprintf "%s(__printf__,%s%d,%s%d)", $macro,
276 $prefix, $pat, $prefix, $args;
279 my @pos = map { $has_context ? "pTHX_$_" : $_ } @nonnull;
280 push @attrs, map { sprintf( "__attribute__nonnull__(%s)", $_ ) } @pos;
284 $ret .= join( "\n", map { "\t\t\t$_" } @attrs );
287 $ret = "/* $ret */" if $commented_out;
289 $ret .= "\n#define PERL_ARGS_ASSERT_\U$plain_func\E\t\\\n\t"
290 . join '; ', map "assert($_)", @names_of_nn;
292 $ret .= @attrs ? "\n\n" : "\n";
297 # generates global.sym (API export list)
300 sub write_global_sym {
303 my ($flags,$retval,$func,@args) = @_;
304 # If a function is defined twice, for example before and after an
305 # #else, only process the flags on the first instance for global.sym
306 return $ret if $seen{$func}++;
307 if ($flags =~ /[AX]/ && $flags !~ /[xm]/
308 || $flags =~ /b/) { # public API, so export
309 $func = "Perl_$func" if $flags =~ /[pbX]/;
318 our $unflagged_pointers;
319 walk_table(\&write_protos, "proto.h", undef, "/* ex: set ro: */\n");
320 warn "$unflagged_pointers pointer arguments to clean up\n" if $unflagged_pointers;
321 walk_table(\&write_global_sym, "global.sym", undef, "# ex: set ro:\n");
323 # XXX others that may need adding
327 my @extvars = qw(sv_undef sv_yes sv_no na dowarn
329 tainting tainted stack_base stack_sp sv_arenaroot
331 curstash DBsub DBsingle DBassertion debstash
345 my ($syms, $file) = @_;
347 open(FILE, "< $file")
348 or die "embed.pl: Can't open $file: $!\n";
350 s/[ \t]*#.*//; # Delete comments.
351 if (/^\s*(\S+)\s*$/) {
353 warn "duplicate symbol $sym while processing $file line $.\n"
354 if exists $$syms{$sym};
361 # Perl_pp_* and Perl_ck_* are in pp.sym
362 readsyms my %ppsym, 'pp.sym';
364 sub readvars(\%$$@) {
365 my ($syms, $file,$pre,$keep_pre) = @_;
367 open(FILE, "< $file")
368 or die "embed.pl: Can't open $file: $!\n";
370 s/[ \t]*#.*//; # Delete comments.
371 if (/PERLVARA?I?S?C?\($pre(\w+)/) {
373 $sym = $pre . $sym if $keep_pre;
374 warn "duplicate symbol $sym while processing $file line $.\n"
375 if exists $$syms{$sym};
376 $$syms{$sym} = $pre || 1;
385 readvars %intrp, 'intrpvar.h','I';
386 readvars %globvar, 'perlvars.h','G';
396 my ($from, $to) = @_;
397 my $t = int(length($from) / 8);
398 "#define $from" . "\t" x ($t < 3 ? 3 - $t : 1) . "$to\n";
401 sub bincompat_var ($$) {
402 my ($pfx, $sym) = @_;
403 my $arg = ($pfx eq 'G' ? 'NULL' : 'aTHX');
404 undefine("PL_$sym") . hide("PL_$sym", "(*Perl_${pfx}${sym}_ptr($arg))");
408 my ($sym,$pre,$ptr) = @_;
409 hide("PL_$sym", "($ptr$pre$sym)");
414 return hide("PL_$pre$sym", "PL_$sym");
417 my $em = safer_open('embed.h-new');
419 print $em do_not_edit ("embed.h"), <<'END';
421 /* (Doing namespace management portably in C is really gross.) */
423 /* By defining PERL_NO_SHORT_NAMES (not done by default) the short forms
424 * (like warn instead of Perl_warn) for the API are not defined.
425 * Not defining the short forms is a good thing for cleaner embedding. */
427 #ifndef PERL_NO_SHORT_NAMES
429 /* Hide global symbols */
431 #if !defined(PERL_IMPLICIT_CONTEXT)
435 # Try to elimiate lots of repeated
442 # by tracking state and merging foo and bar into one block.
443 my $ifdef_state = '';
447 my $new_ifdef_state = '';
450 $ret .= "$arg\n" if $arg =~ /^#\s*(if|ifn?def|else|endif)\b/;
453 my ($flags,$retval,$func,@args) = @_;
454 unless ($flags =~ /[om]/) {
456 $ret .= hide($func,"S_$func");
458 elsif ($flags =~ /p/) {
459 $ret .= hide($func,"Perl_$func");
462 if ($ret ne '' && $flags !~ /A/) {
465 = "#if defined(PERL_CORE) || defined(PERL_EXT)\n";
468 $new_ifdef_state = "#ifdef PERL_CORE\n";
471 if ($new_ifdef_state ne $ifdef_state) {
472 $ret = $new_ifdef_state . $ret;
476 if ($ifdef_state && $new_ifdef_state ne $ifdef_state) {
477 # Close the old one ahead of opening the new one.
478 $ret = "#endif\n$ret";
480 # Remember the new state.
481 $ifdef_state = $new_ifdef_state;
486 print $em "#endif\n";
489 for $sym (sort keys %ppsym) {
491 print $em hide($sym, "Perl_$sym");
496 #else /* PERL_IMPLICIT_CONTEXT */
505 my $new_ifdef_state = '';
508 $ret .= "$arg\n" if $arg =~ /^#\s*(if|ifn?def|else|endif)\b/;
511 my ($flags,$retval,$func,@args) = @_;
512 unless ($flags =~ /[om]/) {
513 my $args = scalar @args;
514 if ($args and $args[$args-1] =~ /\.\.\./) {
515 # we're out of luck for varargs functions under CPP
517 elsif ($flags =~ /n/) {
519 $ret .= hide($func,"S_$func");
521 elsif ($flags =~ /p/) {
522 $ret .= hide($func,"Perl_$func");
526 my $alist = join(",", @az[0..$args-1]);
527 $ret = "#define $func($alist)";
528 my $t = int(length($ret) / 8);
529 $ret .= "\t" x ($t < 4 ? 4 - $t : 1);
531 $ret .= "S_$func(aTHX";
533 elsif ($flags =~ /p/) {
534 $ret .= "Perl_$func(aTHX";
536 $ret .= "_ " if $alist;
537 $ret .= $alist . ")\n";
540 unless ($flags =~ /A/) {
543 = "#if defined(PERL_CORE) || defined(PERL_EXT)\n";
546 $new_ifdef_state = "#ifdef PERL_CORE\n";
549 if ($new_ifdef_state ne $ifdef_state) {
550 $ret = $new_ifdef_state . $ret;
554 if ($ifdef_state && $new_ifdef_state ne $ifdef_state) {
555 # Close the old one ahead of opening the new one.
556 $ret = "#endif\n$ret";
558 # Remember the new state.
559 $ifdef_state = $new_ifdef_state;
564 print $em "#endif\n";
567 for $sym (sort keys %ppsym) {
569 if ($sym =~ /^ck_/) {
570 print $em hide("$sym(a)", "Perl_$sym(aTHX_ a)");
572 elsif ($sym =~ /^pp_/) {
573 print $em hide("$sym()", "Perl_$sym(aTHX)");
576 warn "Illegal symbol '$sym' in pp.sym";
582 #endif /* PERL_IMPLICIT_CONTEXT */
584 #endif /* #ifndef PERL_NO_SHORT_NAMES */
590 /* Compatibility stubs. Compile extensions with -DPERL_NOCOMPAT to
594 #if !defined(PERL_CORE)
595 # define sv_setptrobj(rv,ptr,name) sv_setref_iv(rv,name,PTR2IV(ptr))
596 # define sv_setptrref(rv,ptr) sv_setref_iv(rv,NULL,PTR2IV(ptr))
599 #if !defined(PERL_CORE) && !defined(PERL_NOCOMPAT)
601 /* Compatibility for various misnamed functions. All functions
602 in the API that begin with "perl_" (not "Perl_") take an explicit
603 interpreter context pointer.
604 The following are not like that, but since they had a "perl_"
605 prefix in previous versions, we provide compatibility macros.
607 # define perl_atexit(a,b) call_atexit(a,b)
608 # define perl_call_argv(a,b,c) call_argv(a,b,c)
609 # define perl_call_pv(a,b) call_pv(a,b)
610 # define perl_call_method(a,b) call_method(a,b)
611 # define perl_call_sv(a,b) call_sv(a,b)
612 # define perl_eval_sv(a,b) eval_sv(a,b)
613 # define perl_eval_pv(a,b) eval_pv(a,b)
614 # define perl_require_pv(a) require_pv(a)
615 # define perl_get_sv(a,b) get_sv(a,b)
616 # define perl_get_av(a,b) get_av(a,b)
617 # define perl_get_hv(a,b) get_hv(a,b)
618 # define perl_get_cv(a,b) get_cv(a,b)
619 # define perl_init_i18nl10n(a) init_i18nl10n(a)
620 # define perl_init_i18nl14n(a) init_i18nl14n(a)
621 # define perl_new_ctype(a) new_ctype(a)
622 # define perl_new_collate(a) new_collate(a)
623 # define perl_new_numeric(a) new_numeric(a)
625 /* varargs functions can't be handled with CPP macros. :-(
626 This provides a set of compatibility functions that don't take
627 an extra argument but grab the context pointer using the macro
630 #if defined(PERL_IMPLICIT_CONTEXT) && !defined(PERL_NO_SHORT_NAMES)
631 # define croak Perl_croak_nocontext
632 # define deb Perl_deb_nocontext
633 # define die Perl_die_nocontext
634 # define form Perl_form_nocontext
635 # define load_module Perl_load_module_nocontext
636 # define mess Perl_mess_nocontext
637 # define newSVpvf Perl_newSVpvf_nocontext
638 # define sv_catpvf Perl_sv_catpvf_nocontext
639 # define sv_setpvf Perl_sv_setpvf_nocontext
640 # define warn Perl_warn_nocontext
641 # define warner Perl_warner_nocontext
642 # define sv_catpvf_mg Perl_sv_catpvf_mg_nocontext
643 # define sv_setpvf_mg Perl_sv_setpvf_mg_nocontext
646 #endif /* !defined(PERL_CORE) && !defined(PERL_NOCOMPAT) */
648 #if !defined(PERL_IMPLICIT_CONTEXT)
649 /* undefined symbols, point them back at the usual ones */
650 # define Perl_croak_nocontext Perl_croak
651 # define Perl_die_nocontext Perl_die
652 # define Perl_deb_nocontext Perl_deb
653 # define Perl_form_nocontext Perl_form
654 # define Perl_load_module_nocontext Perl_load_module
655 # define Perl_mess_nocontext Perl_mess
656 # define Perl_newSVpvf_nocontext Perl_newSVpvf
657 # define Perl_sv_catpvf_nocontext Perl_sv_catpvf
658 # define Perl_sv_setpvf_nocontext Perl_sv_setpvf
659 # define Perl_warn_nocontext Perl_warn
660 # define Perl_warner_nocontext Perl_warner
661 # define Perl_sv_catpvf_mg_nocontext Perl_sv_catpvf_mg
662 # define Perl_sv_setpvf_mg_nocontext Perl_sv_setpvf_mg
669 rename_if_different('embed.h-new', 'embed.h');
671 $em = safer_open('embedvar.h-new');
673 print $em do_not_edit ("embedvar.h"), <<'END';
675 /* (Doing namespace management portably in C is really gross.) */
678 The following combinations of MULTIPLICITY and PERL_IMPLICIT_CONTEXT
681 2) MULTIPLICITY # supported for compatibility
682 3) MULTIPLICITY && PERL_IMPLICIT_CONTEXT
684 All other combinations of these flags are errors.
686 only #3 is supported directly, while #2 is a special
687 case of #3 (supported by redefining vTHX appropriately).
690 #if defined(MULTIPLICITY)
691 /* cases 2 and 3 above */
693 # if defined(PERL_IMPLICIT_CONTEXT)
696 # define vTHX PERL_GET_INTERP
701 for $sym (sort keys %intrp) {
702 print $em multon($sym,'I','vTHX->');
707 #else /* !MULTIPLICITY */
713 for $sym (sort keys %intrp) {
714 print $em multoff($sym,'I');
723 #endif /* MULTIPLICITY */
725 #if defined(PERL_GLOBAL_STRUCT)
729 for $sym (sort keys %globvar) {
730 print $em multon($sym, 'G','my_vars->');
731 print $em multon("G$sym",'', 'my_vars->');
736 #else /* !PERL_GLOBAL_STRUCT */
740 for $sym (sort keys %globvar) {
741 print $em multoff($sym,'G');
746 #endif /* PERL_GLOBAL_STRUCT */
748 #ifdef PERL_POLLUTE /* disabled by default in 5.6.0 */
752 for $sym (sort @extvars) {
753 print $em hide($sym,"PL_$sym");
758 #endif /* PERL_POLLUTE */
764 rename_if_different('embedvar.h-new', 'embedvar.h');
766 my $capi = safer_open('perlapi.c-new');
767 my $capih = safer_open('perlapi.h-new');
769 print $capih do_not_edit ("perlapi.h"), <<'EOT';
771 /* declare accessor functions for Perl variables */
772 #ifndef __perlapi_h__
773 #define __perlapi_h__
775 #if defined (MULTIPLICITY)
784 #define PERLVAR(v,t) EXTERN_C t* Perl_##v##_ptr(pTHX);
785 #define PERLVARA(v,n,t) typedef t PL_##v##_t[n]; \
786 EXTERN_C PL_##v##_t* Perl_##v##_ptr(pTHX);
787 #define PERLVARI(v,t,i) PERLVAR(v,t)
788 #define PERLVARIC(v,t,i) PERLVAR(v, const t)
789 #define PERLVARISC(v,i) typedef const char PL_##v##_t[sizeof(i)]; \
790 EXTERN_C PL_##v##_t* Perl_##v##_ptr(pTHX);
792 #include "intrpvar.h"
793 #include "perlvars.h"
801 #ifndef PERL_GLOBAL_STRUCT
802 EXTERN_C Perl_ppaddr_t** Perl_Gppaddr_ptr(pTHX);
803 EXTERN_C Perl_check_t** Perl_Gcheck_ptr(pTHX);
804 EXTERN_C unsigned char** Perl_Gfold_locale_ptr(pTHX);
805 #define Perl_ppaddr_ptr Perl_Gppaddr_ptr
806 #define Perl_check_ptr Perl_Gcheck_ptr
807 #define Perl_fold_locale_ptr Perl_Gfold_locale_ptr
812 #if defined(PERL_CORE)
814 /* accessor functions for Perl variables (provide binary compatibility) */
816 /* these need to be mentioned here, or most linkers won't put them in
817 the perl executable */
819 #ifndef PERL_NO_FORCE_LINK
824 EXTCONST void * const PL_force_link_funcs[];
826 EXTCONST void * const PL_force_link_funcs[] = {
831 #define PERLVAR(v,t) (void*)Perl_##v##_ptr,
832 #define PERLVARA(v,n,t) PERLVAR(v,t)
833 #define PERLVARI(v,t,i) PERLVAR(v,t)
834 #define PERLVARIC(v,t,i) PERLVAR(v,t)
835 #define PERLVARISC(v,i) PERLVAR(v,char)
837 /* In Tru64 (__DEC && __osf__) the cc option -std1 causes that one
838 * cannot cast between void pointers and function pointers without
839 * info level warnings. The PL_force_link_funcs[] would cause a few
840 * hundred of those warnings. In code one can circumnavigate this by using
841 * unions that overlay the different pointers, but in declarations one
842 * cannot use this trick. Therefore we just disable the warning here
843 * for the duration of the PL_force_link_funcs[] declaration. */
845 #if defined(__DECC) && defined(__osf__)
847 #pragma message disable (nonstandcast)
850 #include "intrpvar.h"
851 #include "perlvars.h"
853 #if defined(__DECC) && defined(__osf__)
854 #pragma message restore
867 #endif /* PERL_NO_FORCE_LINK */
869 #else /* !PERL_CORE */
873 foreach $sym (sort keys %intrp) {
874 print $capih bincompat_var('I',$sym);
877 foreach $sym (sort keys %globvar) {
878 print $capih bincompat_var('G',$sym);
881 print $capih <<'EOT';
883 #endif /* !PERL_CORE */
884 #endif /* MULTIPLICITY */
886 #endif /* __perlapi_h__ */
891 rename_if_different('perlapi.h-new', 'perlapi.h');
893 print $capi do_not_edit ("perlapi.c"), <<'EOT';
899 #if defined (MULTIPLICITY)
901 /* accessor functions for Perl variables (provides binary compatibility) */
910 #define PERLVAR(v,t) t* Perl_##v##_ptr(pTHX) \
911 { dVAR; PERL_UNUSED_CONTEXT; return &(aTHX->v); }
912 #define PERLVARA(v,n,t) PL_##v##_t* Perl_##v##_ptr(pTHX) \
913 { dVAR; PERL_UNUSED_CONTEXT; return &(aTHX->v); }
915 #define PERLVARI(v,t,i) PERLVAR(v,t)
916 #define PERLVARIC(v,t,i) PERLVAR(v, const t)
917 #define PERLVARISC(v,i) PL_##v##_t* Perl_##v##_ptr(pTHX) \
918 { dVAR; PERL_UNUSED_CONTEXT; return &(aTHX->v); }
920 #include "intrpvar.h"
924 #define PERLVAR(v,t) t* Perl_##v##_ptr(pTHX) \
925 { dVAR; PERL_UNUSED_CONTEXT; return &(PL_##v); }
926 #define PERLVARA(v,n,t) PL_##v##_t* Perl_##v##_ptr(pTHX) \
927 { dVAR; PERL_UNUSED_CONTEXT; return &(PL_##v); }
930 #define PERLVARIC(v,t,i) \
931 const t* Perl_##v##_ptr(pTHX) \
932 { PERL_UNUSED_CONTEXT; return (const t *)&(PL_##v); }
933 #define PERLVARISC(v,i) PL_##v##_t* Perl_##v##_ptr(pTHX) \
934 { dVAR; PERL_UNUSED_CONTEXT; return &(PL_##v); }
935 #include "perlvars.h"
943 #ifndef PERL_GLOBAL_STRUCT
944 /* A few evil special cases. Could probably macrofy this. */
947 #undef PL_fold_locale
948 Perl_ppaddr_t** Perl_Gppaddr_ptr(pTHX) {
949 static Perl_ppaddr_t* const ppaddr_ptr = PL_ppaddr;
951 return (Perl_ppaddr_t**)&ppaddr_ptr;
953 Perl_check_t** Perl_Gcheck_ptr(pTHX) {
954 static Perl_check_t* const check_ptr = PL_check;
956 return (Perl_check_t**)&check_ptr;
958 unsigned char** Perl_Gfold_locale_ptr(pTHX) {
959 static unsigned char* const fold_locale_ptr = PL_fold_locale;
961 return (unsigned char**)&fold_locale_ptr;
967 #endif /* MULTIPLICITY */
973 rename_if_different('perlapi.c-new', 'perlapi.c');
975 # functions that take va_list* for implementing vararg functions
976 # NOTE: makedef.pl must be updated if you add symbols to %vfuncs
977 # XXX %vfuncs currently unused
979 Perl_croak Perl_vcroak
981 Perl_warner Perl_vwarner
984 Perl_load_module Perl_vload_module
987 Perl_newSVpvf Perl_vnewSVpvf
988 Perl_sv_setpvf Perl_sv_vsetpvf
989 Perl_sv_setpvf_mg Perl_sv_vsetpvf_mg
990 Perl_sv_catpvf Perl_sv_vcatpvf
991 Perl_sv_catpvf_mg Perl_sv_vcatpvf_mg
992 Perl_dump_indent Perl_dump_vindent
993 Perl_default_protect Perl_vdefault_protect
996 # ex: set ts=8 sts=4 sw=4 noet: