From: Nicholas Clark Date: Fri, 31 Mar 2006 16:22:13 +0000 (+0000) Subject: Note future possible flexibility for Perl_magic_sethint(). X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=e6e3e4549ce4a492f10dd4f937e78cadaf4ed317;p=p5sagit%2Fp5-mst-13.2.git Note future possible flexibility for Perl_magic_sethint(). p4raw-id: //depot/perl@27647 --- diff --git a/mg.c b/mg.c index b7e2e56..615a273 100644 --- 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));