This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
Perl_hv_placeholders_get() actually takes a const HV *hv.
authorNicholas Clark <nick@ccl4.org>
Tue, 28 Oct 2008 18:29:36 +0000 (18:29 +0000)
committerNicholas Clark <nick@ccl4.org>
Tue, 28 Oct 2008 18:29:36 +0000 (18:29 +0000)
p4raw-id: //depot/perl@34618

embed.fnc
hv.c
proto.h

index 78c4f19..89630f6 100644 (file)
--- a/embed.fnc
+++ b/embed.fnc
@@ -1797,7 +1797,7 @@ poM       |void   |hv_kill_backrefs       |NN HV *hv
 #endif
 Apd    |void   |hv_clear_placeholders  |NN HV *hv
 ApoR   |I32*   |hv_placeholders_p      |NN HV *hv
-ApoR   |I32    |hv_placeholders_get    |NN HV *hv
+ApoR   |I32    |hv_placeholders_get    |NN const HV *hv
 Apo    |void   |hv_placeholders_set    |NN HV *hv|I32 ph
 
 p      |SV*    |magic_scalarpack|NN HV *hv|NN MAGIC *mg
diff --git a/hv.c b/hv.c
index 6aae9d4..6418576 100644 (file)
--- a/hv.c
+++ b/hv.c
@@ -2506,10 +2506,10 @@ Perl_hv_placeholders_p(pTHX_ HV *hv)
 
 
 I32
-Perl_hv_placeholders_get(pTHX_ HV *hv)
+Perl_hv_placeholders_get(pTHX_ const HV *hv)
 {
     dVAR;
-    MAGIC * const mg = mg_find((SV*)hv, PERL_MAGIC_rhash);
+    MAGIC * const mg = mg_find((const SV *)hv, PERL_MAGIC_rhash);
 
     PERL_ARGS_ASSERT_HV_PLACEHOLDERS_GET;
 
diff --git a/proto.h b/proto.h
index 0d7d9a4..5f2600d 100644 (file)
--- a/proto.h
+++ b/proto.h
@@ -6189,7 +6189,7 @@ PERL_CALLCONV I32*        Perl_hv_placeholders_p(pTHX_ HV *hv)
 #define PERL_ARGS_ASSERT_HV_PLACEHOLDERS_P     \
        assert(hv)
 
-PERL_CALLCONV I32      Perl_hv_placeholders_get(pTHX_ HV *hv)
+PERL_CALLCONV I32      Perl_hv_placeholders_get(pTHX_ const HV *hv)
                        __attribute__warn_unused_result__
                        __attribute__nonnull__(pTHX_1);
 #define PERL_ARGS_ASSERT_HV_PLACEHOLDERS_GET   \