@@ -230,7 +230,7 @@ typedef struct redisCluster {
230230    /* One RedisSock struct for serialization and prefix information */ 
231231    RedisSock  * flags ;
232232
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 
234234     * or the trailing \r\n */ 
235235    char  line_reply [1024 ];
236236
@@ -278,7 +278,7 @@ typedef struct clusterDistList {
278278    size_t  len , size ;
279279} clusterDistList ;
280280
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, 
282282 * we'll want to re-integrate into one running array, except for the last 
283283 * command execution, in which we'll want to return the value (or add it) */ 
284284typedef  struct  clusterMultiCtx  {
@@ -303,8 +303,8 @@ typedef struct clusterMultiCmd {
303303    int  argc ;
304304
305305    /* 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 ;
308308} clusterMultiCmd ;
309309
310310/* Hiredis like structure for processing any sort of reply Redis Cluster might 
@@ -321,16 +321,16 @@ typedef struct clusterReply {
321321
322322/* Direct variant response handler */ 
323323clusterReply  * 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 ,
325325    REDIS_REPLY_TYPE  type , size_t  reply_len  TSRMLS_DC );
326326void  cluster_free_reply (clusterReply  * reply , int  free_data );
327327
328328/* Cluster distribution helpers for WATCH */ 
329329HashTable  * cluster_dist_create ();
330330void  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 ,
332332    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 
334334    TSRMLS_DC );
335335
336336/* Aggregation for multi commands like MGET, MSET, and MSETNX */ 
@@ -346,7 +346,7 @@ unsigned short cluster_hash_key(const char *key, int len);
346346/* Get the current time in miliseconds */ 
347347long long  mstime (void );
348348
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 ,
350350    int  cmd_len  TSRMLS_DC );
351351
352352PHP_REDIS_API  void  cluster_disconnect (redisCluster  * c  TSRMLS_DC );
@@ -358,7 +358,7 @@ PHP_REDIS_API int cluster_reset_multi(redisCluster *c);
358358
359359PHP_REDIS_API  short  cluster_find_slot (redisCluster  * c , const  char  * host ,
360360    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 ,
362362    int  cmd_len , REDIS_REPLY_TYPE  rtype  TSRMLS_DC );
363363
364364PHP_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,
374374/* 
375375 * Redis Cluster response handlers.  Our response handlers generally take the 
376376 * following form: 
377-  *      PHP_REDIS_API void handler(INTERNAL_FUNCTION_PARAMETERS, redisCluster *c,   
377+  *      PHP_REDIS_API void handler(INTERNAL_FUNCTION_PARAMETERS, redisCluster *c, 
378378 *          void *ctx) 
379379 * 
380380 * Reply handlers are responsible for setting the PHP return value (either to 
381381 * something valid, or FALSE in the case of some failures). 
382382 */ 
383383
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 ,
385385    void  * ctx );
386386PHP_REDIS_API  void  cluster_ping_resp (INTERNAL_FUNCTION_PARAMETERS , redisCluster  * c ,
387387    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 ,
389389    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 ,
391391    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 ,
393393    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 ,
395395    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 ,
397397    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 ,
399399    void  * ctx );
400400PHP_REDIS_API  void  cluster_sub_resp (INTERNAL_FUNCTION_PARAMETERS , redisCluster  * c ,
401401    void  * ctx );
@@ -407,27 +407,27 @@ PHP_REDIS_API void cluster_variant_resp(INTERNAL_FUNCTION_PARAMETERS,
407407    redisCluster  * c , void  * ctx );
408408
409409/* 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 ,
411411    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 ,
413413    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 ,
415415    redisCluster  * c , void  * ctx );
416416PHP_REDIS_API  void  cluster_mbulk_zipstr_resp (INTERNAL_FUNCTION_PARAMETERS ,
417417    redisCluster  * c , void  * ctx );
418418PHP_REDIS_API  void  cluster_mbulk_zipdbl_resp (INTERNAL_FUNCTION_PARAMETERS ,
419419    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 ,
421421    redisCluster  * c , void  * ctx );
422422PHP_REDIS_API  void  cluster_multi_mbulk_resp (INTERNAL_FUNCTION_PARAMETERS ,
423423    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 ,
425425    redisCluster  * c , int  pull , mbulk_cb  cb );
426426
427427/* 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 ,
429429    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 ,
431431    redisCluster  * c , void  * ctx );
432432PHP_REDIS_API  void  cluster_mset_resp (INTERNAL_FUNCTION_PARAMETERS ,
433433    redisCluster  * c , void  * ctx );
@@ -443,13 +443,13 @@ PHP_REDIS_API void cluster_info_resp(INTERNAL_FUNCTION_PARAMETERS,
443443    redisCluster  * c , void  * ctx );
444444
445445/* 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 ,
447447    redisCluster  * c , void  * ctx );
448448
449449/* 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 ,
451451    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 ,
453453    long long  count , void  * ctx  TSRMLS_DC );
454454int  mbulk_resp_loop_zipstr (RedisSock  * redis_sock , zval  * z_result ,
455455    long long  count , void  * ctx  TSRMLS_DC );
0 commit comments