From: "Jerry D. Hedden" <jdhedden@cpan.org>
Message-ID: <
1ff86f510704240735t50cfc159g59b55726ac5ac64b@mail.gmail.com>
p4raw-id: //depot/perl@31064
hv_store_ent(field_tab, field_id, field_ref, 0);
}
-/* These constants are not in the API. If they ever change in hv.c this code
- * must be updated */
-#define HV_FETCH_ISSTORE 0x01
-#define HV_FETCH_ISEXISTS 0x02
-#define HV_FETCH_LVALUE 0x04
-#define HV_FETCH_JUST_SV 0x08
-
-#define HUF_WOULD_CREATE_KEY(x) ((x) != -1 && ((x) & (HV_FETCH_ISSTORE | HV_FETCH_LVALUE)))
+#define HUF_WOULD_CREATE_KEY(x) ((x) != HV_DELETE && ((x) & (HV_FETCH_ISSTORE | HV_FETCH_LVALUE)))
/* The key exchange function. It communicates with S_hv_magic_uvar_xkey
* in hv.c */
/* (klen == HEf_SVKEY) is special for MAGICAL hv entries, meaning key slot
* contains an SV* */
-#define HV_FETCH_ISSTORE 0x01
-#define HV_FETCH_ISEXISTS 0x02
-#define HV_FETCH_LVALUE 0x04
-#define HV_FETCH_JUST_SV 0x08
-
/*
=for apidoc hv_store
if (keysv) {
if (SvSMAGICAL(hv) && SvGMAGICAL(hv))
- keysv = hv_magic_uvar_xkey(hv, keysv, -1);
+ keysv = hv_magic_uvar_xkey(hv, keysv, HV_DELETE);
if (k_flags & HVhek_FREEKEY)
Safefree(key);
key = SvPV_const(keysv, klen);
# define HINTS_REFCNT_TERM NOOP
#endif
+/* 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
+
/*
* Local variables:
* c-indentation-style: bsd