diff options
author | Nicholas Clark <nick@ccl4.org> | 2007-09-19 08:12:09 +0000 |
---|---|---|
committer | Nicholas Clark <nick@ccl4.org> | 2007-09-19 08:12:09 +0000 |
commit | b54b4831042e3002a143d3fcff13b3bad5088c70 (patch) | |
tree | 27aa8960a156889eaaaf419ba915c98f63217bf0 /hv.h | |
parent | 821f5ffa2f9d60b548dcc3fae13ebf47b1875d04 (diff) | |
download | perl-b54b4831042e3002a143d3fcff13b3bad5088c70.tar.gz |
For an LVALUE fetch, "hv_fetch()" will recurse into "hv_store()" for a
hash with magic. Field hashes have u magic, so this recursion triggers.
However, key conversion replaces the original key with the converted
key, so we need to ensure that conversion happens exactly once, else
for a non-idempotent key conversion routine (eg ROT13) we will see
double conversion in this case.
p4raw-id: //depot/perl@31898
Diffstat (limited to 'hv.h')
-rw-r--r-- | hv.h | 13 |
1 files changed, 8 insertions, 5 deletions
@@ -482,11 +482,14 @@ struct refcounted_he { /* Hash actions * Passed in PERL_MAGIC_uvar calls */ -#define HV_DELETE -1 -#define HV_FETCH_ISSTORE 0x01 -#define HV_FETCH_ISEXISTS 0x02 -#define HV_FETCH_LVALUE 0x04 -#define HV_FETCH_JUST_SV 0x08 +#define HV_DELETE -1 +#define HV_DISABLE_UVAR_XKEY 0x01 +/* We need to ensure that these don't clash with G_DISCARD, which is 2, as it + is documented as being passed to hv_delete(). */ +#define HV_FETCH_ISSTORE 0x04 +#define HV_FETCH_ISEXISTS 0x08 +#define HV_FETCH_LVALUE 0x10 +#define HV_FETCH_JUST_SV 0x20 /* * Local variables: |