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@users.noreply.github.com>2019-01-21 12:57:35 +0300
committerGitHub <noreply@github.com>2019-01-21 12:57:35 +0300
commit3aad9e653bf85072602a1f3b8dcf888891a9206e (patch)
treefc7935bfeaba7119ca91ca3df0108f9ef2d0faad /common.h
parente9e47834560fd2e2b118150572eae3379a245cb3 (diff)
parentc5994f2a42b8a348af92d3acb4edff1328ad8ce1 (diff)
Merge pull request #1494 from phpredis/cluster-auth2
RedisCluster auth
Diffstat (limited to 'common.h')
-rw-r--r--common.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/common.h b/common.h
index 2d16be64..65b497b6 100644
--- a/common.h
+++ b/common.h
@@ -68,6 +68,8 @@ zend_string_realloc(zend_string *s, size_t len, int persistent)
return zstr;
}
+#define zend_string_copy(s) zend_string_init(ZSTR_VAL(s), ZSTR_LEN(s), 0)
+
#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))