add ck_sysread() for better sysread/read/recv sanity
[p5sagit/p5-mst-13.2.git] / opcode.h
index e243548..435b7d2 100644 (file)
--- a/opcode.h
+++ b/opcode.h
@@ -1061,6 +1061,7 @@ EXT char *op_desc[] = {
 };
 #endif
 
+#ifndef PERL_OBJECT
 START_EXTERN_C
 
 OP *   ck_anoncode     _((OP* o));
@@ -1094,6 +1095,7 @@ OP *      ck_spair        _((OP* o));
 OP *   ck_split        _((OP* o));
 OP *   ck_subr         _((OP* o));
 OP *   ck_svconst      _((OP* o));
+OP *   ck_sysread      _((OP* o));
 OP *   ck_trunc        _((OP* o));
 
 OP *   pp_null         _((ARGSproto));
@@ -1444,11 +1446,13 @@ OP *    pp_lock         _((ARGSproto));
 OP *   pp_threadsv     _((ARGSproto));
 
 END_EXTERN_C
+#endif /* PERL_OBJECT */
 
 #ifndef DOINIT
-EXT OP * (*ppaddr[])(ARGSproto);
+EXT OP * (CPERLscope(*ppaddr)[])(ARGSproto);
 #else
-EXT OP * (*ppaddr[])(ARGSproto) = {
+#ifndef PERL_OBJECT
+EXT OP * (CPERLscope(*ppaddr)[])(ARGSproto) = {
        pp_null,
        pp_stub,
        pp_scalar,
@@ -1796,12 +1800,14 @@ EXT OP * (*ppaddr[])(ARGSproto) = {
        pp_lock,
        pp_threadsv,
 };
+#endif /* PERL_OBJECT */
 #endif
 
 #ifndef DOINIT
-EXT OP * (*check[]) _((OP *op));
+EXT OP * (CPERLscope(*check)[]) _((OP *op));
 #else
-EXT OP * (*check[]) _((OP *op)) = {
+#ifndef PERL_OBJECT
+EXT OP * (CPERLscope(*check)[]) _((OP *op)) = {
        ck_null,        /* null */
        ck_null,        /* stub */
        ck_fun,         /* scalar */
@@ -2004,17 +2010,17 @@ EXT OP * (*check[]) _((OP *op)) = {
        ck_select,      /* sselect */
        ck_select,      /* select */
        ck_eof,         /* getc */
-       ck_fun,         /* read */
+       ck_sysread,     /* read */
        ck_fun,         /* enterwrite */
        ck_null,        /* leavewrite */
        ck_listiob,     /* prtf */
        ck_listiob,     /* print */
        ck_fun,         /* sysopen */
        ck_fun,         /* sysseek */
-       ck_fun,         /* sysread */
+       ck_sysread,     /* sysread */
        ck_fun,         /* syswrite */
        ck_fun,         /* send */
-       ck_fun,         /* recv */
+       ck_sysread,     /* recv */
        ck_eof,         /* eof */
        ck_fun,         /* tell */
        ck_fun,         /* seek */
@@ -2149,6 +2155,7 @@ EXT OP * (*check[]) _((OP *op)) = {
        ck_rfun,        /* lock */
        ck_null,        /* threadsv */
 };
+#endif /* PERL_OBJECT */
 #endif
 
 #ifndef DOINIT
@@ -2175,8 +2182,8 @@ EXT U32 opargs[] = {
        0x00000140,     /* rv2cv */
        0x00000700,     /* anoncode */
        0x00001c04,     /* prototype */
-       0x00002001,     /* refgen */
-       0x00001006,     /* srefgen */
+       0x00002101,     /* refgen */
+       0x00001106,     /* srefgen */
        0x00009c8c,     /* ref */
        0x00091504,     /* bless */
        0x00000c08,     /* backtick */
@@ -2264,7 +2271,7 @@ EXT U32 opargs[] = {
        0x00009c8e,     /* oct */
        0x00009c8e,     /* abs */
        0x00009c9c,     /* length */
-       0x0091150c,     /* substr */
+       0x0991150c,     /* substr */
        0x0011151c,     /* vec */
        0x0091151c,     /* index */
        0x0091151c,     /* rindex */