summaryrefslogtreecommitdiff
path: root/perl.h
diff options
context:
space:
mode:
authorDavid Mitchell <davem@iabyn.com>2016-08-12 09:59:42 +0100
committerDavid Mitchell <davem@iabyn.com>2016-08-12 14:00:02 +0100
commitc97287825d5d2dd270f14027ddc2fe97a4bfc11c (patch)
tree9db3a99eb7855e621f7719dd685f7efd7863577f /perl.h
parent5208a0305e9e82c534fa034515d54a0409dfcc77 (diff)
downloadperl-c97287825d5d2dd270f14027ddc2fe97a4bfc11c.tar.gz
clean up leave_scope()
Rather than having a whole bunch of casting macros like #define ARG0_SV MUTABLE_SV(arg0.any_ptr) just add extra pointer types to the ANY union and directly do arg0.any_sv etc. Also, rename arg0, arg1, arg2 to a0, a1, a2 and reverse their order; previously if 3 args A,B,C were pushed onto the savestack, they were popped as a0=C, a1=B, a2=A; now do it as a0=A, a1=B, a2=C. The previous (rather odd) order was an artifact of the old way leave_scope() used to pop its args. There should be no functional changes.
Diffstat (limited to 'perl.h')
-rw-r--r--perl.h7
1 files changed, 7 insertions, 0 deletions
diff --git a/perl.h b/perl.h
index ac302bd86d..8a2e1f1587 100644
--- a/perl.h
+++ b/perl.h
@@ -3796,6 +3796,13 @@ UNION_ANY_DEFINITION;
#else
union any {
void* any_ptr;
+ SV* any_sv;
+ SV** any_svp;
+ GV* any_gv;
+ AV* any_av;
+ HV* any_hv;
+ char* any_pv;
+ char** any_pvp;
I32 any_i32;
U32 any_u32;
IV any_iv;