diff options
author | Nicholas Clark <nick@ccl4.org> | 2007-09-20 12:13:16 +0000 |
---|---|---|
committer | Nicholas Clark <nick@ccl4.org> | 2007-09-20 12:13:16 +0000 |
commit | 4c2df08ca7dcec8d9dadbf994c085e23d96957a3 (patch) | |
tree | c12c69e6cae735fc84bc1a5acadd1c971cc1ff23 /hv.h | |
parent | 6b4de9074f35c313f7b151542a4d1bbf6fd263a2 (diff) | |
download | perl-4c2df08ca7dcec8d9dadbf994c085e23d96957a3.tar.gz |
Convert hv_delete_ent(), hv_exists_ent(), hv_fetch_ent() and
hv_store_ent() to macros, and consign the function bodies to history.
Er, mathoms.c
p4raw-id: //depot/perl@31924
Diffstat (limited to 'hv.h')
-rw-r--r-- | hv.h | 13 |
1 files changed, 13 insertions, 0 deletions
@@ -412,6 +412,19 @@ C<SV*>. ->shared_he_he.he_valu.hent_refcount), \ hek) +#define hv_store_ent(zlonk, awk, touche, zgruppp) \ + hv_common((zlonk), (awk), NULL, 0, 0, HV_FETCH_ISSTORE, (touche), (zgruppp)) + +#define hv_exists_ent(zlonk, awk, zgruppp) \ + (hv_common((zlonk), (awk), NULL, 0, 0, HV_FETCH_ISEXISTS, 0, (zgruppp))\ + ? TRUE : FALSE) +#define hv_fetch_ent(zlonk, awk, touche, zgruppp) \ + hv_common((zlonk), (awk), NULL, 0, 0, ((touche) ? HV_FETCH_LVALUE : 0), \ + NULL, (zgruppp)) +#define hv_delete_ent(zlonk, awk, touche, zgruppp) \ + ((SV *) hv_common((zlonk), (awk), NULL, 0, 0, (touche) | HV_DELETE, \ + NULL, (zgruppp))) + /* This refcounted he structure is used for storing the hints used for lexical pragmas. Without threads, it's basically struct he + refcount. With threads, life gets more complex as the structure needs to be shared |