diff options
author | Pavlo Yatsukhnenko <yatsukhnenko@gmail.com> | 2018-03-26 14:47:58 +0300 |
---|---|---|
committer | Pavlo Yatsukhnenko <yatsukhnenko@gmail.com> | 2018-03-26 15:36:07 +0300 |
commit | e17e65d531a2fd4b2315d657c591e4bb26e6437c (patch) | |
tree | 714e64fe46ba0cbc1cfe200704f30d05cd160f43 /common.h | |
parent | 07c16e51b081b12bd19ae77af1143149fae5a760 (diff) |
Use zend_string for all lock_status members
Diffstat (limited to 'common.h')
-rw-r--r-- | common.h | 4 |
1 files changed, 4 insertions, 0 deletions
@@ -46,6 +46,10 @@ zend_string_init(const char *str, size_t len, int persistent) return zstr; } +#define zend_string_equal_val(s1, s2) !memcmp(ZSTR_VAL(s1), ZSTR_VAL(s2), ZSTR_LEN(s1)) +#define zend_string_equal_content(s1, s2) (ZSTR_LEN(s1) == ZSTR_LEN(s2) && zend_string_equal_val(s1, s2)) +#define zend_string_equals(s1, s2) (s1 == s2 || zend_string_equal_content(s1, s2)) + #define zend_string_release(s) do { \ if ((s) && (s)->gc) { \ if ((s)->gc & 0x10 && ZSTR_VAL(s)) efree(ZSTR_VAL(s)); \ |