Partial cleanup
[p5sagit/p5-mst-13.2.git] / opcode.h
index fd12e46..a8a0439 100644 (file)
--- a/opcode.h
+++ b/opcode.h
 
 START_EXTERN_C
 
+#ifdef PERL_CUSTOM_OPS
+#define OP_NAME(o) (o->op_type == OP_CUSTOM ? custom_op_name(o) : \
+                    PL_op_name[o->op_type])
+#define OP_DESC(o) (o->op_type == OP_CUSTOM ? custom_op_desc(o) : \
+                    PL_op_desc[o->op_type])
+#else
+#define OP_NAME(o) PL_op_name[o->op_type]
+#define OP_DESC(o) PL_op_desc[o->op_type]
+#endif
+
 #ifndef DOINIT
 EXT char *PL_op_name[];
 #else
@@ -366,6 +376,7 @@ EXT char *PL_op_name[] = {
        "threadsv",
        "setstate",
        "method_named",
+       "custom",
 };
 #endif
 
@@ -724,6 +735,7 @@ EXT char *PL_op_desc[] = {
        "per-thread value",
        "set statement info",
        "method with known name",
+       "unknown custom operator",
 };
 #endif
 
@@ -1289,7 +1301,7 @@ EXT OP * (CPERLscope(*PL_check)[]) (pTHX_ OP *op) = {
        MEMBER_TO_FPTR(Perl_ck_fun),    /* close */
        MEMBER_TO_FPTR(Perl_ck_fun),    /* pipe_op */
        MEMBER_TO_FPTR(Perl_ck_fun),    /* fileno */
-       MEMBER_TO_FPTR(Perl_ck_octmode),        /* umask */
+       MEMBER_TO_FPTR(Perl_ck_fun),    /* umask */
        MEMBER_TO_FPTR(Perl_ck_fun),    /* binmode */
        MEMBER_TO_FPTR(Perl_ck_fun),    /* tie */
        MEMBER_TO_FPTR(Perl_ck_fun),    /* untie */
@@ -1361,13 +1373,13 @@ EXT OP * (CPERLscope(*PL_check)[]) (pTHX_ OP *op) = {
        MEMBER_TO_FPTR(Perl_ck_fun),    /* chown */
        MEMBER_TO_FPTR(Perl_ck_fun),    /* chroot */
        MEMBER_TO_FPTR(Perl_ck_fun),    /* unlink */
-       MEMBER_TO_FPTR(Perl_ck_octmode),        /* chmod */
+       MEMBER_TO_FPTR(Perl_ck_fun),    /* chmod */
        MEMBER_TO_FPTR(Perl_ck_fun),    /* utime */
        MEMBER_TO_FPTR(Perl_ck_fun),    /* rename */
        MEMBER_TO_FPTR(Perl_ck_fun),    /* link */
        MEMBER_TO_FPTR(Perl_ck_fun),    /* symlink */
        MEMBER_TO_FPTR(Perl_ck_fun),    /* readlink */
-       MEMBER_TO_FPTR(Perl_ck_octmode),        /* mkdir */
+       MEMBER_TO_FPTR(Perl_ck_fun),    /* mkdir */
        MEMBER_TO_FPTR(Perl_ck_fun),    /* rmdir */
        MEMBER_TO_FPTR(Perl_ck_fun),    /* open_dir */
        MEMBER_TO_FPTR(Perl_ck_fun),    /* readdir */
@@ -1445,6 +1457,7 @@ EXT OP * (CPERLscope(*PL_check)[]) (pTHX_ OP *op) = {
        MEMBER_TO_FPTR(Perl_ck_null),   /* threadsv */
        MEMBER_TO_FPTR(Perl_ck_null),   /* setstate */
        MEMBER_TO_FPTR(Perl_ck_null),   /* method_named */
+       MEMBER_TO_FPTR(Perl_ck_null),   /* custom */
 };
 #endif
 
@@ -1803,6 +1816,7 @@ EXT U32 PL_opargs[] = {
        0x00000044,     /* threadsv */
        0x00001404,     /* setstate */
        0x00000c40,     /* method_named */
+       0x00000000,     /* custom */
 };
 #endif