Skip to content

Commit

Permalink
Remove docs of broken SAVELONG and SAVEt_LONG
Browse files Browse the repository at this point in the history
This macro can't work, because it calls a non-existent function:
save_long(); The accomanying SAVEt_LONG is useless as a result.
  • Loading branch information
khwilliamson authored and rawleyfowler committed Sep 2, 2024
1 parent ff4cf31 commit ff9dba4
Show file tree
Hide file tree
Showing 5 changed files with 19 additions and 36 deletions.
3 changes: 0 additions & 3 deletions pod/perlguts.pod
Original file line number Diff line number Diff line change
Expand Up @@ -1900,8 +1900,6 @@ Inside such a I<pseudo-block> the following service is available:

=item C<SAVEI32(I32 i)>

=item C<SAVELONG(long i)>

=item C<SAVEI8(I8 i)>

=item C<SAVEI16(I16 i)>
Expand All @@ -1917,7 +1915,6 @@ C<i> at the end of the enclosing I<pseudo-block>.
=for apidoc Amh||SAVEINT|int i
=for apidoc Amh||SAVEIV|IV i
=for apidoc Amh||SAVEI32|I32 i
=for apidoc Amh||SAVELONG|long i
=for apidoc Amh||SAVEI8|I8 i
=for apidoc Amh||SAVEI16|I16 i
=for apidoc Amh||SAVEBOOL|bool i
Expand Down
1 change: 0 additions & 1 deletion regen/scope_types.pl
Original file line number Diff line number Diff line change
Expand Up @@ -154,7 +154,6 @@ BEGIN
SAVEt_INT
SAVEt_ITEM
SAVEt_IV
SAVEt_LONG
SAVEt_PPTR
SAVEt_SAVESWITCHSTACK
SAVEt_SHARED_PVREF
Expand Down
5 changes: 0 additions & 5 deletions scope.c
Original file line number Diff line number Diff line change
Expand Up @@ -1684,11 +1684,6 @@ Perl_leave_scope(pTHX_ I32 base)
(void)sv_clear(a0.any_sv);
break;

case SAVEt_LONG: /* long reference */
a0 = ap[0]; a1 = ap[1];
*(long*)a1.any_ptr = a0.any_long;
break;

case SAVEt_IV: /* IV reference */
a0 = ap[0]; a1 = ap[1];
*(IV*)a1.any_ptr = a0.any_iv;
Expand Down
40 changes: 19 additions & 21 deletions scope_types.h
Original file line number Diff line number Diff line change
Expand Up @@ -61,28 +61,27 @@
#define SAVEt_INT 37
#define SAVEt_ITEM 38
#define SAVEt_IV 39
#define SAVEt_LONG 40
#define SAVEt_PPTR 41
#define SAVEt_SAVESWITCHSTACK 42
#define SAVEt_SHARED_PVREF 43
#define SAVEt_SPTR 44
#define SAVEt_STRLEN 45
#define SAVEt_SV 46
#define SAVEt_SVREF 47
#define SAVEt_VPTR 48
#define SAVEt_ADELETE 49
#define SAVEt_APTR 50
#define SAVEt_RCPV 51
#define SAVEt_PPTR 40
#define SAVEt_SAVESWITCHSTACK 41
#define SAVEt_SHARED_PVREF 42
#define SAVEt_SPTR 43
#define SAVEt_STRLEN 44
#define SAVEt_SV 45
#define SAVEt_SVREF 46
#define SAVEt_VPTR 47
#define SAVEt_ADELETE 48
#define SAVEt_APTR 49
#define SAVEt_RCPV 50

/* three args */

#define SAVEt_HELEM 52
#define SAVEt_PADSV_AND_MORTALIZE 53
#define SAVEt_SET_SVFLAGS 54
#define SAVEt_GVSLOT 55
#define SAVEt_AELEM 56
#define SAVEt_DELETE 57
#define SAVEt_HINTS_HH 58
#define SAVEt_HELEM 51
#define SAVEt_PADSV_AND_MORTALIZE 52
#define SAVEt_SET_SVFLAGS 53
#define SAVEt_GVSLOT 54
#define SAVEt_AELEM 55
#define SAVEt_DELETE 56
#define SAVEt_HINTS_HH 57

static const U8 leave_scope_arg_counts[] = {
0, /* SAVEt_ALLOC */
Expand Down Expand Up @@ -125,7 +124,6 @@ static const U8 leave_scope_arg_counts[] = {
2, /* SAVEt_INT */
2, /* SAVEt_ITEM */
2, /* SAVEt_IV */
2, /* SAVEt_LONG */
2, /* SAVEt_PPTR */
2, /* SAVEt_SAVESWITCHSTACK */
2, /* SAVEt_SHARED_PVREF */
Expand All @@ -146,6 +144,6 @@ static const U8 leave_scope_arg_counts[] = {
3 /* SAVEt_HINTS_HH */
};

#define MAX_SAVEt 58
#define MAX_SAVEt 57

/* ex: set ro ft=c: */
6 changes: 0 additions & 6 deletions sv.c
Original file line number Diff line number Diff line change
Expand Up @@ -15382,12 +15382,6 @@ Perl_ss_dup(pTHX_ PerlInterpreter *proto_perl, CLONE_PARAMS* param)
intval = (int)POPINT(ss,ix);
TOPINT(nss,ix) = intval;
break;
case SAVEt_LONG: /* long reference */
ptr = POPPTR(ss,ix);
TOPPTR(nss,ix) = any_dup(ptr, proto_perl);
longval = (long)POPLONG(ss,ix);
TOPLONG(nss,ix) = longval;
break;
case SAVEt_I32: /* I32 reference */
ptr = POPPTR(ss,ix);
TOPPTR(nss,ix) = any_dup(ptr, proto_perl);
Expand Down

0 comments on commit ff9dba4

Please sign in to comment.