diff options
author | Nicholas Clark <nick@ccl4.org> | 2005-06-16 15:09:00 +0000 |
---|---|---|
committer | Nicholas Clark <nick@ccl4.org> | 2005-06-16 15:09:00 +0000 |
commit | 3a242bf865f141cec0182498303b227285835533 (patch) | |
tree | 57cd7a28a83ebf02f06cd0f6f2066ed5b59cfebb /util.c | |
parent | ad73156c09397f3cfc63484d3edc50554da0fe15 (diff) | |
download | perl-3a242bf865f141cec0182498303b227285835533.tar.gz |
I'm not convinced that manually creating HVs via sv_upgrade is a great
idea, but as we are, turning on shared keys makes sense.
p4raw-id: //depot/perl@24874
Diffstat (limited to 'util.c')
-rw-r--r-- | util.c | 6 |
1 files changed, 6 insertions, 0 deletions
@@ -3832,6 +3832,9 @@ Perl_scan_version(pTHX_ const char *s, SV *rv, bool qv) AV *av = newAV(); SV* hv = newSVrv(rv, "version"); /* create an SV and upgrade the RV */ (void)sv_upgrade(hv, SVt_PVHV); /* needs to be an HV type */ +#ifndef NODEFAULT_SHAREKEYS + HvSHAREKEYS_on(hv); /* key-sharing on by default */ +#endif if (*s == 'v') { s++; /* get past 'v' */ @@ -3988,6 +3991,9 @@ Perl_new_version(pTHX_ SV *ver) /* This will get reblessed later if a derived class*/ SV* hv = newSVrv(rv, "version"); (void)sv_upgrade(hv, SVt_PVHV); /* needs to be an HV type */ +#ifndef NODEFAULT_SHAREKEYS + HvSHAREKEYS_on(hv); /* key-sharing on by default */ +#endif if ( SvROK(ver) ) ver = SvRV(ver); |