summaryrefslogtreecommitdiff
path: root/pp.h
diff options
context:
space:
mode:
authorNicholas Clark <nick@ccl4.org>2010-11-02 14:09:48 +0000
committerNicholas Clark <nick@ccl4.org>2010-11-02 14:09:48 +0000
commitacd8228ca9adfb506acce4c989674b8efb985f9b (patch)
tree6e521984e4c18fe8bd78b04e700847fafaba2f28 /pp.h
parentd4f7673c7846d4c503813d0d78c3d75dacf58e5b (diff)
downloadperl-acd8228ca9adfb506acce4c989674b8efb985f9b.tar.gz
Eliminate tryAMAGICunW() by refactoring tryAMAGICun{DEREF,TARGET}
tryAMAGICunW was only used within pp.h itself, and not referenced from anywhere else. (The core, CPAN, code visible to Google codesearch.)
Diffstat (limited to 'pp.h')
-rw-r--r--pp.h6
1 files changed, 2 insertions, 4 deletions
diff --git a/pp.h b/pp.h
index e4bcb4d49b..8ed4001208 100644
--- a/pp.h
+++ b/pp.h
@@ -439,15 +439,13 @@ Does not use C<TARG>. See also C<XPUSHu>, C<mPUSHu> and C<PUSHu>.
SPAGAIN; if (shift) sp += shift; \
set(tmpsv); ret; } \
} STMT_END
-#define tryAMAGICunW(meth,set,shift,ret) \
- tryAMAGICunW_var(CAT2(meth,_amg),set,shift,ret)
#define FORCE_SETs(sv) STMT_START { sv_setsv(TARG, (sv)); SETTARG; } STMT_END
#define tryAMAGICunTARGET(meth, shift) \
STMT_START { dSP; sp--; /* get TARGET from below PL_stack_sp */ \
{ dTARGETSTACKED; \
- { dSP; tryAMAGICunW(meth,FORCE_SETs,shift,RETURN);}}} STMT_END
+ { dSP; tryAMAGICunW_var(CAT2(meth,_amg),FORCE_SETs,shift,RETURN);}}} STMT_END
#define setAGAIN(ref) \
STMT_START { \
@@ -460,9 +458,9 @@ Does not use C<TARG>. See also C<XPUSHu>, C<mPUSHu> and C<PUSHu>.
} \
} STMT_END
-#define tryAMAGICunDEREF(meth) tryAMAGICunW(meth,setAGAIN,0,(void)0)
#define tryAMAGICunDEREF_var(meth_enum) \
tryAMAGICunW_var(meth_enum,setAGAIN,0,(void)0)
+#define tryAMAGICunDEREF(meth) tryAMAGICunDEREF_var(CAT2(meth,_amg))
#define opASSIGN (PL_op->op_flags & OPf_STACKED)