This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
change#3612 was buggy and failed to build Tk; applied Ilya's
[perl5.git] / embed.pl
CommitLineData
5f05dabc 1#!/usr/bin/perl -w
e50aee73 2
5f05dabc
PP
3require 5.003;
4
cea2e8a9
GS
5#
6# See database of global and static function prototypes at the __END__.
7# This is used to generate prototype headers under various configurations,
8# export symbols lists for different platforms, and macros to provide an
9# implicit interpreter context argument.
10#
11
12my $END = tell DATA;
13
14# walk table providing an array of components in each line to
15# subroutine, printing the result
16sub walk_table (&@) {
17 my $function = shift;
18 my $filename = shift || '-';
19 my $leader = shift;
20 my $trailer = shift;
21 my $F;
22 local *F;
23 if (ref $filename) { # filehandle
24 $F = $filename;
25 }
26 else {
27 open F, ">$filename" or die "Can't open $filename: $!";
28 $F = \*F;
29 }
30 print $F $leader if $leader;
31 seek DATA, $END, 0; # so we may restart
32 while (<DATA>) {
33 chomp;
34 while (s|\\$||) {
35 $_ .= <DATA>;
36 chomp;
37 }
38 my @args;
39 if (/^\s*(#|$)/) {
40 @args = $_;
41 }
42 else {
43 @args = split /\s*\|\s*/, $_;
44 }
45 print $F $function->(@args);
46 }
47 print $F $trailer if $trailer;
48 close $F unless ref $filename;
49}
50
51sub munge_c_files () {
52 my $functions = {};
53 unless (@ARGV) {
54 warn "\@ARGV empty, nothing to do\n";
55 return;
56 }
57 walk_table {
58 if (@_ > 1) {
59 $functions->{$_[2]} = \@_ if $_[@_-1] =~ /\.\.\./;
60 }
61 } '/dev/null';
62 local $^I = '.bak';
63 while (<>) {
64# if (/^#\s*include\s+"perl.h"/) {
65# my $file = uc $ARGV;
66# $file =~ s/\./_/g;
67# print "#define PERL_IN_$file\n";
68# }
69# s{^(\w+)\s*\(}
70# {
71# my $f = $1;
72# my $repl = "$f(";
73# if (exists $functions->{$f}) {
74# my $flags = $functions->{$f}[0];
75# $repl = "Perl_$repl" if $flags =~ /p/;
76# unless ($flags =~ /n/) {
77# $repl .= "pTHX";
78# $repl .= "_ " if @{$functions->{$f}} > 3;
79# }
80# warn("$ARGV:$.:$repl\n");
81# }
82# $repl;
83# }e;
84 s{(\b(\w+)[ \t]*\([ \t]*(?!aTHX))}
85 {
86 my $repl = $1;
87 my $f = $2;
88 if (exists $functions->{$f}) {
89 $repl .= "aTHX_ ";
90 warn("$ARGV:$.:$`#$repl#$'");
91 }
92 $repl;
93 }eg;
94 print;
95 close ARGV if eof; # restart $.
96 }
97 exit;
98}
99
100#munge_c_files();
101
102# generate proto.h
0cb96387
GS
103my $wrote_protected = 0;
104
cea2e8a9
GS
105sub write_protos {
106 my $ret = "";
107 if (@_ == 1) {
108 my $arg = shift;
0cb96387
GS
109 $ret .= "$arg\n" if $arg =~ /^#\s*(if|ifdef|else|endif)\b/
110 or $arg =~ /^\s*(public|protected|private):/;
cea2e8a9
GS
111 }
112 else {
113 my ($flags,$retval,$func,@args) = @_;
114 if ($flags =~ /s/) {
115 $retval = "STATIC $retval";
116 $func = "S_$func";
117 }
0cb96387
GS
118 else {
119 $retval = "VIRTUAL $retval";
120 if ($flags =~ /p/) {
121 $func = "Perl_$func";
122 }
cea2e8a9
GS
123 }
124 $ret .= "$retval\t$func(";
125 unless ($flags =~ /n/) {
126 $ret .= "pTHX";
127 $ret .= "_ " if @args;
128 }
129 if (@args) {
130 $ret .= join ", ", @args;
131 }
132 else {
133 $ret .= "void" if $flags =~ /n/;
134 }
135 $ret .= ")";
136 $ret .= " __attribute__((noreturn))" if $flags =~ /r/;
137 $ret .= ";\n";
138 }
139 $ret;
140}
141
142# generates global.sym, and populates %global with global symbols
143sub write_global_sym {
144 my $ret = "";
145 if (@_ > 1) {
146 my ($flags,$retval,$func,@args) = @_;
147 unless ($flags =~ /s/) {
148 $func = "Perl_$func" if $flags =~ /p/;
149 $ret = "$func\n";
150 }
151 }
152 $ret;
153}
154
155
156walk_table(\&write_protos, 'proto.h', <<'EOT');
157/*
158 * !!!!!!! DO NOT EDIT THIS FILE !!!!!!!
159 * This file is autogenerated from data in embed.pl. Edit that file
160 * and run 'make regen_headers' to effect changes.
161 */
162
163EOT
164
165walk_table(\&write_global_sym, 'global.sym', <<'EOT');
166#
167# !!!!!!! DO NOT EDIT THIS FILE !!!!!!!
168# This file is autogenerated from data in embed.pl. Edit that file
169# and run 'make regen_headers' to effect changes.
170#
171
172EOT
173
709f4e38
GS
174# XXX others that may need adding
175# warnhook
176# hints
177# copline
84fee439
NIS
178my @extvars = qw(sv_undef sv_yes sv_no na dowarn
179 curcop compiling
180 tainting tainted stack_base stack_sp sv_arenaroot
256a4781 181 no_modify
84fee439
NIS
182 curstash DBsub DBsingle debstash
183 rsfp
184 stdingv
6b88bc9c
GS
185 defgv
186 errgv
3070f6ec
GS
187 rsfp_filters
188 perldb
709f4e38
GS
189 diehook
190 dirty
191 perl_destruct_level
84fee439
NIS
192 );
193
5f05dabc
PP
194sub readsyms (\%$) {
195 my ($syms, $file) = @_;
5f05dabc
PP
196 local (*FILE, $_);
197 open(FILE, "< $file")
198 or die "embed.pl: Can't open $file: $!\n";
199 while (<FILE>) {
200 s/[ \t]*#.*//; # Delete comments.
201 if (/^\s*(\S+)\s*$/) {
22c35a8c
GS
202 my $sym = $1;
203 warn "duplicate symbol $sym while processing $file\n"
204 if exists $$syms{$sym};
205 $$syms{$sym} = 1;
5f05dabc
PP
206 }
207 }
208 close(FILE);
209}
210
cea2e8a9
GS
211# Perl_pp_* and Perl_ck_* are in pp.sym
212readsyms my %ppsym, 'pp.sym';
5f05dabc 213
c6af7a1a
GS
214sub readvars(\%$$@) {
215 my ($syms, $file,$pre,$keep_pre) = @_;
d4cce5f1
NIS
216 local (*FILE, $_);
217 open(FILE, "< $file")
218 or die "embed.pl: Can't open $file: $!\n";
219 while (<FILE>) {
220 s/[ \t]*#.*//; # Delete comments.
51371543 221 if (/PERLVARA?I?C?\($pre(\w+)/) {
22c35a8c 222 my $sym = $1;
c6af7a1a 223 $sym = $pre . $sym if $keep_pre;
22c35a8c
GS
224 warn "duplicate symbol $sym while processing $file\n"
225 if exists $$syms{$sym};
51371543 226 $$syms{$sym} = $pre || 1;
d4cce5f1
NIS
227 }
228 }
229 close(FILE);
230}
231
232my %intrp;
233my %thread;
234
235readvars %intrp, 'intrpvar.h','I';
236readvars %thread, 'thrdvar.h','T';
22239a37 237readvars %globvar, 'perlvars.h','G';
d4cce5f1 238
51371543 239foreach my $sym (sort keys %thread) {
34b58025 240 warn "$sym in intrpvar.h as well as thrdvar.h\n" if exists $intrp{$sym};
51371543 241}
d4cce5f1 242
c6af7a1a
GS
243sub undefine ($) {
244 my ($sym) = @_;
245 "#undef $sym\n";
246}
247
5f05dabc
PP
248sub hide ($$) {
249 my ($from, $to) = @_;
250 my $t = int(length($from) / 8);
251 "#define $from" . "\t" x ($t < 3 ? 3 - $t : 1) . "$to\n";
252}
c6af7a1a 253
51371543
GS
254sub objxsub_var ($$) {
255 my ($pfx, $sym) = @_;
256 undefine("PL_$sym") . hide("PL_$sym", "(*Perl_${pfx}${sym}_ptr(pPerl))");
c6af7a1a
GS
257}
258
3280af22
NIS
259sub embedvar ($) {
260 my ($sym) = @_;
261# hide($sym, "Perl_$sym");
262 return '';
263}
264
d4cce5f1
NIS
265sub multon ($$$) {
266 my ($sym,$pre,$ptr) = @_;
3280af22 267 hide("PL_$sym", "($ptr$pre$sym)");
5f05dabc 268}
d4cce5f1
NIS
269sub multoff ($$) {
270 my ($sym,$pre) = @_;
533c011a 271 return hide("PL_$pre$sym", "PL_$sym");
5f05dabc
PP
272}
273
274unlink 'embed.h';
cea2e8a9 275open(EM, '> embed.h') or die "Can't create embed.h: $!\n";
e50aee73
AD
276
277print EM <<'END';
76b72cf1 278/* !!!!!!! DO NOT EDIT THIS FILE !!!!!!!
cea2e8a9 279 This file is built by embed.pl from data in embed.pl, pp.sym, intrpvar.h,
c6af7a1a 280 perlvars.h and thrdvar.h. Any changes made here will be lost!
76b72cf1 281*/
e50aee73
AD
282
283/* (Doing namespace management portably in C is really gross.) */
284
22c35a8c 285/* NO_EMBED is no longer supported. i.e. EMBED is always active. */
820c3be9 286
22c35a8c 287/* Hide global symbols */
5f05dabc 288
22c35a8c 289#if !defined(PERL_OBJECT)
cea2e8a9 290#if !defined(PERL_IMPLICIT_CONTEXT)
e50aee73 291
e50aee73
AD
292END
293
cea2e8a9
GS
294walk_table {
295 my $ret = "";
296 if (@_ == 1) {
297 my $arg = shift;
298 $ret .= "$arg\n" if $arg =~ /^#\s*(if|ifdef|else|endif)\b/;
299 }
300 else {
301 my ($flags,$retval,$func,@args) = @_;
302 unless ($flags =~ /o/) {
303 if ($flags =~ /s/) {
304 $ret .= hide($func,"S_$func");
305 }
306 elsif ($flags =~ /p/) {
307 $ret .= hide($func,"Perl_$func");
308 }
309 }
310 }
311 $ret;
312} \*EM;
313
314for $sym (sort keys %ppsym) {
315 $sym =~ s/^Perl_//;
316 print EM hide($sym, "Perl_$sym");
317}
318
319print EM <<'END';
320
321#else /* PERL_IMPLICIT_CONTEXT */
322
323END
324
325my @az = ('a'..'z');
326
327walk_table {
328 my $ret = "";
329 if (@_ == 1) {
330 my $arg = shift;
331 $ret .= "$arg\n" if $arg =~ /^#\s*(if|ifdef|else|endif)\b/;
332 }
333 else {
334 my ($flags,$retval,$func,@args) = @_;
335 unless ($flags =~ /o/) {
336 my $args = scalar @args;
337 if ($args and $args[$args-1] =~ /\.\.\./) {
338 # we're out of luck for varargs functions under CPP
339 }
340 elsif ($flags =~ /n/) {
341 if ($flags =~ /s/) {
342 $ret .= hide($func,"S_$func");
343 }
344 elsif ($flags =~ /p/) {
345 $ret .= hide($func,"Perl_$func");
346 }
347 }
348 else {
349 my $alist = join(",", @az[0..$args-1]);
350 $ret = "#define $func($alist)";
351 my $t = int(length($ret) / 8);
352 $ret .= "\t" x ($t < 4 ? 4 - $t : 1);
353 if ($flags =~ /s/) {
354 $ret .= "S_$func(aTHX";
355 }
356 elsif ($flags =~ /p/) {
357 $ret .= "Perl_$func(aTHX";
358 }
359 $ret .= "_ " if $alist;
360 $ret .= $alist . ")\n";
361 }
362 }
363 }
364 $ret;
365} \*EM;
366
367for $sym (sort keys %ppsym) {
368 $sym =~ s/^Perl_//;
369 if ($sym =~ /^ck_/) {
370 print EM hide("$sym(a)", "Perl_$sym(aTHX_ a)");
371 }
372 elsif ($sym =~ /^pp_/) {
373 print EM hide("$sym()", "Perl_$sym(aTHX)");
374 }
375 else {
376 warn "Illegal symbol '$sym' in pp.sym";
377 }
e50aee73
AD
378}
379
e50aee73
AD
380print EM <<'END';
381
cea2e8a9 382#endif /* PERL_IMPLICIT_CONTEXT */
22c35a8c
GS
383#else /* PERL_OBJECT */
384
385END
386
cea2e8a9
GS
387walk_table {
388 my $ret = "";
389 if (@_ == 1) {
390 my $arg = shift;
391 $ret .= "$arg\n" if $arg =~ /^#\s*(if|ifdef|else|endif)\b/;
392 }
393 else {
394 my ($flags,$retval,$func,@args) = @_;
0cb96387
GS
395 if ($flags =~ /s/) {
396 $ret .= hide("S_$func","CPerlObj::S_$func");
397 $ret .= hide($func,"S_$func");
398 }
399 elsif ($flags =~ /p/) {
400 $ret .= hide("Perl_$func","CPerlObj::Perl_$func");
401 $ret .= hide($func,"Perl_$func");
402 }
403 else {
404 $ret .= hide($func,"CPerlObj::$func");
cea2e8a9
GS
405 }
406 }
407 $ret;
408} \*EM;
409
410for $sym (sort keys %ppsym) {
411 $sym =~ s/^Perl_//;
0cb96387
GS
412 print EM hide("Perl_$sym", "CPerlObj::Perl_$sym");
413 print EM hide($sym, "Perl_$sym");
22c35a8c
GS
414}
415
416print EM <<'END';
417
418#endif /* PERL_OBJECT */
e50aee73 419
cea2e8a9
GS
420/* Compatibility stubs. Compile extensions with -DPERL_NOCOMPAT to
421 disable them.
422 */
423
424#if !defined(PERL_CORE) && !defined(PERL_NOCOMPAT)
425
426# define sv_setptrobj(rv,ptr,name) sv_setref_iv(rv,name,(IV)ptr)
427# define sv_setptrref(rv,ptr) sv_setref_iv(rv,Nullch,(IV)ptr)
428
429
430/* Compatibility for various misnamed functions. All functions
431 in the API that begin with "perl_" (not "Perl_") take an explicit
432 interpreter context pointer.
433 The following are not like that, but since they had a "perl_"
434 prefix in previous versions, we provide compatibility macros.
435 */
436# define perl_atexit call_atexit
437# define perl_call_argv call_argv
438# define perl_call_pv call_pv
439# define perl_call_method call_method
440# define perl_call_sv call_sv
441# define perl_eval_sv eval_sv
442# define perl_eval_pv eval_pv
443# define perl_require_pv require_pv
444# define perl_get_sv get_sv
445# define perl_get_av get_av
446# define perl_get_hv get_hv
447# define perl_get_cv get_cv
448# define perl_init_i18nl10n init_i18nl10n
449# define perl_init_i18nl14n init_i18nl14n
450# define perl_new_ctype new_ctype
451# define perl_new_collate new_collate
452# define perl_new_numeric new_numeric
453
454/* varargs functions can't be handled with CPP macros. :-(
455 This provides a set of compatibility functions that don't take
456 an extra argument but grab the context pointer using the macro
457 dTHX.
458 */
459#if defined(PERL_IMPLICIT_CONTEXT)
460# define croak Perl_croak_nocontext
461# define die Perl_die_nocontext
462# define form Perl_form_nocontext
463# define newSVpvf Perl_newSVpvf_nocontext
464# define sv_catpvf Perl_sv_catpvf_nocontext
465# define sv_setpvf Perl_sv_setpvf_nocontext
466# define warn Perl_warn_nocontext
467# define sv_catpvf_mg Perl_sv_catpvf_mg_nocontext
468# define sv_setpvf_mg Perl_sv_setpvf_mg_nocontext
469#endif
470
471#endif /* !defined(PERL_CORE) && !defined(PERL_NOCOMPAT) */
472
473#if !defined(PERL_IMPLICIT_CONTEXT)
474/* undefined symbols, point them back at the usual ones */
475# define Perl_croak_nocontext Perl_croak
476# define Perl_die_nocontext Perl_die
477# define Perl_form_nocontext Perl_form
478# define Perl_newSVpvf_nocontext Perl_newSVpvf
479# define Perl_sv_catpvf_nocontext Perl_sv_catpvf
480# define Perl_sv_setpvf_nocontext Perl_sv_setpvf
481# define Perl_warn_nocontext Perl_warn
482# define Perl_sv_catpvf_mg_nocontext Perl_sv_catpvf_mg
483# define Perl_sv_setpvf_mg_nocontext Perl_sv_setpvf_mg
484#endif
db5cf5a9 485
d4cce5f1
NIS
486END
487
488close(EM);
489
490unlink 'embedvar.h';
491open(EM, '> embedvar.h')
492 or die "Can't create embedvar.h: $!\n";
493
494print EM <<'END';
495/* !!!!!!! DO NOT EDIT THIS FILE !!!!!!!
cea2e8a9 496 This file is built by embed.pl from data in embed.pl, pp.sym, intrpvar.h,
c6af7a1a 497 perlvars.h and thrdvar.h. Any changes made here will be lost!
d4cce5f1
NIS
498*/
499
500/* (Doing namespace management portably in C is really gross.) */
501
5f05dabc 502/* Put interpreter-specific symbols into a struct? */
e50aee73
AD
503
504#ifdef MULTIPLICITY
505
d4cce5f1
NIS
506#ifndef USE_THREADS
507/* If we do not have threads then per-thread vars are per-interpreter */
508
cea2e8a9
GS
509#ifdef PERL_IMPLICIT_CONTEXT
510
511/* everything has an implicit context pointer */
512
513END
514
515for $sym (sort keys %thread) {
516 print EM multon($sym,'T','my_perl->');
517}
518
519print EM <<'END';
520
521#else /* !PERL_IMPLICIT_CONTEXT */
522
523/* traditional MULTIPLICITY (intepreter is in a global) */
524
e50aee73
AD
525END
526
cea2e8a9 527
d4cce5f1 528for $sym (sort keys %thread) {
8f872242 529 print EM multon($sym,'T','PL_curinterp->');
d4cce5f1
NIS
530}
531
532print EM <<'END';
533
cea2e8a9 534#endif /* !PERL_IMPLICIT_CONTEXT */
d4cce5f1
NIS
535#endif /* !USE_THREADS */
536
537/* These are always per-interpreter if there is more than one */
538
539END
540
541for $sym (sort keys %intrp) {
8f872242 542 print EM multon($sym,'I','PL_curinterp->');
760ac839 543}
760ac839 544
55497cff
PP
545print EM <<'END';
546
5f05dabc 547#else /* !MULTIPLICITY */
55497cff
PP
548
549END
760ac839 550
d4cce5f1
NIS
551for $sym (sort keys %intrp) {
552 print EM multoff($sym,'I');
e50aee73 553}
e50aee73 554
56d28764
CS
555print EM <<'END';
556
d4cce5f1
NIS
557#ifndef USE_THREADS
558
559END
560
561for $sym (sort keys %thread) {
562 print EM multoff($sym,'T');
563}
564
565print EM <<'END';
566
567#endif /* USE_THREADS */
568
569/* Hide what would have been interpreter-specific symbols? */
5f05dabc 570
56d28764 571END
e50aee73 572
d4cce5f1 573for $sym (sort keys %intrp) {
3280af22 574 print EM embedvar($sym);
d4cce5f1
NIS
575}
576
577print EM <<'END';
578
579#ifndef USE_THREADS
580
581END
582
583for $sym (sort keys %thread) {
3280af22 584 print EM embedvar($sym);
5f05dabc
PP
585}
586
587print EM <<'END';
588
d4cce5f1 589#endif /* USE_THREADS */
e50aee73 590#endif /* MULTIPLICITY */
d4cce5f1
NIS
591
592/* Now same trickey for per-thread variables */
593
594#ifdef USE_THREADS
595
596END
597
598for $sym (sort keys %thread) {
22239a37 599 print EM multon($sym,'T','thr->');
d4cce5f1
NIS
600}
601
602print EM <<'END';
603
604#endif /* USE_THREADS */
605
22239a37
NIS
606#ifdef PERL_GLOBAL_STRUCT
607
608END
609
610for $sym (sort keys %globvar) {
533c011a 611 print EM multon($sym,'G','PL_Vars.');
22239a37
NIS
612}
613
614print EM <<'END';
615
616#else /* !PERL_GLOBAL_STRUCT */
617
618END
619
620for $sym (sort keys %globvar) {
621 print EM multoff($sym,'G');
622}
623
624print EM <<'END';
625
22239a37
NIS
626END
627
628for $sym (sort keys %globvar) {
3280af22 629 print EM embedvar($sym);
22239a37
NIS
630}
631
632print EM <<'END';
633
22239a37
NIS
634#endif /* PERL_GLOBAL_STRUCT */
635
e50aee73
AD
636END
637
84fee439
NIS
638print EM <<'END';
639
db5cf5a9 640#ifdef PERL_POLLUTE /* disabled by default in 5.006 */
84fee439
NIS
641
642END
643
644for $sym (sort @extvars) {
645 print EM hide($sym,"PL_$sym");
646}
647
648print EM <<'END';
649
db5cf5a9 650#endif /* PERL_POLLUTE */
84fee439
NIS
651END
652
653
3fe35a81 654close(EM);
c6af7a1a
GS
655
656unlink 'objXSUB.h';
657open(OBX, '> objXSUB.h')
658 or die "Can't create objXSUB.h: $!\n";
659
660print OBX <<'EOT';
661/* !!!!!!! DO NOT EDIT THIS FILE !!!!!!!
cea2e8a9 662 This file is built by embed.pl from data in embed.pl, pp.sym, intrpvar.h,
c6af7a1a
GS
663 perlvars.h and thrdvar.h. Any changes made here will be lost!
664*/
665
666#ifndef __objXSUB_h__
667#define __objXSUB_h__
668
669/* Variables */
670
671EOT
672
51371543
GS
673foreach my $sym (sort keys %intrp) {
674 print OBX objxsub_var('I',$sym);
675}
676
677foreach my $sym (sort keys %thread) {
678 print OBX objxsub_var('T',$sym);
679}
680
681foreach my $sym (sort keys %globvar) {
682 print OBX objxsub_var('G',$sym);
c6af7a1a
GS
683}
684
685print OBX <<'EOT';
686
687/* Functions */
688
689EOT
690
cea2e8a9
GS
691walk_table {
692 my $ret = "";
693 if (@_ == 1) {
694 my $arg = shift;
695 $ret .= "$arg\n" if $arg =~ /^#\s*(if|ifdef|else|endif)\b/;
696 }
697 else {
698 my ($flags,$retval,$func,@args) = @_;
0cb96387 699 unless ($flags =~ /s/) {
cea2e8a9 700 if ($flags =~ /p/) {
0cb96387
GS
701 $ret .= undefine("Perl_$func") . hide("Perl_$func","pPerl->Perl_$func");
702 $ret .= undefine($func) . hide($func,"Perl_$func");
703 }
704 else {
cea2e8a9
GS
705 $ret .= undefine($func) . hide($func,"pPerl->$func");
706 }
707 }
708 }
709 $ret;
710} \*OBX;
c6af7a1a 711
cea2e8a9
GS
712for $sym (sort keys %ppsym) {
713 $sym =~ s/^Perl_//;
0cb96387
GS
714 print OBX undefine("Perl_$sym") . hide("Perl_$sym", "pPerl->Perl_$sym");
715 print OBX undefine($sym) . hide($sym, "Perl_$sym");
c6af7a1a
GS
716}
717
c6af7a1a
GS
718print OBX <<'EOT';
719
720#endif /* __objXSUB_h__ */
721EOT
722
723close(OBX);
cea2e8a9 724
51371543
GS
725unlink 'perlapi.h';
726unlink 'perlapi.c';
727open(CAPI, '> perlapi.c') or die "Can't create perlapi.c: $!\n";
728open(CAPIH, '> perlapi.h') or die "Can't create perlapi.h: $!\n";
729
730print CAPIH <<'EOT';
731/* !!!!!!! DO NOT EDIT THIS FILE !!!!!!!
732 This file is built by embed.pl from data in embed.pl, pp.sym, intrpvar.h,
733 perlvars.h and thrdvar.h. Any changes made here will be lost!
734*/
735
736#if defined(PERL_OBJECT)
737
738/* declare accessor functions for Perl variables */
739
740START_EXTERN_C
741
742#undef PERLVAR
743#undef PERLVARA
744#undef PERLVARI
745#undef PERLVARIC
746#define PERLVAR(v,t) EXTERN_C t* Perl_##v##_ptr(void *p);
747#define PERLVARA(v,n,t) typedef t PL_##v##_t[n]; \
748 EXTERN_C PL_##v##_t* Perl_##v##_ptr(void *p);
749#define PERLVARI(v,t,i) PERLVAR(v,t)
750#define PERLVARIC(v,t,i) PERLVAR(v,t)
751
752#include "thrdvar.h"
753#include "intrpvar.h"
754#include "perlvars.h"
755
756#undef PERLVAR
757#undef PERLVARA
758#undef PERLVARI
759#undef PERLVARIC
760
761END_EXTERN_C
762
763#endif /* PERL_OBJECT */
764
765EOT
766
767
768print CAPI <<'EOT';
769/* !!!!!!! DO NOT EDIT THIS FILE !!!!!!!
770 This file is built by embed.pl from data in embed.pl, pp.sym, intrpvar.h,
771 perlvars.h and thrdvar.h. Any changes made here will be lost!
772*/
773
774#include "EXTERN.h"
775#include "perl.h"
776#include "perlapi.h"
777
778#if defined(PERL_OBJECT)
779
780/* accessor functions for Perl variables (provides binary compatibility) */
781START_EXTERN_C
782
783#undef PERLVAR
784#undef PERLVARA
785#undef PERLVARI
786#undef PERLVARIC
787#define PERLVAR(v,t) t* Perl_##v##_ptr(void *p) \
788 { return &(((CPerlObj*)p)->PL_##v); }
789#define PERLVARA(v,n,t) PL_##v##_t* Perl_##v##_ptr(void *p) \
790 { return &(((CPerlObj*)p)->PL_##v); }
791#define PERLVARI(v,t,i) PERLVAR(v,t)
792#define PERLVARIC(v,t,i) PERLVAR(v,t)
793
794#include "thrdvar.h"
795#include "intrpvar.h"
796#include "perlvars.h"
797
798#undef PERLVAR
799#undef PERLVARA
800#undef PERLVARI
801#undef PERLVARIC
802
803EOT
804
805sub emit_func {
806 my ($retval,$func,@args) = @_;
807 my @aargs = @args;
808 for my $a (@aargs) { $a =~ s/^.*\b(\w+)$/$1/ }
809 unshift @args, 'void *pPerl';
810 local $" = ', ';
811 my $return = ($retval =~ /^\s*(void|Free_t|Signal_t)\s*$/ ? '' : 'return ');
812 return <<EOT
813$retval
814$func(@args)
815{
816 $return((CPerlObj*)pPerl)->$func(@aargs);
817}
818EOT
819
820}
821
822# XXXX temporary hack
823for my $sym (qw(
824 perl_construct
825 perl_destruct
826 perl_free
827 perl_run
828 perl_parse
829 ))
830{
831 $skipapi_funcs{$sym}++;
832}
833
834walk_table {
835 my $ret = "";
836 if (@_ == 1) {
837 my $arg = shift;
838 $ret .= "$arg\n" if $arg =~ /^#\s*(if|ifdef|else|endif)\b/;
839 }
840 else {
841 my ($flags,$retval,$func,@args) = @_;
842 return $ret if exists $skipapi_funcs{$func};
843 unless (@args and $args[$#args] =~ /\.\.\./) {
844 unless ($flags =~ /s/) {
845 $ret .= "\n";
846 if ($flags =~ /p/) {
847 $ret .= undefine("Perl_$func");
848 $ret .= emit_func($retval,"Perl_$func",@args);
849 }
850 else {
851 $ret .= undefine($func);
852 $ret .= emit_func($retval,$func,@args);
853 }
854 }
855 }
856 }
857 $ret;
858} \*CAPI;
859
860for $sym (sort keys %ppsym) {
861 $sym =~ s/^Perl_//;
862 print CAPI "\n";
863 print CAPI undefine("Perl_$sym");
864 if ($sym =~ /^ck_/) {
865 print CAPI emit_func('OP *',"Perl_$sym",'OP *o');
866 }
867 else { # pp_foo
868 print CAPI emit_func('OP *',"Perl_$sym");
869 }
870}
871
872print CAPI <<'EOT';
873
874END_EXTERN_C
875
876#endif /* PERL_OBJECT */
877EOT
878
cea2e8a9
GS
879__END__
880
881# Lines are of the form:
882# flags|return_type|function_name|return_type|arg1|arg2|...|argN
883#
884# They may continue on multiple lines when \w| begins the next line.
885# Leading and trailing whitespace will be ignored in each component.
886#
887# flags are single letters with following meanings:
888# s static function, should have an S_ prefix in source
889# file
890# n has no implicit interpreter/thread context argument
891# p function has a Perl_ prefix
892# r function never returns
893# o has no compatibility macro (#define foo Perl_foo)
894#
895# Individual flags may be separated by whitespace.
896#
897# New global functions should be added at the end for binary compatibility
898# in some configurations.
899#
900# TODO: 1) Add a flag to mark the functions that are part of the public API.
901# 2) Add a field for documentation, so that L<perlguts/"API LISTING">
902# may be autogenerated.
903#
904
0cb96387
GS
905#if defined(PERL_OBJECT)
906public:
907#endif
cea2e8a9
GS
908p |SV* |amagic_call |SV* left|SV* right|int method|int dir
909p |bool |Gv_AMupdate |HV* stash
910p |OP* |append_elem |I32 optype|OP* head|OP* tail
911p |OP* |append_list |I32 optype|LISTOP* first|LISTOP* last
912p |I32 |apply |I32 type|SV** mark|SV** sp
913p |void |assertref |OP* o
914p |bool |avhv_exists_ent|AV *ar|SV* keysv|U32 hash
915p |SV** |avhv_fetch_ent |AV *ar|SV* keysv|I32 lval|U32 hash
916p |HE* |avhv_iternext |AV *ar
917p |SV* |avhv_iterval |AV *ar|HE* entry
918p |HV* |avhv_keys |AV *ar
919p |void |av_clear |AV* ar
920p |void |av_extend |AV* ar|I32 key
921p |AV* |av_fake |I32 size|SV** svp
922p |SV** |av_fetch |AV* ar|I32 key|I32 lval
923p |void |av_fill |AV* ar|I32 fill
924p |I32 |av_len |AV* ar
925p |AV* |av_make |I32 size|SV** svp
926p |SV* |av_pop |AV* ar
927p |void |av_push |AV* ar|SV* val
928p |void |av_reify |AV* ar
929p |SV* |av_shift |AV* ar
930p |SV** |av_store |AV* ar|I32 key|SV* val
931p |void |av_undef |AV* ar
932p |void |av_unshift |AV* ar|I32 num
933p |OP* |bind_match |I32 type|OP* left|OP* pat
934p |OP* |block_end |I32 floor|OP* seq
935p |I32 |block_gimme
936p |int |block_start |int full
937p |void |boot_core_UNIVERSAL
938p |void |call_list |I32 oldscope|AV* av_list
939p |I32 |cando |I32 bit|I32 effective|Stat_t* statbufp
cad2e5aa
JH
940p |U32 |cast_ulong |NV f
941p |I32 |cast_i32 |NV f
942p |IV |cast_iv |NV f
943p |UV |cast_uv |NV f
cea2e8a9
GS
944#if !defined(HAS_TRUNCATE) && !defined(HAS_CHSIZE) && defined(F_FREESP)
945p |I32 |my_chsize |int fd|Off_t length
946#endif
947#if defined(USE_THREADS)
948p |MAGIC* |condpair_magic |SV *sv
949#endif
950p |OP* |convert |I32 optype|I32 flags|OP* o
951pr |void |croak |const char* pat|...
952#if defined(PERL_IMPLICIT_CONTEXT)
953npr |void |croak_nocontext|const char* pat|...
954np |OP* |die_nocontext |const char* pat|...
955np |char* |form_nocontext |const char* pat|...
956np |void |warn_nocontext |const char* pat|...
957np |SV* |newSVpvf_nocontext|const char* pat|...
958np |void |sv_catpvf_nocontext|SV* sv|const char* pat|...
959np |void |sv_setpvf_nocontext|SV* sv|const char* pat|...
960np |void |sv_catpvf_mg_nocontext|SV* sv|const char* pat|...
961np |void |sv_setpvf_mg_nocontext|SV* sv|const char* pat|...
962#endif
963p |void |cv_ckproto |CV* cv|GV* gv|char* p
964p |CV* |cv_clone |CV* proto
965p |SV* |cv_const_sv |CV* cv
966p |SV* |op_const_sv |OP* o|CV* cv
967p |void |cv_undef |CV* cv
968p |void |cx_dump |PERL_CONTEXT* cs
969p |SV* |filter_add |filter_t funcp|SV* datasv
970p |void |filter_del |filter_t funcp
971p |I32 |filter_read |int idx|SV* buffer|int maxlen
972p |char** |get_op_descs
973p |char** |get_op_names
974p |char* |get_no_modify
975p |U32* |get_opargs
0cb96387 976p |PPADDR_t*|get_ppaddr
cea2e8a9
GS
977p |I32 |cxinc
978p |void |deb |const char* pat|...
979p |void |deb_growlevel
980p |void |debprofdump
981p |I32 |debop |OP* o
982p |I32 |debstack
983p |I32 |debstackptrs
984p |char* |delimcpy |char* to|char* toend|char* from \
985 |char* fromend|int delim|I32* retlen
986p |void |deprecate |char* s
987p |OP* |die |const char* pat|...
988p |OP* |die_where |char* message|STRLEN msglen
989p |void |dounwind |I32 cxix
990p |bool |do_aexec |SV* really|SV** mark|SV** sp
991p |int |do_binmode |PerlIO *fp|int iotype|int flag
992p |void |do_chop |SV* asv|SV* sv
993p |bool |do_close |GV* gv|bool not_implicit
994p |bool |do_eof |GV* gv
995p |bool |do_exec |char* cmd
996#if !defined(WIN32)
997p |bool |do_exec3 |char* cmd|int fd|int flag
998#endif
999p |void |do_execfree
1000#if defined(HAS_MSG) || defined(HAS_SEM) || defined(HAS_SHM)
1001p |I32 |do_ipcctl |I32 optype|SV** mark|SV** sp
1002p |I32 |do_ipcget |I32 optype|SV** mark|SV** sp
1003p |I32 |do_msgrcv |SV** mark|SV** sp
1004p |I32 |do_msgsnd |SV** mark|SV** sp
1005p |I32 |do_semop |SV** mark|SV** sp
1006p |I32 |do_shmio |I32 optype|SV** mark|SV** sp
1007#endif
1008p |void |do_join |SV* sv|SV* del|SV** mark|SV** sp
1009p |OP* |do_kv
1010p |bool |do_open |GV* gv|char* name|I32 len|int as_raw \
1011 |int rawmode|int rawperm|PerlIO* supplied_fp
1012p |void |do_pipe |SV* sv|GV* rgv|GV* wgv
1013p |bool |do_print |SV* sv|PerlIO* fp
1014p |OP* |do_readline
1015p |I32 |do_chomp |SV* sv
1016p |bool |do_seek |GV* gv|Off_t pos|int whence
1017p |void |do_sprintf |SV* sv|I32 len|SV** sarg
1018p |Off_t |do_sysseek |GV* gv|Off_t pos|int whence
1019p |Off_t |do_tell |GV* gv
1020p |I32 |do_trans |SV* sv
1021p |void |do_vecset |SV* sv
1022p |void |do_vop |I32 optype|SV* sv|SV* left|SV* right
1023p |OP* |dofile |OP* term
1024p |I32 |dowantarray
1025p |void |dump_all
1026p |void |dump_eval
1027#if defined(DUMP_FDS)
1028p |void |dump_fds |char* s
1029#endif
1030p |void |dump_form |GV* gv
1031p |void |gv_dump |GV* gv
1032p |void |op_dump |OP* arg
1033p |void |pmop_dump |PMOP* pm
1034p |void |dump_packsubs |HV* stash
1035p |void |dump_sub |GV* gv
1036p |void |fbm_compile |SV* sv|U32 flags
1037p |char* |fbm_instr |unsigned char* big|unsigned char* bigend \
1038 |SV* littlesv|U32 flags
1039p |char* |find_script |char *scriptname|bool dosearch \
1040 |char **search_ext|I32 flags
1041#if defined(USE_THREADS)
1042p |PADOFFSET|find_threadsv|const char *name
1043#endif
1044p |OP* |force_list |OP* arg
1045p |OP* |fold_constants |OP* arg
1046p |char* |form |const char* pat|...
1047p |void |free_tmps
1048p |OP* |gen_constant_list|OP* o
1049#if !defined(HAS_GETENV_LEN)
1050p |char* |getenv_len |char* key|unsigned long *len
1051#endif
1052p |void |gp_free |GV* gv
1053p |GP* |gp_ref |GP* gp
1054p |GV* |gv_AVadd |GV* gv
1055p |GV* |gv_HVadd |GV* gv
1056p |GV* |gv_IOadd |GV* gv
1057p |GV* |gv_autoload4 |HV* stash|const char* name|STRLEN len \
1058 |I32 method
1059p |void |gv_check |HV* stash
1060p |void |gv_efullname |SV* sv|GV* gv
1061p |void |gv_efullname3 |SV* sv|GV* gv|const char* prefix
1062p |GV* |gv_fetchfile |const char* name
1063p |GV* |gv_fetchmeth |HV* stash|const char* name|STRLEN len \
1064 |I32 level
1065p |GV* |gv_fetchmethod |HV* stash|const char* name
1066p |GV* |gv_fetchmethod_autoload|HV* stash|const char* name \
1067 |I32 autoload
1068p |GV* |gv_fetchpv |const char* name|I32 add|I32 sv_type
1069p |void |gv_fullname |SV* sv|GV* gv
1070p |void |gv_fullname3 |SV* sv|GV* gv|const char* prefix
1071p |void |gv_init |GV* gv|HV* stash|const char* name \
1072 |STRLEN len|int multi
1073p |HV* |gv_stashpv |const char* name|I32 create
1074p |HV* |gv_stashpvn |const char* name|U32 namelen|I32 create
1075p |HV* |gv_stashsv |SV* sv|I32 create
1076p |void |hv_clear |HV* tb
1077p |void |hv_delayfree_ent|HV* hv|HE* entry
1078p |SV* |hv_delete |HV* tb|const char* key|U32 klen|I32 flags
1079p |SV* |hv_delete_ent |HV* tb|SV* key|I32 flags|U32 hash
1080p |bool |hv_exists |HV* tb|const char* key|U32 klen
1081p |bool |hv_exists_ent |HV* tb|SV* key|U32 hash
1082p |SV** |hv_fetch |HV* tb|const char* key|U32 klen|I32 lval
1083p |HE* |hv_fetch_ent |HV* tb|SV* key|I32 lval|U32 hash
1084p |void |hv_free_ent |HV* hv|HE* entry
1085p |I32 |hv_iterinit |HV* tb
1086p |char* |hv_iterkey |HE* entry|I32* retlen
1087p |SV* |hv_iterkeysv |HE* entry
1088p |HE* |hv_iternext |HV* tb
1089p |SV* |hv_iternextsv |HV* hv|char** key|I32* retlen
1090p |SV* |hv_iterval |HV* tb|HE* entry
1091p |void |hv_ksplit |HV* hv|IV newmax
1092p |void |hv_magic |HV* hv|GV* gv|int how
1093p |SV** |hv_store |HV* tb|const char* key|U32 klen|SV* val \
1094 |U32 hash
1095p |HE* |hv_store_ent |HV* tb|SV* key|SV* val|U32 hash
1096p |void |hv_undef |HV* tb
1097p |I32 |ibcmp |const char* a|const char* b|I32 len
1098p |I32 |ibcmp_locale |const char* a|const char* b|I32 len
1099p |I32 |ingroup |I32 testgid|I32 effective
1100p |void |init_stacks
1101p |U32 |intro_my
1102p |char* |instr |const char* big|const char* little
1103p |bool |io_close |IO* io
1104p |OP* |invert |OP* cmd
1105p |bool |is_uni_alnum |U32 c
b8c5462f 1106p |bool |is_uni_alnumc |U32 c
cea2e8a9
GS
1107p |bool |is_uni_idfirst |U32 c
1108p |bool |is_uni_alpha |U32 c
b8c5462f 1109p |bool |is_uni_ascii |U32 c
cea2e8a9 1110p |bool |is_uni_space |U32 c
b8c5462f
JH
1111p |bool |is_uni_cntrl |U32 c
1112p |bool |is_uni_graph |U32 c
cea2e8a9
GS
1113p |bool |is_uni_digit |U32 c
1114p |bool |is_uni_upper |U32 c
1115p |bool |is_uni_lower |U32 c
1116p |bool |is_uni_print |U32 c
b8c5462f
JH
1117p |bool |is_uni_punct |U32 c
1118p |bool |is_uni_xdigit |U32 c
cea2e8a9
GS
1119p |U32 |to_uni_upper |U32 c
1120p |U32 |to_uni_title |U32 c
1121p |U32 |to_uni_lower |U32 c
1122p |bool |is_uni_alnum_lc|U32 c
b8c5462f 1123p |bool |is_uni_alnumc_lc|U32 c
cea2e8a9
GS
1124p |bool |is_uni_idfirst_lc|U32 c
1125p |bool |is_uni_alpha_lc|U32 c
b8c5462f 1126p |bool |is_uni_ascii_lc|U32 c
cea2e8a9 1127p |bool |is_uni_space_lc|U32 c
b8c5462f
JH
1128p |bool |is_uni_cntrl_lc|U32 c
1129p |bool |is_uni_graph_lc|U32 c
cea2e8a9
GS
1130p |bool |is_uni_digit_lc|U32 c
1131p |bool |is_uni_upper_lc|U32 c
1132p |bool |is_uni_lower_lc|U32 c
1133p |bool |is_uni_print_lc|U32 c
b8c5462f
JH
1134p |bool |is_uni_punct_lc|U32 c
1135p |bool |is_uni_xdigit_lc|U32 c
cea2e8a9
GS
1136p |U32 |to_uni_upper_lc|U32 c
1137p |U32 |to_uni_title_lc|U32 c
1138p |U32 |to_uni_lower_lc|U32 c
1139p |bool |is_utf8_alnum |U8 *p
b8c5462f 1140p |bool |is_utf8_alnumc |U8 *p
cea2e8a9
GS
1141p |bool |is_utf8_idfirst|U8 *p
1142p |bool |is_utf8_alpha |U8 *p
b8c5462f 1143p |bool |is_utf8_ascii |U8 *p
cea2e8a9 1144p |bool |is_utf8_space |U8 *p
b8c5462f 1145p |bool |is_utf8_cntrl |U8 *p
cea2e8a9 1146p |bool |is_utf8_digit |U8 *p
b8c5462f 1147p |bool |is_utf8_graph |U8 *p
cea2e8a9
GS
1148p |bool |is_utf8_upper |U8 *p
1149p |bool |is_utf8_lower |U8 *p
1150p |bool |is_utf8_print |U8 *p
b8c5462f
JH
1151p |bool |is_utf8_punct |U8 *p
1152p |bool |is_utf8_xdigit |U8 *p
cea2e8a9
GS
1153p |bool |is_utf8_mark |U8 *p
1154p |OP* |jmaybe |OP* arg
1155p |I32 |keyword |char* d|I32 len
1156p |void |leave_scope |I32 base
1157p |void |lex_end
1158p |void |lex_start |SV* line
1159p |OP* |linklist |OP* o
1160p |OP* |list |OP* o
1161p |OP* |listkids |OP* o
1162p |OP* |localize |OP* arg|I32 lexical
1163p |I32 |looks_like_number|SV* sv
1164p |int |magic_clearenv |SV* sv|MAGIC* mg
1165p |int |magic_clear_all_env|SV* sv|MAGIC* mg
1166p |int |magic_clearpack|SV* sv|MAGIC* mg
1167p |int |magic_clearsig |SV* sv|MAGIC* mg
1168p |int |magic_existspack|SV* sv|MAGIC* mg
1169p |int |magic_freeregexp|SV* sv|MAGIC* mg
1170p |int |magic_get |SV* sv|MAGIC* mg
1171p |int |magic_getarylen|SV* sv|MAGIC* mg
1172p |int |magic_getdefelem|SV* sv|MAGIC* mg
1173p |int |magic_getglob |SV* sv|MAGIC* mg
1174p |int |magic_getnkeys |SV* sv|MAGIC* mg
1175p |int |magic_getpack |SV* sv|MAGIC* mg
1176p |int |magic_getpos |SV* sv|MAGIC* mg
1177p |int |magic_getsig |SV* sv|MAGIC* mg
1178p |int |magic_getsubstr|SV* sv|MAGIC* mg
1179p |int |magic_gettaint |SV* sv|MAGIC* mg
1180p |int |magic_getuvar |SV* sv|MAGIC* mg
1181p |int |magic_getvec |SV* sv|MAGIC* mg
1182p |U32 |magic_len |SV* sv|MAGIC* mg
1183#if defined(USE_THREADS)
1184p |int |magic_mutexfree|SV* sv|MAGIC* mg
1185#endif
1186p |int |magic_nextpack |SV* sv|MAGIC* mg|SV* key
1187p |U32 |magic_regdata_cnt|SV* sv|MAGIC* mg
1188p |int |magic_regdatum_get|SV* sv|MAGIC* mg
1189p |int |magic_set |SV* sv|MAGIC* mg
1190p |int |magic_setamagic|SV* sv|MAGIC* mg
1191p |int |magic_setarylen|SV* sv|MAGIC* mg
1192p |int |magic_setbm |SV* sv|MAGIC* mg
1193p |int |magic_setdbline|SV* sv|MAGIC* mg
1194#if defined(USE_LOCALE_COLLATE)
1195p |int |magic_setcollxfrm|SV* sv|MAGIC* mg
1196#endif
1197p |int |magic_setdefelem|SV* sv|MAGIC* mg
1198p |int |magic_setenv |SV* sv|MAGIC* mg
1199p |int |magic_setfm |SV* sv|MAGIC* mg
1200p |int |magic_setisa |SV* sv|MAGIC* mg
1201p |int |magic_setglob |SV* sv|MAGIC* mg
1202p |int |magic_setmglob |SV* sv|MAGIC* mg
1203p |int |magic_setnkeys |SV* sv|MAGIC* mg
1204p |int |magic_setpack |SV* sv|MAGIC* mg
1205p |int |magic_setpos |SV* sv|MAGIC* mg
1206p |int |magic_setsig |SV* sv|MAGIC* mg
1207p |int |magic_setsubstr|SV* sv|MAGIC* mg
1208p |int |magic_settaint |SV* sv|MAGIC* mg
1209p |int |magic_setuvar |SV* sv|MAGIC* mg
1210p |int |magic_setvec |SV* sv|MAGIC* mg
1211p |int |magic_set_all_env|SV* sv|MAGIC* mg
1212p |U32 |magic_sizepack |SV* sv|MAGIC* mg
1213p |int |magic_wipepack |SV* sv|MAGIC* mg
1214p |void |magicname |char* sym|char* name|I32 namlen
cea2e8a9
GS
1215#if defined(MYMALLOC)
1216np |MEM_SIZE|malloced_size |void *p
1217#endif
1218p |void |markstack_grow
1219#if defined(USE_LOCALE_COLLATE)
1220p |char* |mem_collxfrm |const char* s|STRLEN len|STRLEN* xlen
1221#endif
1222p |SV* |mess |const char* pat|va_list* args
1223p |int |mg_clear |SV* sv
1224p |int |mg_copy |SV* sv|SV* nsv|const char* key|I32 klen
1225p |MAGIC* |mg_find |SV* sv|int type
1226p |int |mg_free |SV* sv
1227p |int |mg_get |SV* sv
1228p |U32 |mg_length |SV* sv
1229p |void |mg_magical |SV* sv
1230p |int |mg_set |SV* sv
1231p |I32 |mg_size |SV* sv
1232p |OP* |mod |OP* o|I32 type
1233p |char* |moreswitches |char* s
1234p |OP* |my |OP* o
cad2e5aa 1235p |NV |my_atof |const char *s
cea2e8a9
GS
1236#if !defined(HAS_BCOPY) || !defined(HAS_SAFE_BCOPY)
1237p |char* |my_bcopy |const char* from|char* to|I32 len
1238#endif
1239#if !defined(HAS_BZERO) && !defined(HAS_MEMSET)
1240p |char* |my_bzero |char* loc|I32 len
1241#endif
1242pr |void |my_exit |U32 status
1243pr |void |my_failure_exit
1244p |I32 |my_fflush_all
1245p |I32 |my_lstat
1246#if !defined(HAS_MEMCMP) || !defined(HAS_SANE_MEMCMP)
1247p |I32 |my_memcmp |const char* s1|const char* s2|I32 len
1248#endif
1249#if !defined(HAS_MEMSET)
1250p |void* |my_memset |char* loc|I32 ch|I32 len
1251#endif
1252#if !defined(PERL_OBJECT)
1253p |I32 |my_pclose |PerlIO* ptr
1254p |PerlIO*|my_popen |char* cmd|char* mode
1255#endif
1256p |void |my_setenv |char* nam|char* val
1257p |I32 |my_stat
1258#if defined(MYSWAP)
1259p |short |my_swap |short s
1260p |long |my_htonl |long l
1261p |long |my_ntohl |long l
1262#endif
1263p |void |my_unexec
1264p |OP* |newANONLIST |OP* o
1265p |OP* |newANONHASH |OP* o
1266p |OP* |newANONSUB |I32 floor|OP* proto|OP* block
1267p |OP* |newASSIGNOP |I32 flags|OP* left|I32 optype|OP* right
1268p |OP* |newCONDOP |I32 flags|OP* expr|OP* trueop|OP* falseop
1269p |void |newCONSTSUB |HV* stash|char* name|SV* sv
1270p |void |newFORM |I32 floor|OP* o|OP* block
1271p |OP* |newFOROP |I32 flags|char* label|line_t forline \
1272 |OP* sclr|OP* expr|OP*block|OP*cont
1273p |OP* |newLOGOP |I32 optype|I32 flags|OP* left|OP* right
1274p |OP* |newLOOPEX |I32 type|OP* label
1275p |OP* |newLOOPOP |I32 flags|I32 debuggable|OP* expr|OP* block
1276p |OP* |newNULLLIST
1277p |OP* |newOP |I32 optype|I32 flags
1278p |void |newPROG |OP* o
1279p |OP* |newRANGE |I32 flags|OP* left|OP* right
1280p |OP* |newSLICEOP |I32 flags|OP* subscript|OP* listop
1281p |OP* |newSTATEOP |I32 flags|char* label|OP* o
1282p |CV* |newSUB |I32 floor|OP* o|OP* proto|OP* block
1283p |CV* |newXS |char* name|XSUBADDR_t f|char* filename
1284p |AV* |newAV
1285p |OP* |newAVREF |OP* o
1286p |OP* |newBINOP |I32 type|I32 flags|OP* first|OP* last
1287p |OP* |newCVREF |I32 flags|OP* o
1288p |OP* |newGVOP |I32 type|I32 flags|GV* gv
1289p |GV* |newGVgen |char* pack
1290p |OP* |newGVREF |I32 type|OP* o
1291p |OP* |newHVREF |OP* o
1292p |HV* |newHV
1293p |HV* |newHVhv |HV* hv
1294p |IO* |newIO
1295p |OP* |newLISTOP |I32 type|I32 flags|OP* first|OP* last
1296p |OP* |newPMOP |I32 type|I32 flags
1297p |OP* |newPVOP |I32 type|I32 flags|char* pv
1298p |SV* |newRV |SV* pref
1299p |SV* |newRV_noinc |SV *sv
1300p |SV* |newSV |STRLEN len
1301p |OP* |newSVREF |OP* o
1302p |OP* |newSVOP |I32 type|I32 flags|SV* sv
1303p |SV* |newSViv |IV i
cad2e5aa 1304p |SV* |newSVnv |NV n
cea2e8a9
GS
1305p |SV* |newSVpv |const char* s|STRLEN len
1306p |SV* |newSVpvn |const char* s|STRLEN len
1307p |SV* |newSVpvf |const char* pat|...
1308p |SV* |newSVrv |SV* rv|const char* classname
1309p |SV* |newSVsv |SV* old
1310p |OP* |newUNOP |I32 type|I32 flags|OP* first
1311p |OP* |newWHILEOP |I32 flags|I32 debuggable|LOOP* loop \
1312 |I32 whileline|OP* expr|OP* block|OP* cont
1313#if defined(USE_THREADS)
1314p |struct perl_thread*|new_struct_thread|struct perl_thread *t
1315#endif
1316p |PERL_SI*|new_stackinfo|I32 stitems|I32 cxitems
1317p |PerlIO*|nextargv |GV* gv
1318p |char* |ninstr |const char* big|const char* bigend \
1319 |const char* little|const char* lend
1320p |OP* |oopsCV |OP* o
1321p |void |op_free |OP* arg
1322p |void |package |OP* o
1323p |PADOFFSET|pad_alloc |I32 optype|U32 tmptype
1324p |PADOFFSET|pad_allocmy |char* name
1325p |PADOFFSET|pad_findmy |char* name
1326p |OP* |oopsAV |OP* o
1327p |OP* |oopsHV |OP* o
1328p |void |pad_leavemy |I32 fill
1329p |SV* |pad_sv |PADOFFSET po
1330p |void |pad_free |PADOFFSET po
1331p |void |pad_reset
1332p |void |pad_swipe |PADOFFSET po
1333p |void |peep |OP* o
0cb96387
GS
1334#if defined(PERL_OBJECT)
1335no |void |perl_construct
1336no |void |perl_destruct
1337no |void |perl_free
1338no |int |perl_run
1339no |int |perl_parse |XSINIT_t xsinit \
1340 |int argc|char** argv|char** env
1341#else
cea2e8a9 1342no |PerlInterpreter* |perl_alloc
0cb96387
GS
1343no |void |perl_construct |PerlInterpreter* sv_interp
1344no |void |perl_destruct |PerlInterpreter* sv_interp
1345no |void |perl_free |PerlInterpreter* sv_interp
1346no |int |perl_run |PerlInterpreter* sv_interp
1347no |int |perl_parse |PerlInterpreter* sv_interp|XSINIT_t xsinit \
1348 |int argc|char** argv|char** env
1349#endif
cea2e8a9
GS
1350p |void |call_atexit |ATEXIT_t fn|void *ptr
1351p |I32 |call_argv |const char* sub_name|I32 flags|char** argv
1352p |I32 |call_method |const char* methname|I32 flags
1353p |I32 |call_pv |const char* sub_name|I32 flags
1354p |I32 |call_sv |SV* sv|I32 flags
cea2e8a9
GS
1355p |SV* |eval_pv |const char* p|I32 croak_on_error
1356p |I32 |eval_sv |SV* sv|I32 flags
cea2e8a9
GS
1357p |SV* |get_sv |const char* name|I32 create
1358p |AV* |get_av |const char* name|I32 create
1359p |HV* |get_hv |const char* name|I32 create
1360p |CV* |get_cv |const char* name|I32 create
1361p |int |init_i18nl10n |int printwarn
1362p |int |init_i18nl14n |int printwarn
1363p |void |new_collate |const char* newcoll
1364p |void |new_ctype |const char* newctype
1365p |void |new_numeric |const char* newcoll
1366p |void |set_numeric_local
097ee67d 1367p |void |set_numeric_radix
cea2e8a9 1368p |void |set_numeric_standard
cea2e8a9 1369p |void |require_pv |const char* pv
cea2e8a9
GS
1370p |void |pidgone |int pid|int status
1371p |void |pmflag |U16* pmfl|int ch
1372p |OP* |pmruntime |OP* pm|OP* expr|OP* repl
1373p |OP* |pmtrans |OP* o|OP* expr|OP* repl
1374p |OP* |pop_return
1375p |void |pop_scope
1376p |OP* |prepend_elem |I32 optype|OP* head|OP* tail
1377p |void |push_return |OP* o
1378p |void |push_scope
1379p |OP* |ref |OP* o|I32 type
1380p |OP* |refkids |OP* o|I32 type
1381p |void |regdump |regexp* r
1382p |I32 |pregexec |regexp* prog|char* stringarg \
1383 |char* strend|char* strbeg|I32 minend \
1384 |SV* screamer|U32 nosave
1385p |void |pregfree |struct regexp* r
1386p |regexp*|pregcomp |char* exp|char* xend|PMOP* pm
cad2e5aa
JH
1387p |char* |re_intuit_start|regexp* prog|SV* sv|char* strpos \
1388 |char* strend|U32 flags \
1389 |struct re_scream_pos_data_s *data
1390p |SV* |re_intuit_string|regexp* prog
cea2e8a9
GS
1391p |I32 |regexec_flags |regexp* prog|char* stringarg \
1392 |char* strend|char* strbeg|I32 minend \
1393 |SV* screamer|void* data|U32 flags
1394p |regnode*|regnext |regnode* p
1395p |void |regprop |SV* sv|regnode* o
1396p |void |repeatcpy |char* to|const char* from|I32 len|I32 count
1397p |char* |rninstr |const char* big|const char* bigend \
1398 |const char* little|const char* lend
1399p |Sighandler_t|rsignal |int i|Sighandler_t t
1400p |int |rsignal_restore|int i|Sigsave_t* t
1401p |int |rsignal_save |int i|Sighandler_t t1|Sigsave_t* t2
1402p |Sighandler_t|rsignal_state|int i
1403p |void |rxres_free |void** rsp
1404p |void |rxres_restore |void** rsp|REGEXP* prx
1405p |void |rxres_save |void** rsp|REGEXP* prx
1406#if !defined(HAS_RENAME)
1407p |I32 |same_dirent |char* a|char* b
1408#endif
1409p |char* |savepv |const char* sv
1410p |char* |savepvn |const char* sv|I32 len
1411p |void |savestack_grow
1412p |void |save_aelem |AV* av|I32 idx|SV **sptr
1413p |I32 |save_alloc |I32 size|I32 pad
1414p |void |save_aptr |AV** aptr
1415p |AV* |save_ary |GV* gv
1416p |void |save_clearsv |SV** svp
1417p |void |save_delete |HV* hv|char* key|I32 klen
1418p |void |save_destructor|DESTRUCTORFUNC_t f|void* p
1419p |void |save_freesv |SV* sv
1420p |void |save_freeop |OP* o
1421p |void |save_freepv |char* pv
1422p |void |save_generic_svref|SV** sptr
1423p |void |save_gp |GV* gv|I32 empty
1424p |HV* |save_hash |GV* gv
1425p |void |save_helem |HV* hv|SV *key|SV **sptr
1426p |void |save_hints
1427p |void |save_hptr |HV** hptr
1428p |void |save_I16 |I16* intp
1429p |void |save_I32 |I32* intp
1430p |void |save_int |int* intp
1431p |void |save_item |SV* item
1432p |void |save_iv |IV* iv
1433p |void |save_list |SV** sarg|I32 maxsarg
1434p |void |save_long |long* longp
1435p |void |save_nogv |GV* gv
1436p |void |save_op
1437p |SV* |save_scalar |GV* gv
1438p |void |save_pptr |char** pptr
1439p |void |save_re_context
1440p |void |save_sptr |SV** sptr
1441p |SV* |save_svref |SV** sptr
1442p |SV** |save_threadsv |PADOFFSET i
1443p |OP* |sawparens |OP* o
1444p |OP* |scalar |OP* o
1445p |OP* |scalarkids |OP* o
1446p |OP* |scalarseq |OP* o
1447p |OP* |scalarvoid |OP* o
1448p |UV |scan_bin |char* start|I32 len|I32* retlen
1449p |UV |scan_hex |char* start|I32 len|I32* retlen
1450p |char* |scan_num |char* s
1451p |UV |scan_oct |char* start|I32 len|I32* retlen
1452p |OP* |scope |OP* o
1453p |char* |screaminstr |SV* bigsv|SV* littlesv|I32 start_shift \
1454 |I32 end_shift|I32 *state|I32 last
1455#if !defined(VMS)
1456p |I32 |setenv_getix |char* nam
1457#endif
1458p |void |setdefout |GV* gv
1459p |char* |sharepvn |const char* sv|I32 len|U32 hash
1460p |HEK* |share_hek |const char* sv|I32 len|U32 hash
1461np |Signal_t |sighandler |int sig
1462p |SV** |stack_grow |SV** sp|SV**p|int n
1463p |I32 |start_subparse |I32 is_format|U32 flags
1464p |void |sub_crush_depth|CV* cv
1465p |bool |sv_2bool |SV* sv
1466p |CV* |sv_2cv |SV* sv|HV** st|GV** gvp|I32 lref
1467p |IO* |sv_2io |SV* sv
1468p |IV |sv_2iv |SV* sv
1469p |SV* |sv_2mortal |SV* sv
cad2e5aa 1470p |NV |sv_2nv |SV* sv
cea2e8a9
GS
1471p |char* |sv_2pv |SV* sv|STRLEN* lp
1472p |UV |sv_2uv |SV* sv
1473p |IV |sv_iv |SV* sv
1474p |UV |sv_uv |SV* sv
cad2e5aa 1475p |NV |sv_nv |SV* sv
cea2e8a9
GS
1476p |char* |sv_pvn |SV *sv|STRLEN *len
1477p |I32 |sv_true |SV *sv
1478p |void |sv_add_arena |char* ptr|U32 size|U32 flags
1479p |int |sv_backoff |SV* sv
1480p |SV* |sv_bless |SV* sv|HV* stash
1481p |void |sv_catpvf |SV* sv|const char* pat|...
1482p |void |sv_catpv |SV* sv|const char* ptr
1483p |void |sv_catpvn |SV* sv|const char* ptr|STRLEN len
1484p |void |sv_catsv |SV* dsv|SV* ssv
1485p |void |sv_chop |SV* sv|char* ptr
1486p |void |sv_clean_all
1487p |void |sv_clean_objs
1488p |void |sv_clear |SV* sv
1489p |I32 |sv_cmp |SV* sv1|SV* sv2
1490p |I32 |sv_cmp_locale |SV* sv1|SV* sv2
1491#if defined(USE_LOCALE_COLLATE)
1492p |char* |sv_collxfrm |SV* sv|STRLEN* nxp
1493#endif
1494p |OP* |sv_compile_2op |SV* sv|OP** startp|char* code|AV** avp
1495p |void |sv_dec |SV* sv
1496p |void |sv_dump |SV* sv
1497p |bool |sv_derived_from|SV* sv|const char* name
1498p |I32 |sv_eq |SV* sv1|SV* sv2
1499p |void |sv_free |SV* sv
1500p |void |sv_free_arenas
1501p |char* |sv_gets |SV* sv|PerlIO* fp|I32 append
1502p |char* |sv_grow |SV* sv|STRLEN newlen
1503p |void |sv_inc |SV* sv
1504p |void |sv_insert |SV* bigsv|STRLEN offset|STRLEN len \
1505 |char* little|STRLEN littlelen
1506p |int |sv_isa |SV* sv|const char* name
1507p |int |sv_isobject |SV* sv
1508p |STRLEN |sv_len |SV* sv
1509p |STRLEN |sv_len_utf8 |SV* sv
1510p |void |sv_magic |SV* sv|SV* obj|int how|const char* name \
1511 |I32 namlen
1512p |SV* |sv_mortalcopy |SV* oldsv
1513p |SV* |sv_newmortal
1514p |SV* |sv_newref |SV* sv
1515p |char* |sv_peek |SV* sv
1516p |void |sv_pos_u2b |SV* sv|I32* offsetp|I32* lenp
1517p |void |sv_pos_b2u |SV* sv|I32* offsetp
1518p |char* |sv_pvn_force |SV* sv|STRLEN* lp
1519p |char* |sv_reftype |SV* sv|int ob
1520p |void |sv_replace |SV* sv|SV* nsv
1521p |void |sv_report_used
1522p |void |sv_reset |char* s|HV* stash
1523p |void |sv_setpvf |SV* sv|const char* pat|...
1524p |void |sv_setiv |SV* sv|IV num
1525p |void |sv_setpviv |SV* sv|IV num
1526p |void |sv_setuv |SV* sv|UV num
cad2e5aa 1527p |void |sv_setnv |SV* sv|NV num
cea2e8a9 1528p |SV* |sv_setref_iv |SV* rv|const char* classname|IV iv
cad2e5aa 1529p |SV* |sv_setref_nv |SV* rv|const char* classname|NV nv
cea2e8a9
GS
1530p |SV* |sv_setref_pv |SV* rv|const char* classname|void* pv
1531p |SV* |sv_setref_pvn |SV* rv|const char* classname|char* pv \
1532 |STRLEN n
1533p |void |sv_setpv |SV* sv|const char* ptr
1534p |void |sv_setpvn |SV* sv|const char* ptr|STRLEN len
1535p |void |sv_setsv |SV* dsv|SV* ssv
1536p |void |sv_taint |SV* sv
1537p |bool |sv_tainted |SV* sv
1538p |int |sv_unmagic |SV* sv|int type
1539p |void |sv_unref |SV* sv
1540p |void |sv_untaint |SV* sv
1541p |bool |sv_upgrade |SV* sv|U32 mt
1542p |void |sv_usepvn |SV* sv|char* ptr|STRLEN len
1543p |void |sv_vcatpvfn |SV* sv|const char* pat|STRLEN patlen \
1544 |va_list* args|SV** svargs|I32 svmax \
1545 |bool *used_locale
1546p |void |sv_vsetpvfn |SV* sv|const char* pat|STRLEN patlen \
1547 |va_list* args|SV** svargs|I32 svmax \
1548 |bool *used_locale
1549p |SV* |swash_init |char* pkg|char* name|SV* listsv \
1550 |I32 minbits|I32 none
1551p |UV |swash_fetch |SV *sv|U8 *ptr
1552p |void |taint_env
1553p |void |taint_proper |const char* f|char* s
1554p |UV |to_utf8_lower |U8 *p
1555p |UV |to_utf8_upper |U8 *p
1556p |UV |to_utf8_title |U8 *p
1557#if defined(UNLINK_ALL_VERSIONS)
1558p |I32 |unlnk |char* f
1559#endif
1560#if defined(USE_THREADS)
1561p |void |unlock_condpair|void* svv
1562#endif
1563p |void |unsharepvn |const char* sv|I32 len|U32 hash
1564p |void |unshare_hek |HEK* hek
1565p |void |utilize |int aver|I32 floor|OP* version|OP* id|OP* arg
1566p |U8* |utf16_to_utf8 |U16* p|U8 *d|I32 bytelen
1567p |U8* |utf16_to_utf8_reversed|U16* p|U8 *d|I32 bytelen
1568p |I32 |utf8_distance |U8 *a|U8 *b
1569p |U8* |utf8_hop |U8 *s|I32 off
1570p |UV |utf8_to_uv |U8 *s|I32* retlen
1571p |U8* |uv_to_utf8 |U8 *d|UV uv
1572p |void |vivify_defelem |SV* sv
1573p |void |vivify_ref |SV* sv|U32 to_what
1574p |I32 |wait4pid |int pid|int* statusp|int flags
1575p |void |warn |const char* pat|...
1576p |void |warner |U32 err|const char* pat|...
1577p |void |watch |char** addr
1578p |I32 |whichsig |char* sig
1579p |int |yyerror |char* s
1580#if defined(USE_PURE_BISON)
1581p |int |yylex |YYSTYPE *lvalp|int *lcharp
1582#else
1583p |int |yylex
1584#endif
1585p |int |yyparse
1586p |int |yywarn |char* s
1587#if defined(MYMALLOC)
1588p |void |dump_mstats |char* s
1589pno |Malloc_t|malloc |MEM_SIZE nbytes
1590pno |Malloc_t|calloc |MEM_SIZE elements|MEM_SIZE size
1591pno |Malloc_t|realloc |Malloc_t where|MEM_SIZE nbytes
1592pno |Free_t |mfree |Malloc_t where
1593#endif
4f63d024
GS
1594pn |Malloc_t|safesysmalloc |MEM_SIZE nbytes
1595pn |Malloc_t|safesyscalloc |MEM_SIZE elements|MEM_SIZE size
1596pn |Malloc_t|safesysrealloc|Malloc_t where|MEM_SIZE nbytes
1597pn |Free_t |safesysfree |Malloc_t where
cea2e8a9 1598#if defined(LEAKTEST)
4f63d024
GS
1599pn |Malloc_t|safexmalloc |I32 x|MEM_SIZE size
1600pn |Malloc_t|safexcalloc |I32 x|MEM_SIZE elements|MEM_SIZE size
1601pn |Malloc_t|safexrealloc |Malloc_t where|MEM_SIZE size
1602pn |void |safexfree |Malloc_t where
cea2e8a9
GS
1603#endif
1604#if defined(PERL_GLOBAL_STRUCT)
1605p |struct perl_vars *|GetVars
1606#endif
cea2e8a9
GS
1607p |int |runops_standard
1608p |int |runops_debug
cea2e8a9
GS
1609p |void |sv_catpvf_mg |SV *sv|const char* pat|...
1610p |void |sv_catpv_mg |SV *sv|const char *ptr
1611p |void |sv_catpvn_mg |SV *sv|const char *ptr|STRLEN len
1612p |void |sv_catsv_mg |SV *dstr|SV *sstr
1613p |void |sv_setpvf_mg |SV *sv|const char* pat|...
1614p |void |sv_setiv_mg |SV *sv|IV i
1615p |void |sv_setpviv_mg |SV *sv|IV iv
1616p |void |sv_setuv_mg |SV *sv|UV u
cad2e5aa 1617p |void |sv_setnv_mg |SV *sv|NV num
cea2e8a9
GS
1618p |void |sv_setpv_mg |SV *sv|const char *ptr
1619p |void |sv_setpvn_mg |SV *sv|const char *ptr|STRLEN len
1620p |void |sv_setsv_mg |SV *dstr|SV *sstr
1621p |void |sv_usepvn_mg |SV *sv|char *ptr|STRLEN len
1622p |MGVTBL*|get_vtbl |int vtbl_id
1623p |char* |pv_display |SV *sv|char *pv|STRLEN cur|STRLEN len \
1624 |STRLEN pvlim
1625p |void |dump_indent |I32 level|PerlIO *file|const char* pat|...
1626p |void |do_gv_dump |I32 level|PerlIO *file|char *name|GV *sv
1627p |void |do_gvgv_dump |I32 level|PerlIO *file|char *name|GV *sv
1628p |void |do_hv_dump |I32 level|PerlIO *file|char *name|HV *sv
1629p |void |do_magic_dump |I32 level|PerlIO *file|MAGIC *mg|I32 nest \
1630 |I32 maxnest|bool dumpops|STRLEN pvlim
1631p |void |do_op_dump |I32 level|PerlIO *file|OP *o
1632p |void |do_pmop_dump |I32 level|PerlIO *file|PMOP *pm
1633p |void |do_sv_dump |I32 level|PerlIO *file|SV *sv|I32 nest \
1634 |I32 maxnest|bool dumpops|STRLEN pvlim
1635p |void |magic_dump |MAGIC *mg
1636p |void* |default_protect|int *excpt|protect_body_t body|...
1637p |void |reginitcolors
1638p |char* |sv_2pv_nolen |SV* sv
1639p |char* |sv_pv |SV *sv
1640p |void |sv_force_normal|SV *sv
1641p |void |tmps_grow |I32 n
1642p |SV* |sv_rvweaken |SV *sv
1643p |int |magic_killbackrefs|SV *sv|MAGIC *mg
1644
0cb96387
GS
1645#if defined(PERL_OBJECT)
1646protected:
1647#endif
1648#if defined(PERL_IN_AV_C) || defined(PERL_DECL_PROT)
cea2e8a9
GS
1649s |I32 |avhv_index_sv |SV* sv
1650#endif
1651
0cb96387 1652#if defined(PERL_IN_DOOP_C) || defined(PERL_DECL_PROT)
cea2e8a9
GS
1653s |I32 |do_trans_CC_simple |SV *sv
1654s |I32 |do_trans_CC_count |SV *sv
1655s |I32 |do_trans_CC_complex |SV *sv
1656s |I32 |do_trans_UU_simple |SV *sv
1657s |I32 |do_trans_UU_count |SV *sv
1658s |I32 |do_trans_UU_complex |SV *sv
1659s |I32 |do_trans_UC_simple |SV *sv
1660s |I32 |do_trans_CU_simple |SV *sv
1661s |I32 |do_trans_UC_trivial |SV *sv
1662s |I32 |do_trans_CU_trivial |SV *sv
1663#endif
1664
0cb96387 1665#if defined(PERL_IN_GV_C) || defined(PERL_DECL_PROT)
cea2e8a9
GS
1666s |void |gv_init_sv |GV *gv|I32 sv_type
1667#endif
1668
0cb96387 1669#if defined(PERL_IN_HV_C) || defined(PERL_DECL_PROT)
cea2e8a9
GS
1670s |void |hsplit |HV *hv
1671s |void |hfreeentries |HV *hv
1672s |void |more_he
1673s |HE* |new_he
1674s |void |del_he |HE *p
1675s |HEK* |save_hek |const char *str|I32 len|U32 hash
1676s |void |hv_magic_check |HV *hv|bool *needs_copy|bool *needs_store
1677#endif
1678
0cb96387 1679#if defined(PERL_IN_MG_C) || defined(PERL_DECL_PROT)
cea2e8a9
GS
1680s |void |save_magic |I32 mgs_ix|SV *sv
1681s |int |magic_methpack |SV *sv|MAGIC *mg|char *meth
1682s |int |magic_methcall |SV *sv|MAGIC *mg|char *meth|I32 f \
1683 |int n|SV *val
cea2e8a9
GS
1684#endif
1685
0cb96387 1686#if defined(PERL_IN_OP_C) || defined(PERL_DECL_PROT)
cea2e8a9
GS
1687s |I32 |list_assignment|OP *o
1688s |void |bad_type |I32 n|char *t|char *name|OP *kid
3eb57f73 1689s |void |cop_free |COP *cop
cea2e8a9
GS
1690s |OP* |modkids |OP *o|I32 type
1691s |void |no_bareword_allowed|OP *o
1692s |OP* |no_fh_allowed |OP *o
1693s |OP* |scalarboolean |OP *o
1694s |OP* |too_few_arguments|OP *o|char* name
1695s |OP* |too_many_arguments|OP *o|char* name
1696s |void |null |OP* o
1697s |PADOFFSET|pad_findlex |char* name|PADOFFSET newoff|U32 seq \
1698 |CV* startcv|I32 cx_ix|I32 saweval|U32 flags
1699s |OP* |newDEFSVOP
1700s |OP* |new_logop |I32 type|I32 flags|OP **firstp|OP **otherp
1701s |void |simplify_sort |OP *o
1702s |bool |is_handle_constructor |OP *o|I32 argnum
1703s |char* |gv_ename |GV *gv
1704s |CV* |cv_clone2 |CV *proto|CV *outside
1705s |bool |scalar_mod_type|OP *o|I32 type
1706# if defined(PL_OP_SLAB_ALLOC)
1707s |void* |Slab_Alloc |int m|size_t sz
1708# endif
1709#endif
1710
0cb96387 1711#if defined(PERL_IN_PERL_C) || defined(PERL_DECL_PROT)
cea2e8a9
GS
1712s |void |find_beginning
1713s |void |forbid_setid |char *
1714s |void |incpush |char *|int
1715s |void |init_interp
1716s |void |init_ids
1717s |void |init_debugger
1718s |void |init_lexer
1719s |void |init_main_stash
1720s |void |init_perllib
1721s |void |init_postdump_symbols|int|char **|char **
1722s |void |init_predump_symbols
1723rs |void |my_exit_jump
1724s |void |nuke_stacks
1725s |void |open_script |char *|bool|SV *|int *fd
1726s |void |usage |char *
1727s |void |validate_suid |char *|char*|int
cea2e8a9
GS
1728# if defined(IAMSUID)
1729s |int |fd_on_nosuid_fs|int fd
1730# endif
1731s |void* |parse_body |va_list args
1732s |void* |run_body |va_list args
1733s |void* |call_body |va_list args
1734s |void |call_xbody |OP *myop|int is_eval
1735s |void* |call_list_body |va_list args
1736# if defined(USE_THREADS)
1737s |struct perl_thread * |init_main_thread
1738# endif
1739#endif
1740
0cb96387 1741#if defined(PERL_IN_PP_C) || defined(PERL_DECL_PROT)
cea2e8a9
GS
1742s |void |doencodes |SV* sv|char* s|I32 len
1743s |SV* |refto |SV* sv
1744s |U32 |seed
1745s |SV* |mul128 |SV *sv|U8 m
1746s |SV* |is_an_int |char *s|STRLEN l
1747s |int |div128 |SV *pnum|bool *done
1748#endif
1749
0cb96387 1750#if defined(PERL_IN_PP_CTL_C) || defined(PERL_DECL_PROT)
cea2e8a9
GS
1751s |OP* |docatch |OP *o
1752s |void* |docatch_body |va_list args
1753s |OP* |dofindlabel |OP *o|char *label|OP **opstack|OP **oplimit
1754s |void |doparseform |SV *sv
1755s |I32 |dopoptoeval |I32 startingblock
1756s |I32 |dopoptolabel |char *label
1757s |I32 |dopoptoloop |I32 startingblock
1758s |I32 |dopoptosub |I32 startingblock
1759s |I32 |dopoptosub_at |PERL_CONTEXT* cxstk|I32 startingblock
1760s |void |free_closures
1761s |void |save_lines |AV *array|SV *sv
1762s |OP* |doeval |int gimme|OP** startop
1763s |PerlIO *|doopen_pmc |const char *name|const char *mode
1764s |void |qsortsv |SV ** array|size_t num_elts|SVCOMPARE_t f
cea2e8a9
GS
1765#endif
1766
0cb96387 1767#if defined(PERL_IN_PP_HOT_C) || defined(PERL_DECL_PROT)
cea2e8a9 1768s |CV* |get_db_sub |SV **svp|CV *cv
cea2e8a9
GS
1769#endif
1770
0cb96387 1771#if defined(PERL_IN_PP_SYS_C) || defined(PERL_DECL_PROT)
cea2e8a9
GS
1772s |OP* |doform |CV *cv|GV *gv|OP *retop
1773s |int |emulate_eaccess|const char* path|int mode
1774# if !defined(HAS_MKDIR) || !defined(HAS_RMDIR)
1775s |int |dooneliner |char *cmd|char *filename
1776# endif
1777#endif
1778
0cb96387 1779#if defined(PERL_IN_REGCOMP_C) || defined(PERL_DECL_PROT)
cea2e8a9
GS
1780s |regnode*|reg |I32|I32 *
1781s |regnode*|reganode |U8|U32
1782s |regnode*|regatom |I32 *
1783s |regnode*|regbranch |I32 *|I32
1784s |void |regc |U8|char *
1785s |void |reguni |UV|char *|I32*
1786s |regnode*|regclass
1787s |regnode*|regclassutf8
1788s |I32 |regcurly |char *
1789s |regnode*|reg_node |U8
1790s |regnode*|regpiece |I32 *
1791s |void |reginsert |U8|regnode *
1792s |void |regoptail |regnode *|regnode *
1793s |void |regtail |regnode *|regnode *
1794s |char*|regwhite |char *|char *
1795s |char*|nextchar
1796s |regnode*|dumpuntil |regnode *start|regnode *node \
1797 |regnode *last|SV* sv|I32 l
1798s |void |scan_commit |scan_data_t *data
1799s |I32 |study_chunk |regnode **scanp|I32 *deltap \
1800 |regnode *last|scan_data_t *data|U32 flags
1801s |I32 |add_data |I32 n|char *s
1802rs |void|re_croak2 |const char* pat1|const char* pat2|...
b8c5462f
JH
1803s |I32 |regpposixcc |I32 value
1804s |void |checkposixcc
cea2e8a9
GS
1805#endif
1806
0cb96387 1807#if defined(PERL_IN_REGEXEC_C) || defined(PERL_DECL_PROT)
cea2e8a9
GS
1808s |I32 |regmatch |regnode *prog
1809s |I32 |regrepeat |regnode *p|I32 max
1810s |I32 |regrepeat_hard |regnode *p|I32 max|I32 *lp
1811s |I32 |regtry |regexp *prog|char *startpos
1812s |bool |reginclass |char *p|I32 c
1813s |bool |reginclassutf8 |regnode *f|U8* p
1814s |CHECKPOINT|regcppush |I32 parenfloor
1815s |char*|regcppop
1816s |char*|regcp_set_to |I32 ss
1817s |void |cache_re |regexp *prog
cea2e8a9
GS
1818s |U8* |reghop |U8 *pos|I32 off
1819s |U8* |reghopmaybe |U8 *pos|I32 off
1820#endif
1821
0cb96387 1822#if defined(PERL_IN_RUN_C) || defined(PERL_DECL_PROT)
cea2e8a9
GS
1823s |void |debprof |OP *o
1824#endif
1825
0cb96387 1826#if defined(PERL_IN_SCOPE_C) || defined(PERL_DECL_PROT)
cea2e8a9
GS
1827s |SV* |save_scalar_at |SV **sptr
1828#endif
1829
0cb96387 1830#if defined(PERL_IN_SV_C) || defined(PERL_DECL_PROT)
cea2e8a9
GS
1831s |IV |asIV |SV* sv
1832s |UV |asUV |SV* sv
1833s |SV* |more_sv
1834s |void |more_xiv
1835s |void |more_xnv
1836s |void |more_xpv
1837s |void |more_xrv
1838s |XPVIV* |new_xiv
1839s |XPVNV* |new_xnv
1840s |XPV* |new_xpv
1841s |XRV* |new_xrv
1842s |void |del_xiv |XPVIV* p
1843s |void |del_xnv |XPVNV* p
1844s |void |del_xpv |XPV* p
1845s |void |del_xrv |XRV* p
1846s |void |sv_unglob |SV* sv
cea2e8a9
GS
1847s |void |not_a_number |SV *sv
1848s |void |visit |SVFUNC_t f
1849# if defined(PURIFY)
1850s |void |reg_add |SV *sv
1851s |void |reg_remove |SV *sv
1852# else
4f63d024 1853ns |void* |my_safemalloc |MEM_SIZE size
cea2e8a9
GS
1854# endif
1855s |void |sv_add_backref |SV *tsv|SV *sv
1856s |void |sv_del_backref |SV *sv
1857# if defined(DEBUGGING)
1858s |void |del_sv |SV *p
1859# endif
1860#endif
1861
0cb96387 1862#if defined(PERL_IN_TOKE_C) || defined(PERL_DECL_PROT)
cea2e8a9
GS
1863s |void |check_uni
1864s |void |force_next |I32 type
1865s |char* |force_version |char *start
1866s |char* |force_word |char *start|int token|int check_keyword \
1867 |int allow_pack|int allow_tick
1868s |SV* |tokeq |SV *sv
1869s |char* |scan_const |char *start
1870s |char* |scan_formline |char *s
1871s |char* |scan_heredoc |char *s
1872s |char* |scan_ident |char *s|char *send|char *dest \
1873 |STRLEN destlen|I32 ck_uni
1874s |char* |scan_inputsymbol|char *start
1875s |char* |scan_pat |char *start|I32 type
1876s |char* |scan_str |char *start
1877s |char* |scan_subst |char *start
1878s |char* |scan_trans |char *start
1879s |char* |scan_word |char *s|char *dest|STRLEN destlen \
1880 |int allow_package|STRLEN *slp
1881s |char* |skipspace |char *s
1882s |void |checkcomma |char *s|char *name|char *what
1883s |void |force_ident |char *s|int kind
1884s |void |incline |char *s
1885s |int |intuit_method |char *s|GV *gv
1886s |int |intuit_more |char *s
1887s |I32 |lop |I32 f|expectation x|char *s
1888s |void |missingterm |char *s
1889s |void |no_op |char *what|char *s
1890s |void |set_csh
1891s |I32 |sublex_done
1892s |I32 |sublex_push
1893s |I32 |sublex_start
1894s |char * |filter_gets |SV *sv|PerlIO *fp|STRLEN append
1895s |SV* |new_constant |char *s|STRLEN len|char *key|SV *sv \
1896 |SV *pv|char *type
1897s |int |ao |int toketype
1898s |void |depcom
1899s |char* |incl_perldb
1900s |I32 |utf16_textfilter|int idx|SV *sv|int maxlen
1901s |I32 |utf16rev_textfilter|int idx|SV *sv|int maxlen
cea2e8a9
GS
1902# if defined(CRIPPLED_CC)
1903s |int |uni |I32 f|char *s
1904# endif
1905# if defined(WIN32)
1906s |I32 |win32_textfilter |int idx|SV *sv|int maxlen
1907# endif
1908#endif
1909
0cb96387 1910#if defined(PERL_IN_UNIVERSAL_C) || defined(PERL_DECL_PROT)
cea2e8a9
GS
1911s |SV*|isa_lookup |HV *stash|const char *name|int len|int level
1912#endif
1913
0cb96387 1914#if defined(PERL_IN_UTIL_C) || defined(PERL_DECL_PROT)
cea2e8a9
GS
1915s |SV* |mess_alloc
1916rs |void |do_croak |const char *pat|va_list *args
1917s |void |do_warn |const char *pat|va_list *args
0cb96387 1918s |OP* |do_die |const char *pat|va_list *args
cea2e8a9
GS
1919# if defined(LEAKTEST)
1920s |void |xstat |int
1921# endif
1922#endif