/* entry in hash value chain */
struct he {
+ /* Keep hent_next first in this structure, because sv_free_arenas take
+ advantage of this to share code between the he arenas and the SV
+ body arenas */
HE *hent_next; /* next entry in chain */
HEK *hent_hek; /* hash key */
SV *hent_val; /* scalar value that was hashed */
is UTF-8 */
};
+struct shared_he {
+ struct he shared_he_he;
+ struct hek shared_he_hek;
+};
/* Subject to change.
Don't access this directly.
I32 xhv_riter; /* current root of iterator */
};
-#define HV_AUX_SIZE STRUCT_OFFSET(struct xpvhv_aux, xhv_array)
-
/* hash structure: */
/* This structure must match the beginning of struct xpvmg in sv.h. */
struct xpvhv {
#define Perl_sharepvn(sv, len, hash) HEK_KEY(share_hek(sv, len, hash))
#define sharepvn(sv, len, hash) Perl_sharepvn(sv, len, hash)
+#define share_hek_hek(hek) \
+ (++(((struct shared_he *)(((char *)hek) \
+ - STRUCT_OFFSET(struct shared_he, \
+ shared_he_hek))) \
+ ->shared_he_he.hent_val), \
+ hek)
+
/*
* Local variables:
* c-indentation-style: bsd