summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xembed.pl4
-rw-r--r--intrpvar.h4
-rw-r--r--makedef.pl1
-rw-r--r--op.c9
-rwxr-xr-xopcode.pl6
-rw-r--r--sv.c2
6 files changed, 12 insertions, 14 deletions
diff --git a/embed.pl b/embed.pl
index fa0a639ef8..bbb03c3d8d 100755
--- a/embed.pl
+++ b/embed.pl
@@ -1967,10 +1967,10 @@ Ap |void |ptr_table_free|PTR_TBL_t *tbl
Ap |void |sys_intern_clear
Ap |void |sys_intern_init
#endif
-#if defined(PERL_CUSTOM_OPS)
+
Ap |char * |custom_op_name|OP* op
Ap |char * |custom_op_desc|OP* op
-#endif
+
END_EXTERN_C
diff --git a/intrpvar.h b/intrpvar.h
index fd39a09f87..1559aaa77c 100644
--- a/intrpvar.h
+++ b/intrpvar.h
@@ -487,10 +487,10 @@ PERLVAR(Ireentrant_buffer, REBUF*) /* here we store the _r buffers */
PERLVAR(Isavebegin, bool) /* save BEGINs for compiler */
-#ifdef PERL_CUSTOM_OPS
+
PERLVAR(Icustom_op_names, HV*) /* Names of user defined ops */
PERLVAR(Icustom_op_descs, HV*) /* Descriptions of user defined ops */
-#endif
+
/* New variables must be added to the very end for binary compatibility.
* XSUB.h provides wrapper functions via perlapi.h that make this
* irrelevant, but not all code may be expected to #include XSUB.h. */
diff --git a/makedef.pl b/makedef.pl
index 70f9471d34..2b8e636b62 100644
--- a/makedef.pl
+++ b/makedef.pl
@@ -200,7 +200,6 @@ sub emit_symbols {
}
}
-skip_symbols [qw(Perl_custom_op_name Perl_custom_op_desc PL_custom_op_descs PL_custom_op_names)] unless $define{'PERL_CUSTOM_OPS'};
if ($PLATFORM eq 'win32') {
skip_symbols [qw(
diff --git a/op.c b/op.c
index eba48b9207..daf66bb217 100644
--- a/op.c
+++ b/op.c
@@ -7143,8 +7143,9 @@ Perl_peep(pTHX_ register OP *o)
LEAVE;
}
-#ifdef PERL_CUSTOM_OPS
-char* custom_op_name(pTHX_ OP* o)
+
+
+char* Perl_custom_op_name(pTHX_ OP* o)
{
IV index = PTR2IV(o->op_ppaddr);
SV* keysv;
@@ -7162,7 +7163,7 @@ char* custom_op_name(pTHX_ OP* o)
return SvPV_nolen(HeVAL(he));
}
-char* custom_op_desc(pTHX_ OP* o)
+char* Perl_custom_op_desc(pTHX_ OP* o)
{
IV index = PTR2IV(o->op_ppaddr);
SV* keysv;
@@ -7179,7 +7180,7 @@ char* custom_op_desc(pTHX_ OP* o)
return SvPV_nolen(HeVAL(he));
}
-#endif
+
#include "XSUB.h"
diff --git a/opcode.pl b/opcode.pl
index 2e086417dc..297a32b5be 100755
--- a/opcode.pl
+++ b/opcode.pl
@@ -65,15 +65,11 @@ print <<END;
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[];
diff --git a/sv.c b/sv.c
index 9f9d10512b..c0d77b2641 100644
--- a/sv.c
+++ b/sv.c
@@ -9894,6 +9894,8 @@ perl_clone_using(PerlInterpreter *proto_perl, UV flags,
else
PL_exitlist = (PerlExitListEntry*)NULL;
PL_modglobal = hv_dup_inc(proto_perl->Imodglobal, param);
+ PL_custom_op_names = hv_dup_inc(proto_perl->Icustom_op_names,param);
+ PL_custom_op_descs = hv_dup_inc(proto_perl->Icustom_op_descs,param);
PL_profiledata = NULL;
PL_rsfp = fp_dup(proto_perl->Irsfp, '<');