Note future possible flexibility for Perl_magic_sethint().
Nicholas Clark [Fri, 31 Mar 2006 16:22:13 +0000 (16:22 +0000)]
p4raw-id: //depot/perl@27647

mg.c

diff --git a/mg.c b/mg.c
index b7e2e56..615a273 100644 (file)
--- a/mg.c
+++ b/mg.c
@@ -2852,6 +2852,11 @@ Perl_magic_sethint(pTHX_ SV *sv, MAGIC *mg)
     dVAR;
     assert(mg->mg_len == HEf_SVKEY);
 
+    /* mg->mg_obj isn't being used.  If needed, it would be possible to store
+       an alternative leaf in there, with PL_compiling.cop_hints being used if
+       it's NULL. If needed for threads, the alternative could lock a mutex,
+       or take other more complex action.  */
+
     PL_compiling.cop_hints
        = Perl_refcounted_he_new(aTHX_ PL_compiling.cop_hints,
                                 (SV *)mg->mg_ptr, newSVsv(sv));