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>2016-10-28 10:36:05 +0300
committerPavlo Yatsukhnenko <yatsukhnenko@gmail.com>2016-10-28 14:53:58 +0300
commit56abe197215e6ec64e63f65c6b8c1e97db5cbedf (patch)
tree22d8299fc95369c3c4319b57e4e297f970392f07 /redis_cluster.c
parentfb5bbc3488eb6b545ce7ba3dc9c5666a59c7291b (diff)
WIP: php7 compatibility
Wrap zend_hash_init destructor. Add implementation of zend_hash_str_exists, zend_hash_str_update_ptr, zend_hash_index_update_ptr and zval_get_long functions.
Diffstat (limited to 'redis_cluster.c')
-rw-r--r--redis_cluster.c14
1 files changed, 12 insertions, 2 deletions
diff --git a/redis_cluster.c b/redis_cluster.c
index 925d3af1..a39eed3d 100644
--- a/redis_cluster.c
+++ b/redis_cluster.c
@@ -231,13 +231,23 @@ zend_function_entry redis_cluster_functions[] = {
};
/* Our context seeds will be a hash table with RedisSock* pointers */
-static void ht_free_seed(void *data) {
+#if (PHP_MAJOR_VERSION < 7)
+static void ht_free_seed(void *data)
+#else
+static void ht_free_seed(zval *data)
+#endif
+{
RedisSock *redis_sock = *(RedisSock**)data;
if(redis_sock) redis_free_socket(redis_sock);
}
/* Free redisClusterNode objects we've stored */
-static void ht_free_node(void *data) {
+#if (PHP_MAJOR_VERSION < 7)
+static void ht_free_node(void *data)
+#else
+static void ht_free_node(zval *data)
+#endif
+{
redisClusterNode *node = *(redisClusterNode**)data;
cluster_free_node(node);
}