@@ -230,7 +230,7 @@ typedef struct redisCluster {
230
230
/* One RedisSock struct for serialization and prefix information */
231
231
RedisSock * flags ;
232
232
233
- /* The first line of our last reply, not including our reply type byte
233
+ /* The first line of our last reply, not including our reply type byte
234
234
* or the trailing \r\n */
235
235
char line_reply [1024 ];
236
236
@@ -278,7 +278,7 @@ typedef struct clusterDistList {
278
278
size_t len , size ;
279
279
} clusterDistList ;
280
280
281
- /* Context for things like MGET/MSET/MSETNX. When executing in MULTI mode,
281
+ /* Context for things like MGET/MSET/MSETNX. When executing in MULTI mode,
282
282
* we'll want to re-integrate into one running array, except for the last
283
283
* command execution, in which we'll want to return the value (or add it) */
284
284
typedef struct clusterMultiCtx {
@@ -303,8 +303,8 @@ typedef struct clusterMultiCmd {
303
303
int argc ;
304
304
305
305
/* The full command, built into cmd, and args as we aggregate */
306
- smart_str cmd ;
307
- smart_str args ;
306
+ smart_string cmd ;
307
+ smart_string args ;
308
308
} clusterMultiCmd ;
309
309
310
310
/* Hiredis like structure for processing any sort of reply Redis Cluster might
@@ -321,16 +321,16 @@ typedef struct clusterReply {
321
321
322
322
/* Direct variant response handler */
323
323
clusterReply * cluster_read_resp (redisCluster * c TSRMLS_DC );
324
- clusterReply * cluster_read_sock_resp (RedisSock * redis_sock ,
324
+ clusterReply * cluster_read_sock_resp (RedisSock * redis_sock ,
325
325
REDIS_REPLY_TYPE type , size_t reply_len TSRMLS_DC );
326
326
void cluster_free_reply (clusterReply * reply , int free_data );
327
327
328
328
/* Cluster distribution helpers for WATCH */
329
329
HashTable * cluster_dist_create ();
330
330
void cluster_dist_free (HashTable * ht );
331
- int cluster_dist_add_key (redisCluster * c , HashTable * ht , char * key ,
331
+ int cluster_dist_add_key (redisCluster * c , HashTable * ht , char * key ,
332
332
int key_len , clusterKeyVal * * kv );
333
- void cluster_dist_add_val (redisCluster * c , clusterKeyVal * kv , zval * val
333
+ void cluster_dist_add_val (redisCluster * c , clusterKeyVal * kv , zval * val
334
334
TSRMLS_DC );
335
335
336
336
/* Aggregation for multi commands like MGET, MSET, and MSETNX */
@@ -346,7 +346,7 @@ unsigned short cluster_hash_key(const char *key, int len);
346
346
/* Get the current time in miliseconds */
347
347
long long mstime (void );
348
348
349
- PHP_REDIS_API short cluster_send_command (redisCluster * c , short slot , const char * cmd ,
349
+ PHP_REDIS_API short cluster_send_command (redisCluster * c , short slot , const char * cmd ,
350
350
int cmd_len TSRMLS_DC );
351
351
352
352
PHP_REDIS_API void cluster_disconnect (redisCluster * c TSRMLS_DC );
@@ -358,7 +358,7 @@ PHP_REDIS_API int cluster_reset_multi(redisCluster *c);
358
358
359
359
PHP_REDIS_API short cluster_find_slot (redisCluster * c , const char * host ,
360
360
unsigned short port );
361
- PHP_REDIS_API int cluster_send_slot (redisCluster * c , short slot , char * cmd ,
361
+ PHP_REDIS_API int cluster_send_slot (redisCluster * c , short slot , char * cmd ,
362
362
int cmd_len , REDIS_REPLY_TYPE rtype TSRMLS_DC );
363
363
364
364
PHP_REDIS_API redisCluster * cluster_create (double timeout , double read_timeout ,
@@ -374,28 +374,28 @@ PHP_REDIS_API char **cluster_sock_read_multibulk_reply(RedisSock *redis_sock,
374
374
/*
375
375
* Redis Cluster response handlers. Our response handlers generally take the
376
376
* following form:
377
- * PHP_REDIS_API void handler(INTERNAL_FUNCTION_PARAMETERS, redisCluster *c,
377
+ * PHP_REDIS_API void handler(INTERNAL_FUNCTION_PARAMETERS, redisCluster *c,
378
378
* void *ctx)
379
379
*
380
380
* Reply handlers are responsible for setting the PHP return value (either to
381
381
* something valid, or FALSE in the case of some failures).
382
382
*/
383
383
384
- PHP_REDIS_API void cluster_bool_resp (INTERNAL_FUNCTION_PARAMETERS , redisCluster * c ,
384
+ PHP_REDIS_API void cluster_bool_resp (INTERNAL_FUNCTION_PARAMETERS , redisCluster * c ,
385
385
void * ctx );
386
386
PHP_REDIS_API void cluster_ping_resp (INTERNAL_FUNCTION_PARAMETERS , redisCluster * c ,
387
387
void * ctx );
388
- PHP_REDIS_API void cluster_bulk_resp (INTERNAL_FUNCTION_PARAMETERS , redisCluster * c ,
388
+ PHP_REDIS_API void cluster_bulk_resp (INTERNAL_FUNCTION_PARAMETERS , redisCluster * c ,
389
389
void * ctx );
390
- PHP_REDIS_API void cluster_bulk_raw_resp (INTERNAL_FUNCTION_PARAMETERS , redisCluster * c ,
390
+ PHP_REDIS_API void cluster_bulk_raw_resp (INTERNAL_FUNCTION_PARAMETERS , redisCluster * c ,
391
391
B41A
void * ctx );
392
- PHP_REDIS_API void cluster_dbl_resp (INTERNAL_FUNCTION_PARAMETERS , redisCluster * c ,
392
+ PHP_REDIS_API void cluster_dbl_resp (INTERNAL_FUNCTION_PARAMETERS , redisCluster * c ,
393
393
void * ctx );
394
- PHP_REDIS_API void cluster_1_resp (INTERNAL_FUNCTION_PARAMETERS , redisCluster * c ,
394
+ PHP_REDIS_API void cluster_1_resp (INTERNAL_FUNCTION_PARAMETERS , redisCluster * c ,
395
395
void * ctx );
396
- PHP_REDIS_API void cluster_long_resp (INTERNAL_FUNCTION_PARAMETERS , redisCluster * c ,
396
+ PHP_REDIS_API void cluster_long_resp (INTERNAL_FUNCTION_PARAMETERS , redisCluster * c ,
397
397
void * ctx );
398
- PHP_REDIS_API void cluster_type_resp (INTERNAL_FUNCTION_PARAMETERS , redisCluster * c ,
398
+ PHP_REDIS_API void cluster_type_resp (INTERNAL_FUNCTION_PARAMETERS , redisCluster * c ,
399
399
void * ctx );
400
400
PHP_REDIS_API void cluster_sub_resp (INTERNAL_FUNCTION_PARAMETERS , redisCluster * c ,
401
401
void * ctx );
@@ -407,27 +407,27 @@ PHP_REDIS_API void cluster_variant_resp(INTERNAL_FUNCTION_PARAMETERS,
407
407
redisCluster * c , void * ctx );
408
408
409
409
/* MULTI BULK response functions */
410
- PHP_REDIS_API void cluster_gen_mbulk_resp (INTERNAL_FUNCTION_PARAMETERS ,
410
+ PHP_REDIS_API void cluster_gen_mbulk_resp (INTERNAL_FUNCTION_PARAMETERS ,
411
411
redisCluster * c , mbulk_cb func , void * ctx );
412
- PHP_REDIS_API void cluster_mbulk_raw_resp (INTERNAL_FUNCTION_PARAMETERS ,
412
+ PHP_REDIS_API void cluster_mbulk_raw_resp (INTERNAL_FUNCTION_PARAMETERS ,
413
413
redisCluster * c , void * ctx );
414
- PHP_REDIS_API void cluster_mbulk_resp (INTERNAL_FUNCTION_PARAMETERS ,
414
+ PHP_REDIS_API void cluster_mbulk_resp (INTERNAL_FUNCTION_PARAMETERS ,
415
415
redisCluster * c , void * ctx );
416
416
PHP_REDIS_API void cluster_mbulk_zipstr_resp (INTERNAL_FUNCTION_PARAMETERS ,
417
417
redisCluster * c , void * ctx );
418
418
PHP_REDIS_API void cluster_mbulk_zipdbl_resp (INTERNAL_FUNCTION_PARAMETERS ,
419
419
redisCluster * c , void * ctx );
420
- PHP_REDIS_API void cluster_mbulk_assoc_resp (INTERNAL_FUNCTION_PARAMETERS ,
420
+ PHP_REDIS_API void cluster_mbulk_assoc_resp (INTERNAL_FUNCTION_PARAMETERS ,
421
421
redisCluster * c , void * ctx );
422
422
PHP_REDIS_API void cluster_multi_mbulk_resp (INTERNAL_FUNCTION_PARAMETERS ,
423
423
redisCluster * c , void * ctx );
424
- PHP_REDIS_API zval * cluster_zval_mbulk_resp (INTERNAL_FUNCTION_PARAMETERS ,
424
+ PHP_REDIS_API zval * cluster_zval_mbulk_resp (INTERNAL_FUNCTION_PARAMETERS ,
425
425
redisCluster * c , int pull , mbulk_cb cb );
426
426
427
427
/* Handlers for things like DEL/MGET/MSET/MSETNX */
428
- PHP_REDIS_API void cluster_del_resp (INTERNAL_FUNCTION_PARAMETERS ,
428
+ PHP_REDIS_API void cluster_del_resp (INTERNAL_FUNCTION_PARAMETERS ,
429
429
redisCluster * c , void * ctx );
430
- PHP_REDIS_API void cluster_mbulk_mget_resp (INTERNAL_FUNCTION_PARAMETERS ,
430
+ PHP_REDIS_API void cluster_mbulk_mget_resp (INTERNAL_FUNCTION_PARAMETERS ,
431
431
redisCluster * c , void * ctx );
432
432
PHP_REDIS_API void cluster_mset_resp (INTERNAL_FUNCTION_PARAMETERS ,
433
433
redisCluster * c , void * ctx );
@@ -443,13 +443,13 @@ PHP_REDIS_API void cluster_info_resp(INTERNAL_FUNCTION_PARAMETERS,
443
443
redisCluster * c , void * ctx );
444
444
445
445
/* CLIENT LIST response handler */
446
- PHP_REDIS_API void cluster_client_list_resp (INTERNAL_FUNCTION_PARAMETERS ,
446
+ PHP_REDIS_API void cluster_client_list_resp (INTERNAL_FUNCTION_PARAMETERS ,
447
447
redisCluster * c , void * ctx );
448
448
449
449
/* MULTI BULK processing callbacks */
450
- int mbulk_resp_loop (RedisSock * redis_sock , zval * z_result ,
450
+ int mbulk_resp_loop (RedisSock * redis_sock , zval * z_result ,
451
451
long long count , void * ctx TSRMLS_DC );
452
- int mbulk_resp_loop_raw (RedisSock * redis_sock , zval * z_result ,
452
+ int mbulk_resp_loop_raw (RedisSock * redis_sock , zval * z_result ,
453
453
long long count , void * ctx TSRMLS_DC );
454
454
int mbulk_resp_loop_zipstr (RedisSock * redis_sock , zval * z_result ,
455
455
long long count , void * ctx TSRMLS_DC );
0 commit comments