diff options
author | Dmitry Stogov <dmitry@zend.com> | 2018-12-27 22:48:25 +0300 |
---|---|---|
committer | Dmitry Stogov <dmitry@zend.com> | 2018-12-27 22:48:25 +0300 |
commit | 675a8a64c3bdf5426113e33d88b477be3f9a0f39 (patch) | |
tree | 938427143119f3390e5cb83279915c01c7a70067 /Zend/zend_hash.h | |
parent | c2179309f49d019ac1dd24d92cc9e0ea2c26d5e1 (diff) | |
download | php-git-675a8a64c3bdf5426113e33d88b477be3f9a0f39.tar.gz |
Use HT_IS_INITIALIZED() and HT_INVALIDATE() macros instead of hackish HT_FLAGS assumtions.
Diffstat (limited to 'Zend/zend_hash.h')
-rw-r--r-- | Zend/zend_hash.h | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/Zend/zend_hash.h b/Zend/zend_hash.h index d045a7abc5..69ab04d2fc 100644 --- a/Zend/zend_hash.h +++ b/Zend/zend_hash.h @@ -42,6 +42,13 @@ #define HT_FLAGS(ht) (ht)->u.flags +#define HT_INVALIDATE(ht) do { \ + HT_FLAGS(ht) = 0; \ + } while (0) + +#define HT_IS_INITIALIZED(ht) \ + ((HT_FLAGS(ht) & HASH_FLAG_INITIALIZED) != 0) + #define HT_IS_PACKED(ht) \ ((HT_FLAGS(ht) & HASH_FLAG_PACKED) != 0) |