@@ -78,7 +78,7 @@ ra_load_hosts(RedisArray *ra, HashTable *hosts, zend_string *auth, long retry_in
78
78
if (!b_lazy_connect )
79
79
{
80
80
/* 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 ) {
82
82
zval_dtor (& z_cons );
83
83
ra -> count = ++ i ;
84
84
return NULL ;
@@ -484,7 +484,7 @@ ra_call_extractor(RedisArray *ra, const char *key, int key_len)
484
484
ZVAL_NULL (& z_ret );
485
485
/* call extraction function */
486
486
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 );
488
488
489
489
if (Z_TYPE (z_ret ) == IS_STRING ) {
490
490
out = zval_get_string (& z_ret );
@@ -525,7 +525,7 @@ ra_call_distributor(RedisArray *ra, const char *key, int key_len)
525
525
ZVAL_NULL (& z_ret );
526
526
/* call extraction function */
527
527
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 );
529
529
530
530
ret = (Z_TYPE (z_ret ) == IS_LONG ) ? Z_LVAL (z_ret ) : -1 ;
531
531
@@ -623,7 +623,7 @@ ra_index_multi(zval *z_redis, long multi_value) {
623
623
/* run MULTI */
624
624
ZVAL_STRINGL (& z_fun_multi , "MULTI" , 5 );
625
625
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 );
627
627
zval_dtor (& z_fun_multi );
628
628
zval_dtor (& z_ret );
629
629
}
@@ -653,7 +653,7 @@ ra_index_change_keys(const char *cmd, zval *z_keys, zval *z_redis) {
653
653
}
654
654
655
655
/* 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 );
657
657
658
658
zval_dtor (& z_args [0 ]);
659
659
zval_dtor (& z_fun );
@@ -709,7 +709,7 @@ ra_index_key(const char *key, int key_len, zval *z_redis) {
709
709
ZVAL_STRINGL (& z_args [1 ], key , key_len );
710
710
711
711
/* 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 );
713
713
zval_dtor (& z_fun_sadd );
714
714
zval_dtor (& z_args [1 ]);
715
715
zval_dtor (& z_args [0 ]);
@@ -723,7 +723,7 @@ ra_index_exec(zval *z_redis, zval *return_value, int keep_all) {
723
723
724
724
/* run EXEC */
725
725
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 );
727
727
zval_dtor (& z_fun_exec );
728
728
729
729
/* extract first element of exec array and put into return_value. */
@@ -750,7 +750,7 @@ ra_index_discard(zval *z_redis, zval *return_value) {
750
750
751
751
/* run DISCARD */
752
752
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 );
754
754
755
755
zval_dtor (& z_fun_discard );
756
756
zval_dtor (& z_ret );
@@ -763,7 +763,7 @@ ra_index_unwatch(zval *z_redis, zval *return_value) {
763
763
764
764
/* run UNWATCH */
765
765
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 );
767
767
768
768
zval_dtor (& z_fun_unwatch );
769
769
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
803
803
/* run TYPE */
804
804
ZVAL_NULL (& z_ret );
805
805
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 );
807
807
zval_dtor (& z_fun );
808
808
zval_dtor (& z_ret );
809
809
810
810
/* run TYPE */
811
811
ZVAL_NULL (& z_ret );
812
812
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 );
814
814
zval_dtor (& z_fun );
815
815
zval_dtor (& z_ret );
816
816
@@ -842,7 +842,7 @@ ra_remove_from_index(zval *z_redis, const char *key, int key_len) {
842
842
ZVAL_STRINGL (& z_args [0 ], PHPREDIS_INDEX_NAME , sizeof (PHPREDIS_INDEX_NAME ) - 1 );
843
843
ZVAL_STRINGL (& z_args [1 ], key , key_len );
844
844
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 );
846
846
847
847
/* cleanup */
848
848
zval_dtor (& z_fun_srem );
@@ -864,7 +864,7 @@ ra_del_key(const char *key, int key_len, zval *z_from) {
864
864
/* run DEL on source */
865
865
ZVAL_STRINGL (& z_fun_del , "DEL" , 3 );
866
866
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 );
868
868
zval_dtor (& z_fun_del );
869
869
zval_dtor (& z_args [0 ]);
870
870
zval_dtor (& z_ret );
@@ -889,7 +889,7 @@ ra_expire_key(const char *key, int key_len, zval *z_to, long ttl) {
889
889
ZVAL_STRINGL (& z_fun_expire , "EXPIRE" , 6 );
890
890
ZVAL_STRINGL (& z_args [0 ], key , key_len );
891
891
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 );
893
893
zval_dtor (& z_fun_expire );
894
894
zval_dtor (& z_args [0 ]);
895
895
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) {
913
913
ZVAL_STRINGL (& z_args [1 ], "0" , 1 );
914
914
ZVAL_STRINGL (& z_args [2 ], "-1" , 2 );
915
915
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 );
917
917
zval_dtor (& z_fun_zrange );
918
918
zval_dtor (& z_args [2 ]);
919
919
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) {
951
951
952
952
/* run ZADD on target */
953
953
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 );
955
955
956
956
/* Expire if needed */
957
957
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)
978
978
/* run GET on source */
979
979
ZVAL_STRINGL (& z_fun_get , "GET" , 3 );
980
980
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 );
982
982
zval_dtor (& z_fun_get );
983
983
984
984
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)
994
994
ZVAL_LONG (& z_args [1 ], ttl );
995
995
ZVAL_STRINGL (& z_args [2 ], Z_STRVAL (z_ret ), Z_STRLEN (z_ret )); /* copy z_ret to arg 1 */
996
996
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 );
998
998
/* cleanup */
999
999
zval_dtor (& z_args [2 ]);
1000
1000
} else {
1001
1001
ZVAL_STRINGL (& z_fun_set , "SET" , 3 );
1002
1002
ZVAL_STRINGL (& z_args [1 ], Z_STRVAL (z_ret ), Z_STRLEN (z_ret )); /* copy z_ret to arg 1 */
1003
1003
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 );
1005
1005
/* cleanup */
1006
1006
zval_dtor (& z_args [1 ]);
1007
1007
}
@@ -1019,7 +1019,7 @@ ra_move_hash(const char *key, int key_len, zval *z_from, zval *z_to, long ttl) {
1019
1019
/* run HGETALL on source */
1020
1020
ZVAL_STRINGL (& z_args [0 ], key , key_len );
1021
1021
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 );
1023
1023
zval_dtor (& z_fun_hgetall );
1024
1024
1025
1025
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) {
1031
1031
1032
1032
/* run HMSET on target */
1033
1033
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 );
1035
1035
zval_dtor (& z_fun_hmset );
1036
1036
zval_dtor (& z_ret_dest );
1037
1037
@@ -1066,7 +1066,7 @@ ra_move_collection(const char *key, int key_len, zval *z_from, zval *z_to,
1066
1066
ZVAL_STRING (& z_retrieve_args [i ], cmd_list [i ]);
1067
1067
}
1068
1068
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 );
1070
1070
1071
1071
/* cleanup */
1072
1072
zval_dtor (& z_fun_retrieve );
@@ -1098,7 +1098,7 @@ ra_move_collection(const char *key, int key_len, zval *z_from, zval *z_to,
1098
1098
/* Clean up our input return value */
1099
1099
zval_dtor (& z_ret );
1100
1100
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 );
1102
1102
1103
1103
/* cleanup */
1104
1104
zval_dtor (& z_fun_sadd );
@@ -1223,7 +1223,7 @@ ra_rehash_server(RedisArray *ra, zval *z_redis, zend_string *hostname, zend_bool
1223
1223
ZVAL_STRING (& z_argv , "*" );
1224
1224
}
1225
1225
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 );
1227
1227
zval_dtor (& z_argv );
1228
1228
zval_dtor (& z_fun );
1229
1229
0 commit comments