$i = 0;
print <<"END";
-#define pp_i_preinc pp_preinc
-#define pp_i_predec pp_predec
-#define pp_i_postinc pp_postinc
-#define pp_i_postdec pp_postdec
+#define Perl_pp_i_preinc Perl_pp_preinc
+#define Perl_pp_i_predec Perl_pp_predec
+#define Perl_pp_i_postinc Perl_pp_postinc
+#define Perl_pp_i_postdec Perl_pp_postdec
typedef enum {
END
# Emit op names and descriptions.
print <<END;
+
+START_EXTERN_C
+
#ifndef DOINIT
EXT char *PL_op_name[];
#else
};
#endif
-#ifndef PERL_OBJECT
-START_EXTERN_C
-
-#undef PERL_CKDEF
-#undef PERL_PPDEF
-#define PERL_CKDEF(s) OP *s _((OP *o));
-#define PERL_PPDEF(s) OP *s _((ARGSproto));
-
-#include "pp_proto.h"
+END_EXTERN_C
END
# Emit function declarations.
#for (sort keys %ckname) {
-# print "OP *\t", &tab(3,$_),"_((OP* o));\n";
+# print "OP *\t", &tab(3,$_),"(pTHX_ OP* o);\n";
#}
#
#print "\n";
#
#for (@ops) {
-# print "OP *\t", &tab(3, "pp_$_"), "_((ARGSproto));\n";
+# print "OP *\t", &tab(3, "pp_$_"), "(pTHX);\n";
#}
# Emit ppcode switch array.
print <<END;
-END_EXTERN_C
-#endif /* PERL_OBJECT */
+START_EXTERN_C
#ifndef DOINIT
-EXT OP * (CPERLscope(*PL_ppaddr)[])(ARGSproto);
+EXT OP * (CPERLscope(*PL_ppaddr)[])(pTHX);
#else
-EXT OP * (CPERLscope(*PL_ppaddr)[])(ARGSproto) = {
+EXT OP * (CPERLscope(*PL_ppaddr)[])(pTHX) = {
END
for (@ops) {
- print "\tpp_$_,\n";
+ print "\tPerl_pp_$_,\n";
}
print <<END;
print <<END;
#ifndef DOINIT
-EXT OP * (CPERLscope(*PL_check)[]) _((OP *op));
+EXT OP * (CPERLscope(*PL_check)[]) (pTHX_ OP *op);
#else
-EXT OP * (CPERLscope(*PL_check)[]) _((OP *op)) = {
+EXT OP * (CPERLscope(*PL_check)[]) (pTHX_ OP *op) = {
END
for (@ops) {
- print "\t", &tab(3, "$check{$_},"), "/* $_ */\n";
+ print "\t", &tab(3, "Perl_$check{$_},"), "/* $_ */\n";
}
print <<END;
print <<END;
};
#endif
+
+END_EXTERN_C
END
close OC or die "Error closing opcode.h: $!";
open PPSYM, '>pp.sym' or die "Error creating pp.sym: $!";
for (sort keys %ckname) {
- print PP "PERL_CKDEF($_)\n";
-#OP *\t", &tab(3,$_),"_((OP* o));\n";
+ print PP "PERL_CKDEF(Perl_$_)\n";
+ print PPSYM "Perl_$_\n";
+#OP *\t", &tab(3,$_),"(OP* o);\n";
}
print PP "\n\n";
for (@ops) {
next if /^i_(pre|post)(inc|dec)$/;
- print PP "PERL_PPDEF(pp_$_)\n";
- print PPSYM "pp_$_\n";
+ print PP "PERL_PPDEF(Perl_pp_$_)\n";
+ print PPSYM "Perl_pp_$_\n";
}
close PP or die "Error closing pp_proto.h: $!";
anoncode anonymous subroutine ck_anoncode $
prototype subroutine prototype ck_null s% S
refgen reference constructor ck_spair m1 L
-srefgen scalar ref constructor ck_null fs1 S
+srefgen single ref constructor ck_null fs1 S
ref reference-type operator ck_fun stu% S?
bless bless ck_fun s@ S S?
schop scalar chop ck_null stu% S?
chomp safe chop ck_spair mts% L
schomp scalar safe chop ck_null stu% S?
-defined defined operator ck_rfun isu% S?
+defined defined operator ck_defined isu% S?
undef undef operator ck_lfun s% S?
study study ck_fun su% S?
pos match position ck_lfun stu% S?