summaryrefslogtreecommitdiff
path: root/scope.c
diff options
context:
space:
mode:
authorDavid Mitchell <davem@iabyn.com>2016-08-12 12:59:14 +0100
committerDavid Mitchell <davem@iabyn.com>2016-08-12 14:02:22 +0100
commit212a001eeef9c1e3202a57c1ca8551e1002fc8e3 (patch)
tree87b914e121b336b70703176baf76ea979e4b6f13 /scope.c
parent75ebea3c5defdfeb19d38d1a4e5fb280e8d980f9 (diff)
downloadperl-212a001eeef9c1e3202a57c1ca8551e1002fc8e3.tar.gz
leave_scope(): combine the SAVEt_*PTR branches
They're all the same, except for casts between different pointer types.
Diffstat (limited to 'scope.c')
-rw-r--r--scope.c14
1 files changed, 1 insertions, 13 deletions
diff --git a/scope.c b/scope.c
index 81f3bb65e4..d78857b039 100644
--- a/scope.c
+++ b/scope.c
@@ -1052,24 +1052,12 @@ Perl_leave_scope(pTHX_ I32 base)
break;
case SAVEt_SPTR: /* SV* reference */
- a0 = ap[0]; a1 = ap[1];
- *a1.any_svp= a0.any_sv;
- break;
-
case SAVEt_VPTR: /* random* reference */
case SAVEt_PPTR: /* char* reference */
- a0 = ap[0]; a1 = ap[1];
- *a1.any_pvp = a0.any_pv;
- break;
-
case SAVEt_HPTR: /* HV* reference */
- a0 = ap[0]; a1 = ap[1];
- *(HV**)a1.any_ptr = a0.any_hv;
- break;
-
case SAVEt_APTR: /* AV* reference */
a0 = ap[0]; a1 = ap[1];
- *(AV**)a1.any_ptr = a0.any_av;
+ *a1.any_svp= a0.any_sv;
break;
case SAVEt_GP: /* scalar reference */