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-11-10 10:37:02 +0300
committerPavlo Yatsukhnenko <yatsukhnenko@gmail.com>2016-11-10 22:39:34 +0300
commit8a4eeecaf3220ed941c0489d439c52754e0da00b (patch)
treef9a2ab59b2585027d42ea928ebfcec4e0d1a5ce1 /redis_cluster.c
parent8f64ab3303fb2da9b42a5c38a884862aef0c794c (diff)
WIP: php7 compatibility
Diffstat (limited to 'redis_cluster.c')
-rw-r--r--redis_cluster.c12
1 files changed, 8 insertions, 4 deletions
diff --git a/redis_cluster.c b/redis_cluster.c
index 92af79be..cd3381af 100644
--- a/redis_cluster.c
+++ b/redis_cluster.c
@@ -340,7 +340,13 @@ create_cluster_context(zend_class_entry *class_type TSRMLS_DC) {
}
/* Free redisCluster context */
-void free_cluster_context(void *object TSRMLS_DC) {
+void
+#if (PHP_MAJOR_VERSION < 7)
+free_cluster_context(void *object TSRMLS_DC)
+#else
+free_cluster_context(zend_object *object)
+#endif
+{
redisCluster *cluster;
// Grab context
@@ -385,7 +391,6 @@ void redis_cluster_init(redisCluster *c, HashTable *ht_seeds, double timeout,
zend_throw_exception(redis_cluster_exception_ce,
"Must pass seeds", 0 TSRMLS_CC);
}
-
/* Set our timeout and read_timeout which we'll pass through to the
* socket type operations */
c->timeout = timeout;
@@ -919,10 +924,9 @@ static int cluster_mset_cmd(INTERNAL_FUNCTION_PARAMETERS, char *kw, int kw_len,
/* {{{ proto array RedisCluster::del(string key1, string key2, ... keyN) */
PHP_METHOD(RedisCluster, del) {
- zval *z_ret;
+ zval *z_ret = emalloc(sizeof(zval));
// Initialize a LONG value to zero for our return
- MAKE_STD_ZVAL(z_ret);
ZVAL_LONG(z_ret, 0);
// Parse args, process