summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--embed.fnc2
-rw-r--r--embed.h2
-rw-r--r--hv.c12
-rw-r--r--hv.h2
-rw-r--r--mathoms.c6
-rw-r--r--proto.h4
6 files changed, 13 insertions, 15 deletions
diff --git a/embed.fnc b/embed.fnc
index 95ffb2f4d0..5af184b16a 100644
--- a/embed.fnc
+++ b/embed.fnc
@@ -285,7 +285,7 @@ Ap |void |hv_free_ent |NN HV* hv|NULLOK HE* entryK
Apd |I32 |hv_iterinit |NN HV* tb
ApdR |char* |hv_iterkey |NN HE* entry|NN I32* retlen
ApdR |SV* |hv_iterkeysv |NN HE* entry
-ApdR |HE* |hv_iternext |NN HV* tb
+ApdRbm |HE* |hv_iternext |NN HV* tb
ApdR |SV* |hv_iternextsv |NN HV* hv|NN char** key|NN I32* retlen
ApMdR |HE* |hv_iternext_flags|NN HV* tb|I32 flags
ApdR |SV* |hv_iterval |NN HV* tb|NN HE* entry
diff --git a/embed.h b/embed.h
index 31085e1088..c7feb586be 100644
--- a/embed.h
+++ b/embed.h
@@ -273,7 +273,6 @@
#define hv_iterinit Perl_hv_iterinit
#define hv_iterkey Perl_hv_iterkey
#define hv_iterkeysv Perl_hv_iterkeysv
-#define hv_iternext Perl_hv_iternext
#define hv_iternextsv Perl_hv_iternextsv
#define hv_iternext_flags Perl_hv_iternext_flags
#define hv_iterval Perl_hv_iterval
@@ -2263,7 +2262,6 @@
#define hv_iterinit(a) Perl_hv_iterinit(aTHX_ a)
#define hv_iterkey(a,b) Perl_hv_iterkey(aTHX_ a,b)
#define hv_iterkeysv(a) Perl_hv_iterkeysv(aTHX_ a)
-#define hv_iternext(a) Perl_hv_iternext(aTHX_ a)
#define hv_iternextsv(a,b,c) Perl_hv_iternextsv(aTHX_ a,b,c)
#define hv_iternext_flags(a,b) Perl_hv_iternext_flags(aTHX_ a,b)
#define hv_iterval(a,b) Perl_hv_iterval(aTHX_ a,b)
diff --git a/hv.c b/hv.c
index 7a9fd3a326..1ab0efeee7 100644
--- a/hv.c
+++ b/hv.c
@@ -1889,6 +1889,8 @@ Perl_hv_name_set(pTHX_ HV *hv, const char *name, I32 len, int flags)
}
/*
+hv_iternext is implemented as a macro in hv.h
+
=for apidoc hv_iternext
Returns entries from a hash iterator. See C<hv_iterinit>.
@@ -1901,16 +1903,6 @@ to free the entry on the next call to C<hv_iternext>, so you must not discard
your iterator immediately else the entry will leak - call C<hv_iternext> to
trigger the resource deallocation.
-=cut
-*/
-
-HE *
-Perl_hv_iternext(pTHX_ HV *hv)
-{
- return hv_iternext_flags(hv, 0);
-}
-
-/*
=for apidoc hv_iternext_flags
Returns entries from a hash iterator. See C<hv_iterinit> and C<hv_iternext>.
diff --git a/hv.h b/hv.h
index f47a77b98b..5243adc7c1 100644
--- a/hv.h
+++ b/hv.h
@@ -360,6 +360,8 @@ C<SV*>.
/* Flags for hv_iternext_flags. */
#define HV_ITERNEXT_WANTPLACEHOLDERS 0x01 /* Don't skip placeholders. */
+#define hv_iternext(hv) hv_iternext_flags(hv, 0)
+
/* available as a function in hv.c */
#define Perl_sharepvn(sv, len, hash) HEK_KEY(share_hek(sv, len, hash))
#define sharepvn(sv, len, hash) Perl_sharepvn(sv, len, hash)
diff --git a/mathoms.c b/mathoms.c
index ce2022ed01..ce7a49e0d4 100644
--- a/mathoms.c
+++ b/mathoms.c
@@ -595,6 +595,12 @@ Perl_gv_fetchmethod(pTHX_ HV *stash, const char *name)
return gv_fetchmethod_autoload(stash, name, TRUE);
}
+HE *
+Perl_hv_iternext(pTHX_ HV *hv)
+{
+ return hv_iternext_flags(hv, 0);
+}
+
AV *
Perl_av_fake(pTHX_ register I32 size, register SV **strp)
{
diff --git a/proto.h b/proto.h
index be537934fd..f71e3d6dff 100644
--- a/proto.h
+++ b/proto.h
@@ -662,9 +662,9 @@ PERL_CALLCONV SV* Perl_hv_iterkeysv(pTHX_ HE* entry)
__attribute__warn_unused_result__
__attribute__nonnull__(pTHX_1);
-PERL_CALLCONV HE* Perl_hv_iternext(pTHX_ HV* tb)
+/* PERL_CALLCONV HE* Perl_hv_iternext(pTHX_ HV* tb)
__attribute__warn_unused_result__
- __attribute__nonnull__(pTHX_1);
+ __attribute__nonnull__(pTHX_1); */
PERL_CALLCONV SV* Perl_hv_iternextsv(pTHX_ HV* hv, char** key, I32* retlen)
__attribute__warn_unused_result__