From acf02c631c6e86be601706a865c38244cf44d346 Mon Sep 17 00:00:00 2001 From: Karl Williamson Date: Wed, 5 Jul 2023 19:20:58 -0600 Subject: [PATCH] Remove docs of broken SAVELONG and SAVEt_LONG This macro can't work, because it calls a non-existent function: save_long(); The accomanying SAVEt_LONG is useless as a result. --- pod/perlguts.pod | 3 --- regen/scope_types.pl | 1 - scope.c | 5 ----- scope_types.h | 40 +++++++++++++++++++--------------------- sv.c | 6 ------ 5 files changed, 19 insertions(+), 36 deletions(-) diff --git a/pod/perlguts.pod b/pod/perlguts.pod index 6ac6a1e9b70f..0a94e811c70d 100644 --- a/pod/perlguts.pod +++ b/pod/perlguts.pod @@ -1900,8 +1900,6 @@ Inside such a I the following service is available: =item C -=item C - =item C =item C @@ -1917,7 +1915,6 @@ C at the end of the enclosing I. =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 diff --git a/regen/scope_types.pl b/regen/scope_types.pl index c722d4c89351..3a7522d734b9 100644 --- a/regen/scope_types.pl +++ b/regen/scope_types.pl @@ -154,7 +154,6 @@ BEGIN SAVEt_INT SAVEt_ITEM SAVEt_IV -SAVEt_LONG SAVEt_PPTR SAVEt_SAVESWITCHSTACK SAVEt_SHARED_PVREF diff --git a/scope.c b/scope.c index a65a9fd551a3..47cf4a3473b1 100644 --- a/scope.c +++ b/scope.c @@ -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; diff --git a/scope_types.h b/scope_types.h index 6d31c116d23c..6ec8bdfbfb8c 100644 --- a/scope_types.h +++ b/scope_types.h @@ -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 */ @@ -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 */ @@ -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: */ diff --git a/sv.c b/sv.c index ba01d9844b12..fc438517e66c 100644 --- a/sv.c +++ b/sv.c @@ -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);