This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
Regen headers
authorArtur Bergman <sky@nanisky.com>
Mon, 27 Aug 2001 18:21:27 +0000 (18:21 +0000)
committerArtur Bergman <sky@nanisky.com>
Mon, 27 Aug 2001 18:21:27 +0000 (18:21 +0000)
p4raw-id: //depot/perl@11760

embed.h
embedvar.h
objXSUB.h
opcode.h
opnames.h
perlapi.c
perlapi.h
proto.h

diff --git a/embed.h b/embed.h
index fd76501..bc39f88 100644 (file)
--- a/embed.h
+++ b/embed.h
 #define sys_intern_clear       Perl_sys_intern_clear
 #define sys_intern_init                Perl_sys_intern_init
 #endif
+#if defined(PERL_CUSTOM_OPS)
+#define custom_op_name         Perl_custom_op_name
+#define custom_op_desc         Perl_custom_op_desc
+#endif
+#if defined(PERL_CUSTOM_OPS)
+#define custom_op_name         Perl_custom_op_name
+#define custom_op_desc         Perl_custom_op_desc
+#endif
+#if defined(PERL_CUSTOM_OPS)
+#define custom_op_name         Perl_custom_op_name
+#define custom_op_desc         Perl_custom_op_desc
+#endif
 #if defined(PERL_OBJECT)
 #else
 #endif
 #define sys_intern_clear()     Perl_sys_intern_clear(aTHX)
 #define sys_intern_init()      Perl_sys_intern_init(aTHX)
 #endif
+#if defined(PERL_CUSTOM_OPS)
+#define custom_op_name(a)      Perl_custom_op_name(aTHX_ a)
+#define custom_op_desc(a)      Perl_custom_op_desc(aTHX_ a)
+#endif
+#if defined(PERL_CUSTOM_OPS)
+#define custom_op_name(a)      Perl_custom_op_name(aTHX_ a)
+#define custom_op_desc(a)      Perl_custom_op_desc(aTHX_ a)
+#endif
+#if defined(PERL_CUSTOM_OPS)
+#define custom_op_name(a)      Perl_custom_op_name(aTHX_ a)
+#define custom_op_desc(a)      Perl_custom_op_desc(aTHX_ a)
+#endif
 #if defined(PERL_OBJECT)
 #else
 #endif
 #define Perl_sys_intern_init   CPerlObj::Perl_sys_intern_init
 #define sys_intern_init                Perl_sys_intern_init
 #endif
+#if defined(PERL_CUSTOM_OPS)
+#define Perl_custom_op_name    CPerlObj::Perl_custom_op_name
+#define custom_op_name         Perl_custom_op_name
+#define Perl_custom_op_desc    CPerlObj::Perl_custom_op_desc
+#define custom_op_desc         Perl_custom_op_desc
+#endif
+#if defined(PERL_CUSTOM_OPS)
+#define Perl_custom_op_name    CPerlObj::Perl_custom_op_name
+#define custom_op_name         Perl_custom_op_name
+#define Perl_custom_op_desc    CPerlObj::Perl_custom_op_desc
+#define custom_op_desc         Perl_custom_op_desc
+#endif
+#if defined(PERL_CUSTOM_OPS)
+#define Perl_custom_op_name    CPerlObj::Perl_custom_op_name
+#define custom_op_name         Perl_custom_op_name
+#define Perl_custom_op_desc    CPerlObj::Perl_custom_op_desc
+#define custom_op_desc         Perl_custom_op_desc
+#endif
 #if defined(PERL_OBJECT)
 #else
 #endif
index 3af647c..9198d2e 100644 (file)
 #define PL_curcopdb            (PERL_GET_INTERP->Icurcopdb)
 #define PL_curstname           (PERL_GET_INTERP->Icurstname)
 #define PL_curthr              (PERL_GET_INTERP->Icurthr)
+#define PL_custom_op_descs     (PERL_GET_INTERP->Icustom_op_descs)
+#define PL_custom_op_names     (PERL_GET_INTERP->Icustom_op_names)
 #define PL_dbargs              (PERL_GET_INTERP->Idbargs)
 #define PL_debstash            (PERL_GET_INTERP->Idebstash)
 #define PL_debug               (PERL_GET_INTERP->Idebug)
 #define PL_curcopdb            (vTHX->Icurcopdb)
 #define PL_curstname           (vTHX->Icurstname)
 #define PL_curthr              (vTHX->Icurthr)
+#define PL_custom_op_descs     (vTHX->Icustom_op_descs)
+#define PL_custom_op_names     (vTHX->Icustom_op_names)
 #define PL_dbargs              (vTHX->Idbargs)
 #define PL_debstash            (vTHX->Idebstash)
 #define PL_debug               (vTHX->Idebug)
 #define PL_curcopdb            (aTHXo->interp.Icurcopdb)
 #define PL_curstname           (aTHXo->interp.Icurstname)
 #define PL_curthr              (aTHXo->interp.Icurthr)
+#define PL_custom_op_descs     (aTHXo->interp.Icustom_op_descs)
+#define PL_custom_op_names     (aTHXo->interp.Icustom_op_names)
 #define PL_dbargs              (aTHXo->interp.Idbargs)
 #define PL_debstash            (aTHXo->interp.Idebstash)
 #define PL_debug               (aTHXo->interp.Idebug)
 #define PL_Icurcopdb           PL_curcopdb
 #define PL_Icurstname          PL_curstname
 #define PL_Icurthr             PL_curthr
+#define PL_Icustom_op_descs    PL_custom_op_descs
+#define PL_Icustom_op_names    PL_custom_op_names
 #define PL_Idbargs             PL_dbargs
 #define PL_Idebstash           PL_debstash
 #define PL_Idebug              PL_debug
index 7b56e1f..50033c6 100644 (file)
--- a/objXSUB.h
+++ b/objXSUB.h
 #undef  sys_intern_init
 #define sys_intern_init                Perl_sys_intern_init
 #endif
+#if defined(PERL_CUSTOM_OPS)
+#undef  Perl_custom_op_name
+#define Perl_custom_op_name    pPerl->Perl_custom_op_name
+#undef  custom_op_name
+#define custom_op_name         Perl_custom_op_name
+#undef  Perl_custom_op_desc
+#define Perl_custom_op_desc    pPerl->Perl_custom_op_desc
+#undef  custom_op_desc
+#define custom_op_desc         Perl_custom_op_desc
+#endif
+#if defined(PERL_CUSTOM_OPS)
+#undef  Perl_custom_op_name
+#define Perl_custom_op_name    pPerl->Perl_custom_op_name
+#undef  custom_op_name
+#define custom_op_name         Perl_custom_op_name
+#undef  Perl_custom_op_desc
+#define Perl_custom_op_desc    pPerl->Perl_custom_op_desc
+#undef  custom_op_desc
+#define custom_op_desc         Perl_custom_op_desc
+#endif
+#if defined(PERL_CUSTOM_OPS)
+#undef  Perl_custom_op_name
+#define Perl_custom_op_name    pPerl->Perl_custom_op_name
+#undef  custom_op_name
+#define custom_op_name         Perl_custom_op_name
+#undef  Perl_custom_op_desc
+#define Perl_custom_op_desc    pPerl->Perl_custom_op_desc
+#undef  custom_op_desc
+#define custom_op_desc         Perl_custom_op_desc
+#endif
 #if defined(PERL_OBJECT)
 #else
 #endif
index 28f1345..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
 
@@ -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
 
index ac726b9..a6f576e 100644 (file)
--- a/opnames.h
+++ b/opnames.h
@@ -355,10 +355,11 @@ typedef enum opcode {
        OP_THREADSV,    /* 348 */
        OP_SETSTATE,    /* 349 */
        OP_METHOD_NAMED,/* 350 */
+       OP_CUSTOM,      /* 351 */
        OP_max          
 } opcode;
 
-#define MAXO 351
+#define MAXO 352
 #define OP_phoney_INPUT_ONLY -1
 #define OP_phoney_OUTPUT_ONLY -2
 
index 5613a00..e058f83 100644 (file)
--- a/perlapi.c
+++ b/perlapi.c
@@ -4213,6 +4213,54 @@ Perl_sys_intern_init(pTHXo)
     ((CPerlObj*)pPerl)->Perl_sys_intern_init();
 }
 #endif
+#if defined(PERL_CUSTOM_OPS)
+
+#undef  Perl_custom_op_name
+char *
+Perl_custom_op_name(pTHXo_ OP* op)
+{
+    return ((CPerlObj*)pPerl)->Perl_custom_op_name(op);
+}
+
+#undef  Perl_custom_op_desc
+char *
+Perl_custom_op_desc(pTHXo_ OP* op)
+{
+    return ((CPerlObj*)pPerl)->Perl_custom_op_desc(op);
+}
+#endif
+#if defined(PERL_CUSTOM_OPS)
+
+#undef  Perl_custom_op_name
+char *
+Perl_custom_op_name(pTHXo_ OP* op)
+{
+    return ((CPerlObj*)pPerl)->Perl_custom_op_name(op);
+}
+
+#undef  Perl_custom_op_desc
+char *
+Perl_custom_op_desc(pTHXo_ OP* op)
+{
+    return ((CPerlObj*)pPerl)->Perl_custom_op_desc(op);
+}
+#endif
+#if defined(PERL_CUSTOM_OPS)
+
+#undef  Perl_custom_op_name
+char *
+Perl_custom_op_name(pTHXo_ OP* op)
+{
+    return ((CPerlObj*)pPerl)->Perl_custom_op_name(op);
+}
+
+#undef  Perl_custom_op_desc
+char *
+Perl_custom_op_desc(pTHXo_ OP* op)
+{
+    return ((CPerlObj*)pPerl)->Perl_custom_op_desc(op);
+}
+#endif
 #if defined(PERL_OBJECT)
 #else
 #endif
index 8c9bb5c..92d4852 100644 (file)
--- a/perlapi.h
+++ b/perlapi.h
@@ -180,6 +180,10 @@ START_EXTERN_C
 #define PL_curstname           (*Perl_Icurstname_ptr(aTHXo))
 #undef  PL_curthr
 #define PL_curthr              (*Perl_Icurthr_ptr(aTHXo))
+#undef  PL_custom_op_descs
+#define PL_custom_op_descs     (*Perl_Icustom_op_descs_ptr(aTHXo))
+#undef  PL_custom_op_names
+#define PL_custom_op_names     (*Perl_Icustom_op_names_ptr(aTHXo))
 #undef  PL_dbargs
 #define PL_dbargs              (*Perl_Idbargs_ptr(aTHXo))
 #undef  PL_debstash
diff --git a/proto.h b/proto.h
index 92c0d7a..7089f95 100644 (file)
--- a/proto.h
+++ b/proto.h
@@ -984,6 +984,18 @@ PERL_CALLCONV void Perl_ptr_table_free(pTHX_ PTR_TBL_t *tbl);
 PERL_CALLCONV void     Perl_sys_intern_clear(pTHX);
 PERL_CALLCONV void     Perl_sys_intern_init(pTHX);
 #endif
+#if defined(PERL_CUSTOM_OPS)
+PERL_CALLCONV char *   Perl_custom_op_name(pTHX_ OP* op);
+PERL_CALLCONV char *   Perl_custom_op_desc(pTHX_ OP* op);
+#endif
+#if defined(PERL_CUSTOM_OPS)
+PERL_CALLCONV char *   Perl_custom_op_name(pTHX_ OP* op);
+PERL_CALLCONV char *   Perl_custom_op_desc(pTHX_ OP* op);
+#endif
+#if defined(PERL_CUSTOM_OPS)
+PERL_CALLCONV char *   Perl_custom_op_name(pTHX_ OP* op);
+PERL_CALLCONV char *   Perl_custom_op_desc(pTHX_ OP* op);
+#endif
 
 #if defined(PERL_OBJECT)
 protected: