diff options
author | Nicholas Clark <nick@ccl4.org> | 2008-10-16 20:18:39 +0000 |
---|---|---|
committer | Nicholas Clark <nick@ccl4.org> | 2008-10-16 20:18:39 +0000 |
commit | 95e06916561ca1cbaa0ca21057644bd664ebf2dc (patch) | |
tree | dbe5e4cd17b7bc2d7ddca77a795bd47a43eb8ee4 /scope.c | |
parent | 417991fcde447d83d1b0e1efc675badd930b3f46 (diff) | |
download | perl-95e06916561ca1cbaa0ca21057644bd664ebf2dc.tar.gz |
Clarify which save types are in mathoms, which aren't used, and which
still are in use.
p4raw-id: //depot/perl@34494
Diffstat (limited to 'scope.c')
-rw-r--r-- | scope.c | 23 |
1 files changed, 14 insertions, 9 deletions
@@ -1037,16 +1037,29 @@ Perl_leave_scope(pTHX_ I32 base) SvFLAGS(sv) |= val; } break; - /* These are only saved in mathoms.c */ + + /* This would be a mathom, but Perl_save_svref() calls a static + function, S_save_scalar_at(), so has to stay in this file. */ case SAVEt_SVREF: /* scalar reference */ value = (SV*)SSPOPPTR; ptr = SSPOPPTR; av = NULL; /* what to refcnt_dec */ goto restore_sv; + + /* These are only saved in mathoms.c */ + case SAVEt_NSTAB: + gv = (GV*)SSPOPPTR; + (void)sv_clear((SV*)gv); + break; case SAVEt_LONG: /* long reference */ ptr = SSPOPPTR; *(long*)ptr = (long)SSPOPLONG; break; + case SAVEt_IV: /* IV reference */ + ptr = SSPOPPTR; + *(IV*)ptr = (IV)SSPOPIV; + break; + case SAVEt_I16: /* I16 reference */ ptr = SSPOPPTR; *(I16*)ptr = (I16)SSPOPINT; @@ -1055,14 +1068,6 @@ Perl_leave_scope(pTHX_ I32 base) ptr = SSPOPPTR; *(I8*)ptr = (I8)SSPOPINT; break; - case SAVEt_IV: /* IV reference */ - ptr = SSPOPPTR; - *(IV*)ptr = (IV)SSPOPIV; - break; - case SAVEt_NSTAB: - gv = (GV*)SSPOPPTR; - (void)sv_clear((SV*)gv); - break; case SAVEt_DESTRUCTOR: ptr = SSPOPPTR; (*SSPOPDPTR)(ptr); |