Put back the cygwin32 Configure fix of 3582 undone by 3597.
[p5sagit/p5-mst-13.2.git] / opcode.pl
index b9b0b8a..50a767b 100755 (executable)
--- a/opcode.pl
+++ b/opcode.pl
@@ -46,6 +46,9 @@ print "\n#define MAXO ", scalar @ops, "\n\n";
 # Emit op names and descriptions.
 
 print <<END;
+
+START_EXTERN_C
+
 #ifndef DOINIT
 EXT char *PL_op_name[];
 #else
@@ -77,41 +80,32 @@ print <<END;
 };
 #endif
 
-#ifndef PERL_OBJECT
-START_EXTERN_C
-
-#undef PERL_CKDEF
-#undef PERL_PPDEF
-#define PERL_CKDEF(s) OP *s (pTHX_ OP *o);
-#define PERL_PPDEF(s) OP *s (pTHX_ 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) {
@@ -128,9 +122,9 @@ 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) {
@@ -208,6 +202,8 @@ for (@ops) {
 print <<END;
 };
 #endif
+
+END_EXTERN_C
 END
 
 close OC or die "Error closing opcode.h: $!";
@@ -275,7 +271,7 @@ rv2cv               subroutine deref        ck_rvconst      d1
 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?