Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/phpredis/phpredis.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPavlo Yatsukhnenko <yatsukhnenko@gmail.com>2018-03-26 14:47:58 +0300
committerPavlo Yatsukhnenko <yatsukhnenko@gmail.com>2018-03-26 15:36:07 +0300
commite17e65d531a2fd4b2315d657c591e4bb26e6437c (patch)
tree714e64fe46ba0cbc1cfe200704f30d05cd160f43 /common.h
parent07c16e51b081b12bd19ae77af1143149fae5a760 (diff)
Use zend_string for all lock_status members
Diffstat (limited to 'common.h')
-rw-r--r--common.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/common.h b/common.h
index 11c243e4..f2062a9e 100644
--- a/common.h
+++ b/common.h
@@ -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)); \