|
|
7e86df |
From bd5fa06648085e8c17efd55abeb6424aeeb1018e Mon Sep 17 00:00:00 2001
|
|
|
7e86df |
From: Karl Williamson <khw@cpan.org>
|
|
|
7e86df |
Date: Tue, 29 Sep 2020 00:48:19 -0600
|
|
|
7e86df |
Subject: [PATCH] Remove Perl_av_top_index
|
|
|
7e86df |
MIME-Version: 1.0
|
|
|
7e86df |
Content-Type: text/plain; charset=UTF-8
|
|
|
7e86df |
Content-Transfer-Encoding: 8bit
|
|
|
7e86df |
|
|
|
7e86df |
I created this in 87306e0674dfe3af29804b4641347cd5ac9b0521, thinking it
|
|
|
7e86df |
was needed to preserve backward compatibility if someone were using this
|
|
|
7e86df |
instead of the macro. But it turned out that there never was such a
|
|
|
7e86df |
function, it was inlined, and the name was S_av_top_index, so there is
|
|
|
7e86df |
no reason to create a new function that no one has ever been able to
|
|
|
7e86df |
call. So just remove it, and let all accesses go through the macro
|
|
|
7e86df |
|
|
|
7e86df |
Signed-off-by: Petr Písař <ppisar@redhat.com>
|
|
|
7e86df |
---
|
|
|
7e86df |
av.c | 10 ----------
|
|
|
7e86df |
embed.fnc | 2 +-
|
|
|
7e86df |
proto.h | 7 +++----
|
|
|
7e86df |
3 files changed, 4 insertions(+), 15 deletions(-)
|
|
|
7e86df |
|
|
|
7e86df |
diff --git a/av.c b/av.c
|
|
|
7e86df |
index ada09cde9a..ad2429f90d 100644
|
|
|
7e86df |
--- a/av.c
|
|
|
7e86df |
+++ b/av.c
|
|
|
7e86df |
@@ -1095,16 +1095,6 @@ Perl_av_nonelem(pTHX_ AV *av, SSize_t ix) {
|
|
|
7e86df |
return sv;
|
|
|
7e86df |
}
|
|
|
7e86df |
|
|
|
7e86df |
-SSize_t
|
|
|
7e86df |
-Perl_av_top_index(pTHX_ AV *av)
|
|
|
7e86df |
-{
|
|
|
7e86df |
- PERL_ARGS_ASSERT_AV_TOP_INDEX;
|
|
|
7e86df |
- assert(SvTYPE(av) == SVt_PVAV);
|
|
|
7e86df |
-
|
|
|
7e86df |
- return AvFILL(av);
|
|
|
7e86df |
-}
|
|
|
7e86df |
-
|
|
|
7e86df |
-
|
|
|
7e86df |
/*
|
|
|
7e86df |
* ex: set ts=8 sts=4 sw=4 et:
|
|
|
7e86df |
*/
|
|
|
7e86df |
diff --git a/embed.fnc b/embed.fnc
|
|
|
7e86df |
index a6b4d0350f..f5c5b29c2d 100644
|
|
|
7e86df |
--- a/embed.fnc
|
|
|
7e86df |
+++ b/embed.fnc
|
|
|
7e86df |
@@ -637,7 +637,7 @@ Apd |void |av_push |NN AV *av|NN SV *val
|
|
|
7e86df |
EXp |void |av_reify |NN AV *av
|
|
|
7e86df |
ApdR |SV* |av_shift |NN AV *av
|
|
|
7e86df |
Apd |SV** |av_store |NN AV *av|SSize_t key|NULLOK SV *val
|
|
|
7e86df |
-AMdRp |SSize_t|av_top_index |NN AV *av
|
|
|
7e86df |
+AmdR |SSize_t|av_top_index |NN AV *av
|
|
|
7e86df |
AidRp |Size_t |av_count |NN AV *av
|
|
|
7e86df |
AmdR |SSize_t|av_tindex |NN AV *av
|
|
|
7e86df |
Apd |void |av_undef |NN AV *av
|
|
|
7e86df |
diff --git a/proto.h b/proto.h
|
|
|
7e86df |
index c4490fc46e..2da1a07761 100644
|
|
|
7e86df |
--- a/proto.h
|
|
|
7e86df |
+++ b/proto.h
|
|
|
7e86df |
@@ -291,10 +291,9 @@ PERL_CALLCONV SV** Perl_av_store(pTHX_ AV *av, SSize_t key, SV *val);
|
|
|
7e86df |
__attribute__warn_unused_result__; */
|
|
|
7e86df |
#define PERL_ARGS_ASSERT_AV_TINDEX
|
|
|
7e86df |
|
|
|
7e86df |
-PERL_CALLCONV SSize_t Perl_av_top_index(pTHX_ AV *av)
|
|
|
7e86df |
- __attribute__warn_unused_result__;
|
|
|
7e86df |
-#define PERL_ARGS_ASSERT_AV_TOP_INDEX \
|
|
|
7e86df |
- assert(av)
|
|
|
7e86df |
+/* PERL_CALLCONV SSize_t av_top_index(pTHX_ AV *av)
|
|
|
7e86df |
+ __attribute__warn_unused_result__; */
|
|
|
7e86df |
+#define PERL_ARGS_ASSERT_AV_TOP_INDEX
|
|
|
7e86df |
|
|
|
7e86df |
PERL_CALLCONV void Perl_av_undef(pTHX_ AV *av);
|
|
|
7e86df |
#define PERL_ARGS_ASSERT_AV_UNDEF \
|
|
|
7e86df |
--
|
|
|
7e86df |
2.25.4
|
|
|
7e86df |
|