@@ -220,21 +220,6 @@ redis_array_get(zval *id)
220220 return NULL ;
221221}
222222
223- PHP_REDIS_API int
224- ra_call_user_function (HashTable * function_table , zval * object , zval * function_name , zval * retval_ptr , uint32_t param_count , zval params [])
225- {
226- if (object ) {
227- redis_object * redis = PHPREDIS_ZVAL_GET_OBJECT (redis_object , object );
228- if (redis -> sock -> auth &&
229- redis -> sock -> status != REDIS_SOCK_STATUS_CONNECTED &&
230- redis_sock_server_open (redis -> sock ) == SUCCESS
231- ) {
232- redis_sock_auth (redis -> sock );
233- }
234- }
235- return call_user_function (function_table , object , function_name , retval_ptr , param_count , params );
236- }
237-
238223/* {{{ proto RedisArray RedisArray::__construct()
239224 Public constructor */
240225PHP_METHOD (RedisArray , __construct )
@@ -417,7 +402,7 @@ ra_forward_call(INTERNAL_FUNCTION_PARAMETERS, RedisArray *ra, const char *cmd, i
417402
418403 /* multi/exec */
419404 if (ra -> z_multi_exec ) {
420- ra_call_user_function (& redis_ce -> function_table , ra -> z_multi_exec , & z_fun , return_value , argc , z_callargs );
405+ call_user_function (& redis_ce -> function_table , ra -> z_multi_exec , & z_fun , return_value , argc , z_callargs );
421406 zval_dtor (return_value );
422407 zval_dtor (& z_fun );
423408 for (i = 0 ; i < argc ; ++ i ) {
@@ -435,7 +420,7 @@ ra_forward_call(INTERNAL_FUNCTION_PARAMETERS, RedisArray *ra, const char *cmd, i
435420 /* add MULTI + SADD */
436421 ra_index_multi (redis_inst , MULTI );
437422 /* call using discarded temp value and extract exec results after. */
438- ra_call_user_function (& redis_ce -> function_table , redis_inst , & z_fun , return_value , argc , z_callargs );
423+ call_user_function (& redis_ce -> function_table , redis_inst , & z_fun , return_value , argc , z_callargs );
439424 zval_dtor (return_value );
440425
441426 /* add keys to index. */
@@ -444,7 +429,7 @@ ra_forward_call(INTERNAL_FUNCTION_PARAMETERS, RedisArray *ra, const char *cmd, i
444429 /* call EXEC */
445430 ra_index_exec (redis_inst , return_value , 0 );
446431 } else { /* call directly through. */
447- ra_call_user_function (& redis_ce -> function_table , redis_inst , & z_fun , return_value , argc , z_callargs );
432+ call_user_function (& redis_ce -> function_table , redis_inst , & z_fun , return_value , argc , z_callargs );
448433
449434 if (!b_write_cmd ) {
450435 /* check if we have an error. */
@@ -662,7 +647,7 @@ multihost_distribute_call(RedisArray *ra, zval *return_value, zval *z_fun, int a
662647 /* Iterate our RedisArray nodes */
663648 for (i = 0 ; i < ra -> count ; ++ i ) {
664649 /* Call each node in turn */
665- ra_call_user_function (& redis_array_ce -> function_table , & ra -> redis [i ], z_fun , & z_tmp , argc , argv );
650+ call_user_function (& redis_array_ce -> function_table , & ra -> redis [i ], z_fun , & z_tmp , argc , argv );
666651
667652 /* Add the result for this host */
668653 add_assoc_zval_ex (return_value , ZSTR_VAL (ra -> hosts [i ]), ZSTR_LEN (ra -> hosts [i ]), & z_tmp );
@@ -975,7 +960,7 @@ PHP_METHOD(RedisArray, mget)
975960 /* prepare call */
976961 ZVAL_STRINGL (& z_fun , "MGET" , 4 );
977962 /* call MGET on the node */
978- ra_call_user_function (& redis_ce -> function_table , & ra -> redis [n ], & z_fun , & z_ret , 1 , & z_argarray );
963+ call_user_function (& redis_ce -> function_table , & ra -> redis [n ], & z_fun , & z_ret , 1 , & z_argarray );
979964 zval_dtor (& z_fun );
980965
981966 /* cleanup args array */
@@ -1119,7 +1104,7 @@ PHP_METHOD(RedisArray, mset)
11191104 ZVAL_STRINGL (& z_fun , "MSET" , 4 );
11201105
11211106 /* call */
1122- ra_call_user_function (& redis_ce -> function_table , & ra -> redis [n ], & z_fun , & z_ret , 1 , & z_argarray );
1107+ call_user_function (& redis_ce -> function_table , & ra -> redis [n ], & z_fun , & z_ret , 1 , & z_argarray );
11231108 zval_dtor (& z_fun );
11241109 zval_dtor (& z_ret );
11251110
@@ -1251,7 +1236,7 @@ static void ra_generic_del(INTERNAL_FUNCTION_PARAMETERS, char *kw, int kw_len) {
12511236 }
12521237
12531238 /* call */
1254- ra_call_user_function (& redis_ce -> function_table , & ra -> redis [n ], & z_fun , & z_ret , 1 , & z_argarray );
1239+ call_user_function (& redis_ce -> function_table , & ra -> redis [n ], & z_fun , & z_ret , 1 , & z_argarray );
12551240
12561241 if (ra -> index ) {
12571242 zval_dtor (& z_ret );
0 commit comments