Permalink
Browse files

Merge pull request #963 from yatsukhnenko/develop

WIP: php7 compatibility
  • Loading branch information...
2 parents 08e1064 + 910dd95 commit defd976c56ab7c8f3b9fb37d14f911954bdb3b20 @yatsukhnenko yatsukhnenko committed on GitHub Sep 28, 2016
Showing with 6 additions and 4 deletions.
  1. +1 −1 cluster_library.h
  2. +2 −0 common.h
  3. +1 −1 redis.c
  4. +1 −1 redis_array.c
  5. +1 −1 redis_array.h
View
2 cluster_library.h
@@ -151,7 +151,7 @@ typedef enum CLUSTER_REDIR_TYPE {
typedef int (*mbulk_cb)(RedisSock*,zval*,long long, void* TSRMLS_DC);
/* Specific destructor to free a cluster object */
-// void redis_destructor_redis_cluster(zend_rsrc_list_entry *rsrc TSRMLS_DC);
+// void redis_destructor_redis_cluster(zend_resource *rsrc TSRMLS_DC);
/* A Redis Cluster master node */
typedef struct redisClusterNode {
View
2 common.h
@@ -136,6 +136,8 @@ inline_zend_get_parameters_array(int ht, int param_count, zval *argument_array T
return ret;
}
+typedef zend_rsrc_list_entry zend_resource;
+
#else
#include <ext/standard/php_smart_string.h>
#endif
View
2 redis.c
@@ -425,7 +425,7 @@ static int send_discard_static(RedisSock *redis_sock TSRMLS_DC) {
/**
* redis_destructor_redis_sock
*/
-static void redis_destructor_redis_sock(zend_rsrc_list_entry * rsrc TSRMLS_DC)
+static void redis_destructor_redis_sock(zend_resource * rsrc TSRMLS_DC)
{
RedisSock *redis_sock = (RedisSock *) rsrc->ptr;
redis_sock_disconnect(redis_sock TSRMLS_CC);
View
2 redis_array.c
@@ -117,7 +117,7 @@ static void redis_array_free(RedisArray *ra) {
}
int le_redis_array;
-void redis_destructor_redis_array(zend_rsrc_list_entry * rsrc TSRMLS_DC)
+void redis_destructor_redis_array(zend_resource * rsrc TSRMLS_DC)
{
RedisArray *ra = (RedisArray*)rsrc->ptr;
View
2 redis_array.h
@@ -8,7 +8,7 @@
#endif
#include "common.h"
-void redis_destructor_redis_array(zend_rsrc_list_entry * rsrc TSRMLS_DC);
+void redis_destructor_redis_array(zend_resource * rsrc TSRMLS_DC);
PHP_METHOD(RedisArray, __construct);
PHP_METHOD(RedisArray, __call);

0 comments on commit defd976

Please sign in to comment.