summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--embed.fnc2
-rw-r--r--embed.h2
-rw-r--r--hv.c19
-rw-r--r--hv.h1
-rw-r--r--mathoms.c16
-rw-r--r--proto.h4
6 files changed, 23 insertions, 21 deletions
diff --git a/embed.fnc b/embed.fnc
index 5af184b16a..0de7804f3f 100644
--- a/embed.fnc
+++ b/embed.fnc
@@ -290,7 +290,7 @@ 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
Ap |void |hv_ksplit |NN HV* hv|IV newmax
-Apd |void |hv_magic |NN HV* hv|NULLOK GV* gv|int how
+Apdbm |void |hv_magic |NN HV* hv|NULLOK GV* gv|int how
Apd |SV** |hv_store |NULLOK HV* tb|NULLOK const char* key|I32 klen|NULLOK SV* val \
|U32 hash
Apd |HE* |hv_store_ent |NULLOK HV* tb|NULLOK SV* key|NULLOK SV* val|U32 hash
diff --git a/embed.h b/embed.h
index c7feb586be..0111652a64 100644
--- a/embed.h
+++ b/embed.h
@@ -277,7 +277,6 @@
#define hv_iternext_flags Perl_hv_iternext_flags
#define hv_iterval Perl_hv_iterval
#define hv_ksplit Perl_hv_ksplit
-#define hv_magic Perl_hv_magic
#define hv_store Perl_hv_store
#define hv_store_ent Perl_hv_store_ent
#define hv_store_flags Perl_hv_store_flags
@@ -2266,7 +2265,6 @@
#define hv_iternext_flags(a,b) Perl_hv_iternext_flags(aTHX_ a,b)
#define hv_iterval(a,b) Perl_hv_iterval(aTHX_ a,b)
#define hv_ksplit(a,b) Perl_hv_ksplit(aTHX_ a,b)
-#define hv_magic(a,b,c) Perl_hv_magic(aTHX_ a,b,c)
#define hv_store(a,b,c,d,e) Perl_hv_store(aTHX_ a,b,c,d,e)
#define hv_store_ent(a,b,c,d) Perl_hv_store_ent(aTHX_ a,b,c,d)
#define hv_store_flags(a,b,c,d,e,f) Perl_hv_store_flags(aTHX_ a,b,c,d,e,f)
diff --git a/hv.c b/hv.c
index 1ab0efeee7..838dbbcf4e 100644
--- a/hv.c
+++ b/hv.c
@@ -2123,6 +2123,9 @@ Perl_hv_iternextsv(pTHX_ HV *hv, char **key, I32 *retlen)
}
/*
+
+Now a macro in hv.h
+
=for apidoc hv_magic
Adds magic to a hash. See C<sv_magic>.
@@ -2130,22 +2133,6 @@ Adds magic to a hash. See C<sv_magic>.
=cut
*/
-void
-Perl_hv_magic(pTHX_ HV *hv, GV *gv, int how)
-{
- sv_magic((SV*)hv, (SV*)gv, how, Nullch, 0);
-}
-
-#if 0 /* use the macro from hv.h instead */
-
-char*
-Perl_sharepvn(pTHX_ const char *sv, I32 len, U32 hash)
-{
- return HEK_KEY(share_hek(sv, len, hash));
-}
-
-#endif
-
/* possibly free a shared string if no one has access to it
* len and hash must both be valid for str.
*/
diff --git a/hv.h b/hv.h
index 5243adc7c1..7552267c5a 100644
--- a/hv.h
+++ b/hv.h
@@ -361,6 +361,7 @@ C<SV*>.
#define HV_ITERNEXT_WANTPLACEHOLDERS 0x01 /* Don't skip placeholders. */
#define hv_iternext(hv) hv_iternext_flags(hv, 0)
+#define hv_magic(hv, gv, how) sv_magic((SV*)(hv), (SV*)(gv), how, Nullch, 0)
/* available as a function in hv.c */
#define Perl_sharepvn(sv, len, hash) HEK_KEY(share_hek(sv, len, hash))
diff --git a/mathoms.c b/mathoms.c
index ce7a49e0d4..c62ab37782 100644
--- a/mathoms.c
+++ b/mathoms.c
@@ -601,6 +601,22 @@ Perl_hv_iternext(pTHX_ HV *hv)
return hv_iternext_flags(hv, 0);
}
+void
+Perl_hv_magic(pTHX_ HV *hv, GV *gv, int how)
+{
+ sv_magic((SV*)hv, (SV*)gv, how, Nullch, 0);
+}
+
+#if 0 /* use the macro from hv.h instead */
+
+char*
+Perl_sharepvn(pTHX_ const char *sv, I32 len, U32 hash)
+{
+ return HEK_KEY(share_hek(sv, len, hash));
+}
+
+#endif
+
AV *
Perl_av_fake(pTHX_ register I32 size, register SV **strp)
{
diff --git a/proto.h b/proto.h
index f71e3d6dff..cc0df9ffd4 100644
--- a/proto.h
+++ b/proto.h
@@ -684,8 +684,8 @@ PERL_CALLCONV SV* Perl_hv_iterval(pTHX_ HV* tb, HE* entry)
PERL_CALLCONV void Perl_hv_ksplit(pTHX_ HV* hv, IV newmax)
__attribute__nonnull__(pTHX_1);
-PERL_CALLCONV void Perl_hv_magic(pTHX_ HV* hv, GV* gv, int how)
- __attribute__nonnull__(pTHX_1);
+/* PERL_CALLCONV void Perl_hv_magic(pTHX_ HV* hv, GV* gv, int how)
+ __attribute__nonnull__(pTHX_1); */
PERL_CALLCONV SV** Perl_hv_store(pTHX_ HV* tb, const char* key, I32 klen, SV* val, U32 hash);
PERL_CALLCONV HE* Perl_hv_store_ent(pTHX_ HV* tb, SV* key, SV* val, U32 hash);