@@ -78,7 +78,7 @@ ra_load_hosts(RedisArray *ra, HashTable *hosts, zend_string *auth, long retry_in
7878 if (!b_lazy_connect )
7979 {
8080 /* connect */
81- if (redis_sock_server_open (redis -> sock ) < 0 || ( auth && redis_sock_auth ( redis -> sock ) < 0 ) ) {
81+ if (redis_sock_server_open (redis -> sock ) < 0 ) {
8282 zval_dtor (& z_cons );
8383 ra -> count = ++ i ;
8484 return NULL ;
@@ -484,7 +484,7 @@ ra_call_extractor(RedisArray *ra, const char *key, int key_len)
484484 ZVAL_NULL (& z_ret );
485485 /* call extraction function */
486486 ZVAL_STRINGL (& z_argv , key , key_len );
487- ra_call_user_function (EG (function_table ), NULL , & ra -> z_fun , & z_ret , 1 , & z_argv );
487+ call_user_function (EG (function_table ), NULL , & ra -> z_fun , & z_ret , 1 , & z_argv );
488488
489489 if (Z_TYPE (z_ret ) == IS_STRING ) {
490490 out = zval_get_string (& z_ret );
@@ -525,7 +525,7 @@ ra_call_distributor(RedisArray *ra, const char *key, int key_len)
525525 ZVAL_NULL (& z_ret );
526526 /* call extraction function */
527527 ZVAL_STRINGL (& z_argv , key , key_len );
528- ra_call_user_function (EG (function_table ), NULL , & ra -> z_dist , & z_ret , 1 , & z_argv );
528+ call_user_function (EG (function_table ), NULL , & ra -> z_dist , & z_ret , 1 , & z_argv );
529529
530530 ret = (Z_TYPE (z_ret ) == IS_LONG ) ? Z_LVAL (z_ret ) : -1 ;
531531
@@ -623,7 +623,7 @@ ra_index_multi(zval *z_redis, long multi_value) {
623623 /* run MULTI */
624624 ZVAL_STRINGL (& z_fun_multi , "MULTI" , 5 );
625625 ZVAL_LONG (& z_args [0 ], multi_value );
626- ra_call_user_function (& redis_ce -> function_table , z_redis , & z_fun_multi , & z_ret , 1 , z_args );
626+ call_user_function (& redis_ce -> function_table , z_redis , & z_fun_multi , & z_ret , 1 , z_args );
627627 zval_dtor (& z_fun_multi );
628628 zval_dtor (& z_ret );
629629}
@@ -653,7 +653,7 @@ ra_index_change_keys(const char *cmd, zval *z_keys, zval *z_redis) {
653653 }
654654
655655 /* run cmd */
656- ra_call_user_function (& redis_ce -> function_table , z_redis , & z_fun , & z_ret , argc , z_args );
656+ call_user_function (& redis_ce -> function_table , z_redis , & z_fun , & z_ret , argc , z_args );
657657
658658 zval_dtor (& z_args [0 ]);
659659 zval_dtor (& z_fun );
@@ -709,7 +709,7 @@ ra_index_key(const char *key, int key_len, zval *z_redis) {
709709 ZVAL_STRINGL (& z_args [1 ], key , key_len );
710710
711711 /* run SADD */
712- ra_call_user_function (& redis_ce -> function_table , z_redis , & z_fun_sadd , & z_ret , 2 , z_args );
712+ call_user_function (& redis_ce -> function_table , z_redis , & z_fun_sadd , & z_ret , 2 , z_args );
713713 zval_dtor (& z_fun_sadd );
714714 zval_dtor (& z_args [1 ]);
715715 zval_dtor (& z_args [0 ]);
@@ -723,7 +723,7 @@ ra_index_exec(zval *z_redis, zval *return_value, int keep_all) {
723723
724724 /* run EXEC */
725725 ZVAL_STRINGL (& z_fun_exec , "EXEC" , 4 );
726- ra_call_user_function (& redis_ce -> function_table , z_redis , & z_fun_exec , & z_ret , 0 , NULL );
726+ call_user_function (& redis_ce -> function_table , z_redis , & z_fun_exec , & z_ret , 0 , NULL );
727727 zval_dtor (& z_fun_exec );
728728
729729 /* extract first element of exec array and put into return_value. */
@@ -750,7 +750,7 @@ ra_index_discard(zval *z_redis, zval *return_value) {
750750
751751 /* run DISCARD */
752752 ZVAL_STRINGL (& z_fun_discard , "DISCARD" , 7 );
753- ra_call_user_function (& redis_ce -> function_table , z_redis , & z_fun_discard , & z_ret , 0 , NULL );
753+ call_user_function (& redis_ce -> function_table , z_redis , & z_fun_discard , & z_ret , 0 , NULL );
754754
755755 zval_dtor (& z_fun_discard );
756756 zval_dtor (& z_ret );
@@ -763,7 +763,7 @@ ra_index_unwatch(zval *z_redis, zval *return_value) {
763763
764764 /* run UNWATCH */
765765 ZVAL_STRINGL (& z_fun_unwatch , "UNWATCH" , 7 );
766- ra_call_user_function (& redis_ce -> function_table , z_redis , & z_fun_unwatch , & z_ret , 0 , NULL );
766+ call_user_function (& redis_ce -> function_table , z_redis , & z_fun_unwatch , & z_ret , 0 , NULL );
767767
768768 zval_dtor (& z_fun_unwatch );
769769 zval_dtor (& z_ret );
@@ -803,14 +803,14 @@ ra_get_key_type(zval *z_redis, const char *key, int key_len, zval *z_from, long
803803 /* run TYPE */
804804 ZVAL_NULL (& z_ret );
805805 ZVAL_STRINGL (& z_fun , "TYPE" , 4 );
806- ra_call_user_function (& redis_ce -> function_table , z_redis , & z_fun , & z_ret , 1 , & z_arg );
806+ call_user_function (& redis_ce -> function_table , z_redis , & z_fun , & z_ret , 1 , & z_arg );
807807 zval_dtor (& z_fun );
808808 zval_dtor (& z_ret );
809809
810810 /* run TYPE */
811811 ZVAL_NULL (& z_ret );
812812 ZVAL_STRINGL (& z_fun , "TTL" , 3 );
813- ra_call_user_function (& redis_ce -> function_table , z_redis , & z_fun , & z_ret , 1 , & z_arg );
813+ call_user_function (& redis_ce -> function_table , z_redis , & z_fun , & z_ret , 1 , & z_arg );
814814 zval_dtor (& z_fun );
815815 zval_dtor (& z_ret );
816816
@@ -842,7 +842,7 @@ ra_remove_from_index(zval *z_redis, const char *key, int key_len) {
842842 ZVAL_STRINGL (& z_args [0 ], PHPREDIS_INDEX_NAME , sizeof (PHPREDIS_INDEX_NAME ) - 1 );
843843 ZVAL_STRINGL (& z_args [1 ], key , key_len );
844844
845- ra_call_user_function (& redis_ce -> function_table , z_redis , & z_fun_srem , & z_ret , 2 , z_args );
845+ call_user_function (& redis_ce -> function_table , z_redis , & z_fun_srem , & z_ret , 2 , z_args );
846846
847847 /* cleanup */
848848 zval_dtor (& z_fun_srem );
@@ -864,7 +864,7 @@ ra_del_key(const char *key, int key_len, zval *z_from) {
864864 /* run DEL on source */
865865 ZVAL_STRINGL (& z_fun_del , "DEL" , 3 );
866866 ZVAL_STRINGL (& z_args [0 ], key , key_len );
867- ra_call_user_function (& redis_ce -> function_table , z_from , & z_fun_del , & z_ret , 1 , z_args );
867+ call_user_function (& redis_ce -> function_table , z_from , & z_fun_del , & z_ret , 1 , z_args );
868868 zval_dtor (& z_fun_del );
869869 zval_dtor (& z_args [0 ]);
870870 zval_dtor (& z_ret );
@@ -889,7 +889,7 @@ ra_expire_key(const char *key, int key_len, zval *z_to, long ttl) {
889889 ZVAL_STRINGL (& z_fun_expire , "EXPIRE" , 6 );
890890 ZVAL_STRINGL (& z_args [0 ], key , key_len );
891891 ZVAL_LONG (& z_args [1 ], ttl );
892- ra_call_user_function (& redis_ce -> function_table , z_to , & z_fun_expire , & z_ret , 2 , z_args );
892+ call_user_function (& redis_ce -> function_table , z_to , & z_fun_expire , & z_ret , 2 , z_args );
893893 zval_dtor (& z_fun_expire );
894894 zval_dtor (& z_args [0 ]);
895895 zval_dtor (& z_ret );
@@ -913,7 +913,7 @@ ra_move_zset(const char *key, int key_len, zval *z_from, zval *z_to, long ttl) {
913913 ZVAL_STRINGL (& z_args [1 ], "0" , 1 );
914914 ZVAL_STRINGL (& z_args [2 ], "-1" , 2 );
915915 ZVAL_BOOL (& z_args [3 ], 1 );
916- ra_call_user_function (& redis_ce -> function_table , z_from , & z_fun_zrange , & z_ret , 4 , z_args );
916+ call_user_function (& redis_ce -> function_table , z_from , & z_fun_zrange , & z_ret , 4 , z_args );
917917 zval_dtor (& z_fun_zrange );
918918 zval_dtor (& z_args [2 ]);
919919 zval_dtor (& z_args [1 ]);
@@ -951,7 +951,7 @@ ra_move_zset(const char *key, int key_len, zval *z_from, zval *z_to, long ttl) {
951951
952952 /* run ZADD on target */
953953 ZVAL_STRINGL (& z_fun_zadd , "ZADD" , 4 );
954- ra_call_user_function (& redis_ce -> function_table , z_to , & z_fun_zadd , & z_ret_dest , 1 + 2 * count , z_zadd_args );
954+ call_user_function (& redis_ce -> function_table , z_to , & z_fun_zadd , & z_ret_dest , 1 + 2 * count , z_zadd_args );
955955
956956 /* Expire if needed */
957957 ra_expire_key (key , key_len , z_to , ttl );
@@ -978,7 +978,7 @@ ra_move_string(const char *key, int key_len, zval *z_from, zval *z_to, long ttl)
978978 /* run GET on source */
979979 ZVAL_STRINGL (& z_fun_get , "GET" , 3 );
980980 ZVAL_STRINGL (& z_args [0 ], key , key_len );
981- ra_call_user_function (& redis_ce -> function_table , z_from , & z_fun_get , & z_ret , 1 , z_args );
981+ call_user_function (& redis_ce -> function_table , z_from , & z_fun_get , & z_ret , 1 , z_args );
982982 zval_dtor (& z_fun_get );
983983
984984 if (Z_TYPE (z_ret ) != IS_STRING ) { /* key not found or replaced */
@@ -994,14 +994,14 @@ ra_move_string(const char *key, int key_len, zval *z_from, zval *z_to, long ttl)
994994 ZVAL_LONG (& z_args [1 ], ttl );
995995 ZVAL_STRINGL (& z_args [2 ], Z_STRVAL (z_ret ), Z_STRLEN (z_ret )); /* copy z_ret to arg 1 */
996996 zval_dtor (& z_ret ); /* free memory from our previous call */
997- ra_call_user_function (& redis_ce -> function_table , z_to , & z_fun_set , & z_ret , 3 , z_args );
997+ call_user_function (& redis_ce -> function_table , z_to , & z_fun_set , & z_ret , 3 , z_args );
998998 /* cleanup */
999999 zval_dtor (& z_args [2 ]);
10001000 } else {
10011001 ZVAL_STRINGL (& z_fun_set , "SET" , 3 );
10021002 ZVAL_STRINGL (& z_args [1 ], Z_STRVAL (z_ret ), Z_STRLEN (z_ret )); /* copy z_ret to arg 1 */
10031003 zval_dtor (& z_ret ); /* free memory from our previous return value */
1004- ra_call_user_function (& redis_ce -> function_table , z_to , & z_fun_set , & z_ret , 2 , z_args );
1004+ call_user_function (& redis_ce -> function_table , z_to , & z_fun_set , & z_ret , 2 , z_args );
10051005 /* cleanup */
10061006 zval_dtor (& z_args [1 ]);
10071007 }
@@ -1019,7 +1019,7 @@ ra_move_hash(const char *key, int key_len, zval *z_from, zval *z_to, long ttl) {
10191019 /* run HGETALL on source */
10201020 ZVAL_STRINGL (& z_args [0 ], key , key_len );
10211021 ZVAL_STRINGL (& z_fun_hgetall , "HGETALL" , 7 );
1022- ra_call_user_function (& redis_ce -> function_table , z_from , & z_fun_hgetall , & z_args [1 ], 1 , z_args );
1022+ call_user_function (& redis_ce -> function_table , z_from , & z_fun_hgetall , & z_args [1 ], 1 , z_args );
10231023 zval_dtor (& z_fun_hgetall );
10241024
10251025 if (Z_TYPE (z_args [1 ]) != IS_ARRAY ) { /* key not found or replaced */
@@ -1031,7 +1031,7 @@ ra_move_hash(const char *key, int key_len, zval *z_from, zval *z_to, long ttl) {
10311031
10321032 /* run HMSET on target */
10331033 ZVAL_STRINGL (& z_fun_hmset , "HMSET" , 5 );
1034- ra_call_user_function (& redis_ce -> function_table , z_to , & z_fun_hmset , & z_ret_dest , 2 , z_args );
1034+ call_user_function (& redis_ce -> function_table , z_to , & z_fun_hmset , & z_ret_dest , 2 , z_args );
10351035 zval_dtor (& z_fun_hmset );
10361036 zval_dtor (& z_ret_dest );
10371037
@@ -1066,7 +1066,7 @@ ra_move_collection(const char *key, int key_len, zval *z_from, zval *z_to,
10661066 ZVAL_STRING (& z_retrieve_args [i ], cmd_list [i ]);
10671067 }
10681068
1069- ra_call_user_function (& redis_ce -> function_table , z_from , & z_fun_retrieve , & z_ret , list_count , z_retrieve_args );
1069+ call_user_function (& redis_ce -> function_table , z_from , & z_fun_retrieve , & z_ret , list_count , z_retrieve_args );
10701070
10711071 /* cleanup */
10721072 zval_dtor (& z_fun_retrieve );
@@ -1098,7 +1098,7 @@ ra_move_collection(const char *key, int key_len, zval *z_from, zval *z_to,
10981098 /* Clean up our input return value */
10991099 zval_dtor (& z_ret );
11001100
1101- ra_call_user_function (& redis_ce -> function_table , z_to , & z_fun_sadd , & z_ret , count , z_sadd_args );
1101+ call_user_function (& redis_ce -> function_table , z_to , & z_fun_sadd , & z_ret , count , z_sadd_args );
11021102
11031103 /* cleanup */
11041104 zval_dtor (& z_fun_sadd );
@@ -1223,7 +1223,7 @@ ra_rehash_server(RedisArray *ra, zval *z_redis, zend_string *hostname, zend_bool
12231223 ZVAL_STRING (& z_argv , "*" );
12241224 }
12251225 ZVAL_NULL (& z_ret );
1226- ra_call_user_function (& redis_ce -> function_table , z_redis , & z_fun , & z_ret , 1 , & z_argv );
1226+ call_user_function (& redis_ce -> function_table , z_redis , & z_fun , & z_ret , 1 , & z_argv );
12271227 zval_dtor (& z_argv );
12281228 zval_dtor (& z_fun );
12291229
0 commit comments