summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--XSUB.h2
-rw-r--r--embed.h4
-rwxr-xr-xembed.pl6
-rw-r--r--mg.c18
-rw-r--r--op.c8
-rw-r--r--perl.h13
-rw-r--r--perlapi.h2
-rw-r--r--pp_ctl.c8
-rw-r--r--run.c10
-rw-r--r--sv.c8
10 files changed, 13 insertions, 66 deletions
diff --git a/XSUB.h b/XSUB.h
index 76b9f1041d..241ac40e49 100644
--- a/XSUB.h
+++ b/XSUB.h
@@ -118,10 +118,8 @@
#if defined(PERL_IMPLICIT_CONTEXT) && !defined(PERL_NO_GET_CONTEXT) && !defined(PERL_CORE)
# undef aTHX
# undef aTHX_
-# undef _aTHX
# define aTHX PERL_GET_THX
# define aTHX_ aTHX,
-# define _aTHX ,aTHX
#endif
#if defined(PERL_CAPI)
diff --git a/embed.h b/embed.h
index 4b333cbcf6..a8b80ecb69 100644
--- a/embed.h
+++ b/embed.h
@@ -875,7 +875,6 @@
#define reganode S_reganode
#define regatom S_regatom
#define regbranch S_regbranch
-#define regc S_regc
#define reguni S_reguni
#define regclass S_regclass
#define regclassutf8 S_regclassutf8
@@ -2192,7 +2191,6 @@
#define reganode(a,b) S_reganode(aTHX_ a,b)
#define regatom(a) S_regatom(aTHX_ a)
#define regbranch(a,b) S_regbranch(aTHX_ a,b)
-#define regc(a,b) S_regc(aTHX_ a,b)
#define reguni(a,b,c) S_reguni(aTHX_ a,b,c)
#define regclass() S_regclass(aTHX)
#define regclassutf8() S_regclassutf8(aTHX)
@@ -4293,8 +4291,6 @@
#define regatom S_regatom
#define S_regbranch CPerlObj::S_regbranch
#define regbranch S_regbranch
-#define S_regc CPerlObj::S_regc
-#define regc S_regc
#define S_reguni CPerlObj::S_reguni
#define reguni S_reguni
#define S_regclass CPerlObj::S_regclass
diff --git a/embed.pl b/embed.pl
index 28c2e384fb..ef8fc802d4 100755
--- a/embed.pl
+++ b/embed.pl
@@ -756,8 +756,6 @@ print CAPIH <<'EOT';
# define aTHXo pPerl
# undef aTHXo_
# define aTHXo_ aTHXo,
-# undef _aTHXo
-# define _aTHXo ,aTHXo
#endif /* PERL_OBJECT */
START_EXTERN_C
@@ -970,9 +968,9 @@ EOT
__END__
# Lines are of the form:
-# flags|return_type|function_name|return_type|arg1|arg2|...|argN
+# flags|return_type|function_name|arg1|arg2|...|argN
#
-# They may continue on multiple lines when \w| begins the next line.
+# A line may be continued on another by ending it with a backslash.
# Leading and trailing whitespace will be ignored in each component.
#
# flags are single letters with following meanings:
diff --git a/mg.c b/mg.c
index bdfef19c24..1923ce4d9d 100644
--- a/mg.c
+++ b/mg.c
@@ -27,12 +27,6 @@
# endif
#endif
-#ifdef PERL_OBJECT
-# define VTBL this->*vtbl
-#else
-# define VTBL *vtbl
-#endif
-
static void restore_magic(pTHXo_ void *p);
static void unwind_handler_stack(pTHXo_ void *p);
@@ -99,7 +93,7 @@ Perl_mg_get(pTHX_ SV *sv)
while ((mg = *mgp) != 0) {
MGVTBL* vtbl = mg->mg_virtual;
if (!(mg->mg_flags & MGf_GSKIP) && vtbl && (vtbl->svt_get != NULL)) {
- (VTBL->svt_get)(aTHX_ sv, mg);
+ CALL_FTPR(vtbl->svt_get)(aTHX_ sv, mg);
/* Ignore this magic if it's been deleted */
if ((mg == (mgp_valid ? *mgp : SvMAGIC(sv))) &&
(mg->mg_flags & MGf_GSKIP))
@@ -137,7 +131,7 @@ Perl_mg_set(pTHX_ SV *sv)
(SSPTR(mgs_ix, MGS*))->mgs_flags = 0;
}
if (vtbl && (vtbl->svt_set != NULL))
- (VTBL->svt_set)(aTHX_ sv, mg);
+ CALL_FPTR(vtbl->svt_set)(aTHX_ sv, mg);
}
restore_magic(aTHXo_ (void*)mgs_ix);
@@ -159,7 +153,7 @@ Perl_mg_length(pTHX_ SV *sv)
mgs_ix = SSNEW(sizeof(MGS));
save_magic(mgs_ix, sv);
/* omit MGf_GSKIP -- not changed here */
- len = (VTBL->svt_len)(aTHX_ sv, mg);
+ len = CALL_FPTR(vtbl->svt_len)(aTHX_ sv, mg);
restore_magic(aTHXo_ (void*)mgs_ix);
return len;
}
@@ -183,7 +177,7 @@ Perl_mg_size(pTHX_ SV *sv)
mgs_ix = SSNEW(sizeof(MGS));
save_magic(mgs_ix, sv);
/* omit MGf_GSKIP -- not changed here */
- len = (VTBL->svt_len)(aTHX_ sv, mg);
+ len = CALL_FPTR(vtbl->svt_len)(aTHX_ sv, mg);
restore_magic(aTHXo_ (void*)mgs_ix);
return len;
}
@@ -216,7 +210,7 @@ Perl_mg_clear(pTHX_ SV *sv)
/* omit GSKIP -- never set here */
if (vtbl && (vtbl->svt_clear != NULL))
- (VTBL->svt_clear)(aTHX_ sv, mg);
+ CALL_FPTR(vtbl->svt_clear)(aTHX_ sv, mg);
}
restore_magic(aTHXo_ (void*)mgs_ix);
@@ -259,7 +253,7 @@ Perl_mg_free(pTHX_ SV *sv)
MGVTBL* vtbl = mg->mg_virtual;
moremagic = mg->mg_moremagic;
if (vtbl && (vtbl->svt_free != NULL))
- (VTBL->svt_free)(aTHX_ sv, mg);
+ CALL_FPTR(vtbl->svt_free)(aTHX_ sv, mg);
if (mg->mg_ptr && mg->mg_type != 'g')
if (mg->mg_len >= 0)
Safefree(mg->mg_ptr);
diff --git a/op.c b/op.c
index 7d8ee8b20d..e99ef60bc8 100644
--- a/op.c
+++ b/op.c
@@ -19,12 +19,6 @@
#define PERL_IN_OP_C
#include "perl.h"
-#ifdef PERL_OBJECT
-#define CHECKCALL this->*PL_check
-#else
-#define CHECKCALL *PL_check
-#endif
-
/* #define PL_OP_SLAB_ALLOC */
#ifdef PL_OP_SLAB_ALLOC
@@ -57,7 +51,7 @@ S_Slab_Alloc(pTHX_ int m, size_t sz)
? ( op_free((OP*)o), \
Perl_croak(aTHX_ "%s trapped by operation mask", PL_op_desc[type]), \
Nullop ) \
- : (CHECKCALL[type])(aTHX_ (OP*)o))
+ : CALL_FPTR(PL_check[type])(aTHX_ (OP*)o))
#define PAD_MAX 999999999
diff --git a/perl.h b/perl.h
index f2cf7725e7..e3d3826169 100644
--- a/perl.h
+++ b/perl.h
@@ -146,22 +146,17 @@ class CPerlObj;
#define pTHXo CPerlObj *pPerl
#define pTHXo_ pTHXo,
-#define _pTHXo ,pTHXo
#define aTHXo this
#define aTHXo_ this,
-#define _aTHXo ,this
#define PERL_OBJECT_THIS aTHXo
#define PERL_OBJECT_THIS_ aTHXo_
-#define _PERL_OBJECT_THIS _aTHXo
#define dTHXoa(a) pTHXo = a
#define dTHXo dTHXoa(PERL_GET_THX)
#define pTHXx void
#define pTHXx_
-#define _pTHXx
#define aTHXx
#define aTHXx_
-#define _aTHXx
#else /* !PERL_OBJECT */
@@ -181,9 +176,7 @@ struct perl_thread;
# define dTHXa(a) pTHX = a
# define dTHX dTHXa(PERL_GET_THX)
# define pTHX_ pTHX,
-# define _pTHX ,pTHX
# define aTHX_ aTHX,
-# define _aTHX ,aTHX
#endif
#define STATIC static
@@ -212,10 +205,8 @@ struct perl_thread;
#ifndef pTHX
# define pTHX void
# define pTHX_
-# define _pTHX
# define aTHX
# define aTHX_
-# define _aTHX
# define dTHXa(a) dNOOP
# define dTHX dNOOP
#endif
@@ -223,20 +214,16 @@ struct perl_thread;
#ifndef pTHXo
# define pTHXo pTHX
# define pTHXo_ pTHX_
-# define _pTHXo _pTHX
# define aTHXo aTHX
# define aTHXo_ aTHX_
-# define _aTHXo _aTHX
# define dTHXo dTHX
#endif
#ifndef pTHXx
# define pTHXx register PerlInterpreter *my_perl
# define pTHXx_ pTHXx,
-# define _pTHXx ,pTHXx
# define aTHXx my_perl
# define aTHXx_ aTHXx,
-# define _aTHXx ,aTHXx
# define dTHXx dTHX
#endif
diff --git a/perlapi.h b/perlapi.h
index 6b931cc95d..0dac61aa75 100644
--- a/perlapi.h
+++ b/perlapi.h
@@ -12,8 +12,6 @@
# define aTHXo pPerl
# undef aTHXo_
# define aTHXo_ aTHXo,
-# undef _aTHXo
-# define _aTHXo ,aTHXo
#endif /* PERL_OBJECT */
START_EXTERN_C
diff --git a/pp_ctl.c b/pp_ctl.c
index 2d29448e77..8e788e6594 100644
--- a/pp_ctl.c
+++ b/pp_ctl.c
@@ -26,12 +26,6 @@
#define DOCATCH(o) ((CATCH_GET == TRUE) ? docatch(o) : (o))
-#ifdef PERL_OBJECT
-#define CALLOP this->*PL_op
-#else
-#define CALLOP *PL_op
-#endif
-
static I32 sortcv(pTHXo_ SV *a, SV *b);
static I32 sv_ncmp(pTHXo_ SV *a, SV *b);
static I32 sv_i_ncmp(pTHXo_ SV *a, SV *b);
@@ -2304,7 +2298,7 @@ PP(pp_goto)
if (PL_op->op_type == OP_ENTERITER)
DIE(aTHX_ "Can't \"goto\" into the middle of a foreach loop",
label);
- (CALLOP->op_ppaddr)(aTHX);
+ CALL_FPTR(PL_op->op_ppaddr)(aTHX);
}
PL_op = oldop;
}
diff --git a/run.c b/run.c
index be532046c6..decf04062b 100644
--- a/run.c
+++ b/run.c
@@ -17,18 +17,12 @@
* know. Run now! Hope is in speed!" --Gandalf
*/
-#ifdef PERL_OBJECT
-#define CALLOP this->*PL_op
-#else
-#define CALLOP *PL_op
-#endif
-
int
Perl_runops_standard(pTHX)
{
dTHR;
- while ( PL_op = (CALLOP->op_ppaddr)(aTHX) ) ;
+ while ( PL_op = CALL_FPTR(PL_op->op_ppaddr)(aTHX) ) ;
TAINT_NOT;
return 0;
@@ -54,7 +48,7 @@ Perl_runops_debug(pTHX)
DEBUG_t(debop(PL_op));
DEBUG_P(debprof(PL_op));
}
- } while ( PL_op = (CALLOP->op_ppaddr)(aTHX) );
+ } while ( PL_op = CALL_FPTR(PL_op->op_ppaddr)(aTHX) );
TAINT_NOT;
return 0;
diff --git a/sv.c b/sv.c
index 9ba9f6cb15..97f97f2db2 100644
--- a/sv.c
+++ b/sv.c
@@ -15,12 +15,6 @@
#define PERL_IN_SV_C
#include "perl.h"
-#ifdef PERL_OBJECT
-#define VTBL this->*vtbl
-#else /* !PERL_OBJECT */
-#define VTBL *vtbl
-#endif /* PERL_OBJECT */
-
#define FCALL *f
#define SV_CHECK_THINKFIRST(sv) if (SvTHINKFIRST(sv)) sv_force_normal(sv)
@@ -2721,7 +2715,7 @@ Perl_sv_unmagic(pTHX_ SV *sv, int type)
MGVTBL* vtbl = mg->mg_virtual;
*mgp = mg->mg_moremagic;
if (vtbl && (vtbl->svt_free != NULL))
- (VTBL->svt_free)(aTHX_ sv, mg);
+ CALL_FPTR(vtbl->svt_free)(aTHX_ sv, mg);
if (mg->mg_ptr && mg->mg_type != 'g')
if (mg->mg_len >= 0)
Safefree(mg->mg_ptr);