File tree 2 files changed +10
-0
lines changed
2 files changed +10
-0
lines changed Original file line number Diff line number Diff line change @@ -173,6 +173,10 @@ typedef struct clusterFoldItem clusterFoldItem;
173
173
174
174
/* RedisCluster implementation structure */
175
175
typedef struct redisCluster {
176
+ #if (PHP_MAJOR_VERSION < 7 )
177
+ zend_object std ;
178
+ #endif
179
+
176
180
/* Timeout and read timeout (for normal operations) */
177
181
double timeout ;
178
182
double read_timeout ;
@@ -242,8 +246,10 @@ typedef struct redisCluster {
242
246
unsigned short redir_slot ;
243
247
unsigned short redir_port ;
244
248
249
+ #if (PHP_MAJOR_VERSION >= 7 )
245
250
/* Zend object handler */
246
251
zend_object std ;
252
+ #endif
247
253
} redisCluster ;
248
254
249
255
/* RedisCluster response processing callback */
Original file line number Diff line number Diff line change @@ -342,7 +342,11 @@ create_cluster_context(zend_class_entry *class_type TSRMLS_DC) {
342
342
343
343
/* Helper to retrieve the redisCluster object from the zend_object member */
344
344
static redisCluster * getClusterObject (zend_object * object ) {
345
+ #if (PHP_MAJOR_VERSION < 7 )
346
+ return (redisCluster * )object ;
347
+ #else
345
348
return (redisCluster * )((char * )(object ) - XtOffsetOf (redisCluster , std ));
349
+ #endif
346
350
}
347
351
348
352
/* Free redisCluster context */
You can’t perform that action at this time.
0 commit comments