diff options
author | Father Chrysostomos <sprout@cpan.org> | 2010-11-10 09:43:21 -0800 |
---|---|---|
committer | Father Chrysostomos <sprout@cpan.org> | 2010-11-10 22:36:13 -0800 |
commit | df5f182b2f0708f51f91b8d390f65db1df18e143 (patch) | |
tree | 0a7dd2013f8b0ae84d17248fbd0478fb13559e6a /hv.h | |
parent | 1810cd7c230c5a59515b35da6bad19ff8c8a9d5b (diff) | |
download | perl-df5f182b2f0708f51f91b8d390f65db1df18e143.tar.gz |
Fix memory leaks in mro_package_moved
This commit adds a new HV_FETCH_EMPTY_HE flag for hv_common. It is to
be used in conjunction with HV_FETCH_LVALUE. It just stops the newly-
created HE from having a new undef scalar assigned to it.
This allows code to call hv_common just once instead of an hv_exists/
hv_store pair.
It was such a double hv_common call that I was trying to avoid with
HV_FETCH_LVALUE, without realising that it was leaking.
Diffstat (limited to 'hv.h')
-rw-r--r-- | hv.h | 1 |
1 files changed, 1 insertions, 0 deletions
@@ -590,6 +590,7 @@ a string/length pair, and no precomputed hash. #define HV_FETCH_LVALUE 0x10 #define HV_FETCH_JUST_SV 0x20 #define HV_DELETE 0x40 +#define HV_FETCH_EMPTY_HE 0x80 /* Leave HeVAL null. */ /* =for apidoc newHV |