@@ -470,7 +470,7 @@ ra_call_extractor(RedisArray *ra, const char *key, int key_len TSRMLS_DC)
470470 ZVAL_NULL (& z_ret );
471471 /* call extraction function */
472472 ZVAL_STRINGL (& z_argv , key , key_len );
473- call_user_function (EG (function_table ), NULL , & ra -> z_fun , & z_ret , 1 , & z_argv );
473+ ra_call_user_function (EG (function_table ), NULL , & ra -> z_fun , & z_ret , 1 , & z_argv TSRMLS_CC );
474474
475475 if (Z_TYPE (z_ret ) == IS_STRING ) {
476476 out = zval_get_string (& z_ret );
@@ -511,7 +511,7 @@ ra_call_distributor(RedisArray *ra, const char *key, int key_len TSRMLS_DC)
511511 ZVAL_NULL (& z_ret );
512512 /* call extraction function */
513513 ZVAL_STRINGL (& z_argv , key , key_len );
514- call_user_function (EG (function_table ), NULL , & ra -> z_dist , & z_ret , 1 , & z_argv );
514+ ra_call_user_function (EG (function_table ), NULL , & ra -> z_dist , & z_ret , 1 , & z_argv TSRMLS_CC );
515515
516516 ret = (Z_TYPE (z_ret ) == IS_LONG ) ? Z_LVAL (z_ret ) : -1 ;
517517
@@ -609,7 +609,7 @@ ra_index_multi(zval *z_redis, long multi_value TSRMLS_DC) {
609609 /* run MULTI */
610610 ZVAL_STRINGL (& z_fun_multi , "MULTI" , 5 );
611611 ZVAL_LONG (& z_args [0 ], multi_value );
612- call_user_function (& redis_ce -> function_table , z_redis , & z_fun_multi , & z_ret , 1 , z_args );
612+ ra_call_user_function (& redis_ce -> function_table , z_redis , & z_fun_multi , & z_ret , 1 , z_args TSRMLS_CC );
613613 zval_dtor (& z_fun_multi );
614614 zval_dtor (& z_ret );
615615}
@@ -639,7 +639,7 @@ ra_index_change_keys(const char *cmd, zval *z_keys, zval *z_redis TSRMLS_DC) {
639639 }
640640
641641 /* run cmd */
642- call_user_function (& redis_ce -> function_table , z_redis , & z_fun , & z_ret , argc , z_args );
642+ ra_call_user_function (& redis_ce -> function_table , z_redis , & z_fun , & z_ret , argc , z_args TSRMLS_CC );
643643
644644 zval_dtor (& z_args [0 ]);
645645 zval_dtor (& z_fun );
@@ -695,7 +695,7 @@ ra_index_key(const char *key, int key_len, zval *z_redis TSRMLS_DC) {
695695 ZVAL_STRINGL (& z_args [1 ], key , key_len );
696696
697697 /* run SADD */
698- call_user_function (& redis_ce -> function_table , z_redis , & z_fun_sadd , & z_ret , 2 , z_args );
698+ ra_call_user_function (& redis_ce -> function_table , z_redis , & z_fun_sadd , & z_ret , 2 , z_args TSRMLS_CC );
699699 zval_dtor (& z_fun_sadd );
700700 zval_dtor (& z_args [1 ]);
701701 zval_dtor (& z_args [0 ]);
@@ -709,7 +709,7 @@ ra_index_exec(zval *z_redis, zval *return_value, int keep_all TSRMLS_DC) {
709709
710710 /* run EXEC */
711711 ZVAL_STRINGL (& z_fun_exec , "EXEC" , 4 );
712- call_user_function (& redis_ce -> function_table , z_redis , & z_fun_exec , & z_ret , 0 , NULL );
712+ ra_call_user_function (& redis_ce -> function_table , z_redis , & z_fun_exec , & z_ret , 0 , NULL TSRMLS_CC );
713713 zval_dtor (& z_fun_exec );
714714
715715 /* extract first element of exec array and put into return_value. */
@@ -736,7 +736,7 @@ ra_index_discard(zval *z_redis, zval *return_value TSRMLS_DC) {
736736
737737 /* run DISCARD */
738738 ZVAL_STRINGL (& z_fun_discard , "DISCARD" , 7 );
739- call_user_function (& redis_ce -> function_table , z_redis , & z_fun_discard , & z_ret , 0 , NULL );
739+ ra_call_user_function (& redis_ce -> function_table , z_redis , & z_fun_discard , & z_ret , 0 , NULL TSRMLS_CC );
740740
741741 zval_dtor (& z_fun_discard );
742742 zval_dtor (& z_ret );
@@ -749,7 +749,7 @@ ra_index_unwatch(zval *z_redis, zval *return_value TSRMLS_DC) {
749749
750750 /* run UNWATCH */
751751 ZVAL_STRINGL (& z_fun_unwatch , "UNWATCH" , 7 );
752- call_user_function (& redis_ce -> function_table , z_redis , & z_fun_unwatch , & z_ret , 0 , NULL );
752+ ra_call_user_function (& redis_ce -> function_table , z_redis , & z_fun_unwatch , & z_ret , 0 , NULL TSRMLS_CC );
753753
754754 zval_dtor (& z_fun_unwatch );
755755 zval_dtor (& z_ret );
@@ -789,14 +789,14 @@ ra_get_key_type(zval *z_redis, const char *key, int key_len, zval *z_from, long
789789 /* run TYPE */
790790 ZVAL_NULL (& z_ret );
791791 ZVAL_STRINGL (& z_fun , "TYPE" , 4 );
792- call_user_function (& redis_ce -> function_table , z_redis , & z_fun , & z_ret , 1 , & z_arg );
792+ ra_call_user_function (& redis_ce -> function_table , z_redis , & z_fun , & z_ret , 1 , & z_arg TSRMLS_CC );
793793 zval_dtor (& z_fun );
794794 zval_dtor (& z_ret );
795795
796796 /* run TYPE */
797797 ZVAL_NULL (& z_ret );
798798 ZVAL_STRINGL (& z_fun , "TTL" , 3 );
799- call_user_function (& redis_ce -> function_table , z_redis , & z_fun , & z_ret , 1 , & z_arg );
799+ ra_call_user_function (& redis_ce -> function_table , z_redis , & z_fun , & z_ret , 1 , & z_arg TSRMLS_CC );
800800 zval_dtor (& z_fun );
801801 zval_dtor (& z_ret );
802802
@@ -828,7 +828,7 @@ ra_remove_from_index(zval *z_redis, const char *key, int key_len TSRMLS_DC) {
828828 ZVAL_STRINGL (& z_args [0 ], PHPREDIS_INDEX_NAME , sizeof (PHPREDIS_INDEX_NAME ) - 1 );
829829 ZVAL_STRINGL (& z_args [1 ], key , key_len );
830830
831- call_user_function (& redis_ce -> function_table , z_redis , & z_fun_srem , & z_ret , 2 , z_args );
831+ ra_call_user_function (& redis_ce -> function_table , z_redis , & z_fun_srem , & z_ret , 2 , z_args TSRMLS_CC );
832832
833833 /* cleanup */
834834 zval_dtor (& z_fun_srem );
@@ -850,7 +850,7 @@ ra_del_key(const char *key, int key_len, zval *z_from TSRMLS_DC) {
850850 /* run DEL on source */
851851 ZVAL_STRINGL (& z_fun_del , "DEL" , 3 );
852852 ZVAL_STRINGL (& z_args [0 ], key , key_len );
853- call_user_function (& redis_ce -> function_table , z_from , & z_fun_del , & z_ret , 1 , z_args );
853+ ra_call_user_function (& redis_ce -> function_table , z_from , & z_fun_del , & z_ret , 1 , z_args TSRMLS_CC );
854854 zval_dtor (& z_fun_del );
855855 zval_dtor (& z_args [0 ]);
856856 zval_dtor (& z_ret );
@@ -875,7 +875,7 @@ ra_expire_key(const char *key, int key_len, zval *z_to, long ttl TSRMLS_DC) {
875875 ZVAL_STRINGL (& z_fun_expire , "EXPIRE" , 6 );
876876 ZVAL_STRINGL (& z_args [0 ], key , key_len );
877877 ZVAL_LONG (& z_args [1 ], ttl );
878- call_user_function (& redis_ce -> function_table , z_to , & z_fun_expire , & z_ret , 2 , z_args );
878+ ra_call_user_function (& redis_ce -> function_table , z_to , & z_fun_expire , & z_ret , 2 , z_args TSRMLS_CC );
879879 zval_dtor (& z_fun_expire );
880880 zval_dtor (& z_args [0 ]);
881881 zval_dtor (& z_ret );
@@ -899,7 +899,7 @@ ra_move_zset(const char *key, int key_len, zval *z_from, zval *z_to, long ttl TS
899899 ZVAL_STRINGL (& z_args [1 ], "0" , 1 );
900900 ZVAL_STRINGL (& z_args [2 ], "-1" , 2 );
901901 ZVAL_BOOL (& z_args [3 ], 1 );
902- call_user_function (& redis_ce -> function_table , z_from , & z_fun_zrange , & z_ret , 4 , z_args );
902+ ra_call_user_function (& redis_ce -> function_table , z_from , & z_fun_zrange , & z_ret , 4 , z_args TSRMLS_CC );
903903 zval_dtor (& z_fun_zrange );
904904 zval_dtor (& z_args [2 ]);
905905 zval_dtor (& z_args [1 ]);
@@ -937,7 +937,7 @@ ra_move_zset(const char *key, int key_len, zval *z_from, zval *z_to, long ttl TS
937937
938938 /* run ZADD on target */
939939 ZVAL_STRINGL (& z_fun_zadd , "ZADD" , 4 );
940- call_user_function (& redis_ce -> function_table , z_to , & z_fun_zadd , & z_ret_dest , 1 + 2 * count , z_zadd_args );
940+ ra_call_user_function (& redis_ce -> function_table , z_to , & z_fun_zadd , & z_ret_dest , 1 + 2 * count , z_zadd_args TSRMLS_CC );
941941
942942 /* Expire if needed */
943943 ra_expire_key (key , key_len , z_to , ttl TSRMLS_CC );
@@ -964,7 +964,7 @@ ra_move_string(const char *key, int key_len, zval *z_from, zval *z_to, long ttl
964964 /* run GET on source */
965965 ZVAL_STRINGL (& z_fun_get , "GET" , 3 );
966966 ZVAL_STRINGL (& z_args [0 ], key , key_len );
967- call_user_function (& redis_ce -> function_table , z_from , & z_fun_get , & z_ret , 1 , z_args );
967+ ra_call_user_function (& redis_ce -> function_table , z_from , & z_fun_get , & z_ret , 1 , z_args TSRMLS_CC );
968968 zval_dtor (& z_fun_get );
969969
970970 if (Z_TYPE (z_ret ) != IS_STRING ) { /* key not found or replaced */
@@ -980,14 +980,14 @@ ra_move_string(const char *key, int key_len, zval *z_from, zval *z_to, long ttl
980980 ZVAL_LONG (& z_args [1 ], ttl );
981981 ZVAL_STRINGL (& z_args [2 ], Z_STRVAL (z_ret ), Z_STRLEN (z_ret )); /* copy z_ret to arg 1 */
982982 zval_dtor (& z_ret ); /* free memory from our previous call */
983- call_user_function (& redis_ce -> function_table , z_to , & z_fun_set , & z_ret , 3 , z_args );
983+ ra_call_user_function (& redis_ce -> function_table , z_to , & z_fun_set , & z_ret , 3 , z_args TSRMLS_CC );
984984 /* cleanup */
985985 zval_dtor (& z_args [2 ]);
986986 } else {
987987 ZVAL_STRINGL (& z_fun_set , "SET" , 3 );
988988 ZVAL_STRINGL (& z_args [1 ], Z_STRVAL (z_ret ), Z_STRLEN (z_ret )); /* copy z_ret to arg 1 */
989989 zval_dtor (& z_ret ); /* free memory from our previous return value */
990- call_user_function (& redis_ce -> function_table , z_to , & z_fun_set , & z_ret , 2 , z_args );
990+ ra_call_user_function (& redis_ce -> function_table , z_to , & z_fun_set , & z_ret , 2 , z_args TSRMLS_CC );
991991 /* cleanup */
992992 zval_dtor (& z_args [1 ]);
993993 }
@@ -1005,7 +1005,7 @@ ra_move_hash(const char *key, int key_len, zval *z_from, zval *z_to, long ttl TS
10051005 /* run HGETALL on source */
10061006 ZVAL_STRINGL (& z_args [0 ], key , key_len );
10071007 ZVAL_STRINGL (& z_fun_hgetall , "HGETALL" , 7 );
1008- call_user_function (& redis_ce -> function_table , z_from , & z_fun_hgetall , & z_args [1 ], 1 , z_args );
1008+ ra_call_user_function (& redis_ce -> function_table , z_from , & z_fun_hgetall , & z_args [1 ], 1 , z_args TSRMLS_CC );
10091009 zval_dtor (& z_fun_hgetall );
10101010
10111011 if (Z_TYPE (z_args [1 ]) != IS_ARRAY ) { /* key not found or replaced */
@@ -1017,7 +1017,7 @@ ra_move_hash(const char *key, int key_len, zval *z_from, zval *z_to, long ttl TS
10171017
10181018 /* run HMSET on target */
10191019 ZVAL_STRINGL (& z_fun_hmset , "HMSET" , 5 );
1020- call_user_function (& redis_ce -> function_table , z_to , & z_fun_hmset , & z_ret_dest , 2 , z_args );
1020+ ra_call_user_function (& redis_ce -> function_table , z_to , & z_fun_hmset , & z_ret_dest , 2 , z_args TSRMLS_CC );
10211021 zval_dtor (& z_fun_hmset );
10221022 zval_dtor (& z_ret_dest );
10231023
@@ -1052,7 +1052,7 @@ ra_move_collection(const char *key, int key_len, zval *z_from, zval *z_to,
10521052 ZVAL_STRING (& z_retrieve_args [i ], cmd_list [i ]);
10531053 }
10541054
1055- call_user_function (& redis_ce -> function_table , z_from , & z_fun_retrieve , & z_ret , list_count , z_retrieve_args );
1055+ ra_call_user_function (& redis_ce -> function_table , z_from , & z_fun_retrieve , & z_ret , list_count , z_retrieve_args TSRMLS_CC );
10561056
10571057 /* cleanup */
10581058 zval_dtor (& z_fun_retrieve );
@@ -1084,7 +1084,7 @@ ra_move_collection(const char *key, int key_len, zval *z_from, zval *z_to,
10841084 /* Clean up our input return value */
10851085 zval_dtor (& z_ret );
10861086
1087- call_user_function (& redis_ce -> function_table , z_to , & z_fun_sadd , & z_ret , count , z_sadd_args );
1087+ ra_call_user_function (& redis_ce -> function_table , z_to , & z_fun_sadd , & z_ret , count , z_sadd_args TSRMLS_CC );
10881088
10891089 /* cleanup */
10901090 zval_dtor (& z_fun_sadd );
@@ -1209,7 +1209,7 @@ ra_rehash_server(RedisArray *ra, zval *z_redis, zend_string *hostname, zend_bool
12091209 ZVAL_STRING (& z_argv , "*" );
12101210 }
12111211 ZVAL_NULL (& z_ret );
1212- call_user_function (& redis_ce -> function_table , z_redis , & z_fun , & z_ret , 1 , & z_argv );
1212+ ra_call_user_function (& redis_ce -> function_table , z_redis , & z_fun , & z_ret , 1 , & z_argv TSRMLS_CC );
12131213 zval_dtor (& z_argv );
12141214 zval_dtor (& z_fun );
12151215
0 commit comments