@@ -493,7 +493,7 @@ ra_call_extractor(RedisArray *ra, const char *key, int key_len TSRMLS_DC)
493493 ZVAL_NULL (& z_ret );
494494 /* call extraction function */
495495 ZVAL_STRINGL (& z_argv , key , key_len );
496- call_user_function (EG (function_table ), NULL , & ra -> z_fun , & z_ret , 1 , & z_argv );
496+ ra_call_user_function (EG (function_table ), NULL , & ra -> z_fun , & z_ret , 1 , & z_argv TSRMLS_CC );
497497
498498 if (Z_TYPE (z_ret ) == IS_STRING ) {
499499#if (PHP_MAJOR_VERSION < 7 )
@@ -542,7 +542,7 @@ ra_call_distributor(RedisArray *ra, const char *key, int key_len TSRMLS_DC)
542542 ZVAL_NULL (& z_ret );
543543 /* call extraction function */
544544 ZVAL_STRINGL (& z_argv , key , key_len );
545- call_user_function (EG (function_table ), NULL , & ra -> z_dist , & z_ret , 1 , & z_argv );
545+ ra_call_user_function (EG (function_table ), NULL , & ra -> z_dist , & z_ret , 1 , & z_argv TSRMLS_CC );
546546
547547 ret = (Z_TYPE (z_ret ) == IS_LONG ) ? Z_LVAL (z_ret ) : -1 ;
548548
@@ -640,7 +640,7 @@ ra_index_multi(zval *z_redis, long multi_value TSRMLS_DC) {
640640 /* run MULTI */
641641 ZVAL_STRINGL (& z_fun_multi , "MULTI" , 5 );
642642 ZVAL_LONG (& z_args [0 ], multi_value );
643- call_user_function (& redis_ce -> function_table , z_redis , & z_fun_multi , & z_ret , 1 , z_args );
643+ ra_call_user_function (& redis_ce -> function_table , z_redis , & z_fun_multi , & z_ret , 1 , z_args TSRMLS_CC );
644644 zval_dtor (& z_fun_multi );
645645 zval_dtor (& z_ret );
646646}
@@ -670,7 +670,7 @@ ra_index_change_keys(const char *cmd, zval *z_keys, zval *z_redis TSRMLS_DC) {
670670 }
671671
672672 /* run cmd */
673- call_user_function (& redis_ce -> function_table , z_redis , & z_fun , & z_ret , argc , z_args );
673+ ra_call_user_function (& redis_ce -> function_table , z_redis , & z_fun , & z_ret , argc , z_args TSRMLS_CC );
674674
675675 zval_dtor (& z_args [0 ]);
676676 zval_dtor (& z_fun );
@@ -731,7 +731,7 @@ ra_index_key(const char *key, int key_len, zval *z_redis TSRMLS_DC) {
731731 ZVAL_STRINGL (& z_args [1 ], key , key_len );
732732
733733 /* run SADD */
734- call_user_function (& redis_ce -> function_table , z_redis , & z_fun_sadd , & z_ret , 2 , z_args );
734+ ra_call_user_function (& redis_ce -> function_table , z_redis , & z_fun_sadd , & z_ret , 2 , z_args TSRMLS_CC );
735735 zval_dtor (& z_fun_sadd );
736736 zval_dtor (& z_args [1 ]);
737737 zval_dtor (& z_args [0 ]);
@@ -745,7 +745,7 @@ ra_index_exec(zval *z_redis, zval *return_value, int keep_all TSRMLS_DC) {
745745
746746 /* run EXEC */
747747 ZVAL_STRINGL (& z_fun_exec , "EXEC" , 4 );
748- call_user_function (& redis_ce -> function_table , z_redis , & z_fun_exec , & z_ret , 0 , NULL );
748+ ra_call_user_function (& redis_ce -> function_table , z_redis , & z_fun_exec , & z_ret , 0 , NULL TSRMLS_CC );
749749 zval_dtor (& z_fun_exec );
750750
751751 /* extract first element of exec array and put into return_value. */
@@ -772,7 +772,7 @@ ra_index_discard(zval *z_redis, zval *return_value TSRMLS_DC) {
772772
773773 /* run DISCARD */
774774 ZVAL_STRINGL (& z_fun_discard , "DISCARD" , 7 );
775- call_user_function (& redis_ce -> function_table , z_redis , & z_fun_discard , & z_ret , 0 , NULL );
775+ ra_call_user_function (& redis_ce -> function_table , z_redis , & z_fun_discard , & z_ret , 0 , NULL TSRMLS_CC );
776776
777777 zval_dtor (& z_fun_discard );
778778 zval_dtor (& z_ret );
@@ -785,7 +785,7 @@ ra_index_unwatch(zval *z_redis, zval *return_value TSRMLS_DC) {
785785
786786 /* run UNWATCH */
787787 ZVAL_STRINGL (& z_fun_unwatch , "UNWATCH" , 7 );
788- call_user_function (& redis_ce -> function_table , z_redis , & z_fun_unwatch , & z_ret , 0 , NULL );
788+ ra_call_user_function (& redis_ce -> function_table , z_redis , & z_fun_unwatch , & z_ret , 0 , NULL TSRMLS_CC );
789789
790790 zval_dtor (& z_fun_unwatch );
791791 zval_dtor (& z_ret );
@@ -825,14 +825,14 @@ ra_get_key_type(zval *z_redis, const char *key, int key_len, zval *z_from, long
825825 /* run TYPE */
826826 ZVAL_NULL (& z_ret );
827827 ZVAL_STRINGL (& z_fun , "TYPE" , 4 );
828- call_user_function (& redis_ce -> function_table , z_redis , & z_fun , & z_ret , 1 , & z_arg );
828+ ra_call_user_function (& redis_ce -> function_table , z_redis , & z_fun , & z_ret , 1 , & z_arg TSRMLS_CC );
829829 zval_dtor (& z_fun );
830830 zval_dtor (& z_ret );
831831
832832 /* run TYPE */
833833 ZVAL_NULL (& z_ret );
834834 ZVAL_STRINGL (& z_fun , "TTL" , 3 );
835- call_user_function (& redis_ce -> function_table , z_redis , & z_fun , & z_ret , 1 , & z_arg );
835+ ra_call_user_function (& redis_ce -> function_table , z_redis , & z_fun , & z_ret , 1 , & z_arg TSRMLS_CC );
836836 zval_dtor (& z_fun );
837837 zval_dtor (& z_ret );
838838
@@ -864,7 +864,7 @@ ra_remove_from_index(zval *z_redis, const char *key, int key_len TSRMLS_DC) {
864864 ZVAL_STRINGL (& z_args [0 ], PHPREDIS_INDEX_NAME , sizeof (PHPREDIS_INDEX_NAME ) - 1 );
865865 ZVAL_STRINGL (& z_args [1 ], key , key_len );
866866
867- call_user_function (& redis_ce -> function_table , z_redis , & z_fun_srem , & z_ret , 2 , z_args );
867+ ra_call_user_function (& redis_ce -> function_table , z_redis , & z_fun_srem , & z_ret , 2 , z_args TSRMLS_CC );
868868
869869 /* cleanup */
870870 zval_dtor (& z_fun_srem );
@@ -886,7 +886,7 @@ ra_del_key(const char *key, int key_len, zval *z_from TSRMLS_DC) {
886886 /* run DEL on source */
887887 ZVAL_STRINGL (& z_fun_del , "DEL" , 3 );
888888 ZVAL_STRINGL (& z_args [0 ], key , key_len );
889- call_user_function (& redis_ce -> function_table , z_from , & z_fun_del , & z_ret , 1 , z_args );
889+ ra_call_user_function (& redis_ce -> function_table , z_from , & z_fun_del , & z_ret , 1 , z_args TSRMLS_CC );
890890 zval_dtor (& z_fun_del );
891891 zval_dtor (& z_args [0 ]);
892892 zval_dtor (& z_ret );
@@ -911,7 +911,7 @@ ra_expire_key(const char *key, int key_len, zval *z_to, long ttl TSRMLS_DC) {
911911 ZVAL_STRINGL (& z_fun_expire , "EXPIRE" , 6 );
912912 ZVAL_STRINGL (& z_args [0 ], key , key_len );
913913 ZVAL_LONG (& z_args [1 ], ttl );
914- call_user_function (& redis_ce -> function_table , z_to , & z_fun_expire , & z_ret , 2 , z_args );
914+ ra_call_user_function (& redis_ce -> function_table , z_to , & z_fun_expire , & z_ret , 2 , z_args TSRMLS_CC );
915915 zval_dtor (& z_fun_expire );
916916 zval_dtor (& z_args [0 ]);
917917 zval_dtor (& z_ret );
@@ -935,7 +935,7 @@ ra_move_zset(const char *key, int key_len, zval *z_from, zval *z_to, long ttl TS
935935 ZVAL_STRINGL (& z_args [1 ], "0" , 1 );
936936 ZVAL_STRINGL (& z_args [2 ], "-1" , 2 );
937937 ZVAL_BOOL (& z_args [3 ], 1 );
938- call_user_function (& redis_ce -> function_table , z_from , & z_fun_zrange , & z_ret , 4 , z_args );
938+ ra_call_user_function (& redis_ce -> function_table , z_from , & z_fun_zrange , & z_ret , 4 , z_args TSRMLS_CC );
939939 zval_dtor (& z_fun_zrange );
940940 zval_dtor (& z_args [2 ]);
941941 zval_dtor (& z_args [1 ]);
@@ -973,7 +973,7 @@ ra_move_zset(const char *key, int key_len, zval *z_from, zval *z_to, long ttl TS
973973
974974 /* run ZADD on target */
975975 ZVAL_STRINGL (& z_fun_zadd , "ZADD" , 4 );
976- call_user_function (& redis_ce -> function_table , z_to , & z_fun_zadd , & z_ret_dest , 1 + 2 * count , z_zadd_args );
976+ ra_call_user_function (& redis_ce -> function_table , z_to , & z_fun_zadd , & z_ret_dest , 1 + 2 * count , z_zadd_args TSRMLS_CC );
977977
978978 /* Expire if needed */
979979 ra_expire_key (key , key_len , z_to , ttl TSRMLS_CC );
@@ -1000,7 +1000,7 @@ ra_move_string(const char *key, int key_len, zval *z_from, zval *z_to, long ttl
10001000 /* run GET on source */
10011001 ZVAL_STRINGL (& z_fun_get , "GET" , 3 );
10021002 ZVAL_STRINGL (& z_args [0 ], key , key_len );
1003- call_user_function (& redis_ce -> function_table , z_from , & z_fun_get , & z_ret , 1 , z_args );
1003+ ra_call_user_function (& redis_ce -> function_table , z_from , & z_fun_get , & z_ret , 1 , z_args TSRMLS_CC );
10041004 zval_dtor (& z_fun_get );
10051005
10061006 if (Z_TYPE (z_ret ) != IS_STRING ) { /* key not found or replaced */
@@ -1016,14 +1016,14 @@ ra_move_string(const char *key, int key_len, zval *z_from, zval *z_to, long ttl
10161016 ZVAL_LONG (& z_args [1 ], ttl );
10171017 ZVAL_STRINGL (& z_args [2 ], Z_STRVAL (z_ret ), Z_STRLEN (z_ret )); /* copy z_ret to arg 1 */
10181018 zval_dtor (& z_ret ); /* free memory from our previous call */
1019- call_user_function (& redis_ce -> function_table , z_to , & z_fun_set , & z_ret , 3 , z_args );
1019+ ra_call_user_function (& redis_ce -> function_table , z_to , & z_fun_set , & z_ret , 3 , z_args TSRMLS_CC );
10201020 /* cleanup */
10211021 zval_dtor (& z_args [2 ]);
10221022 } else {
10231023 ZVAL_STRINGL (& z_fun_set , "SET" , 3 );
10241024 ZVAL_STRINGL (& z_args [1 ], Z_STRVAL (z_ret ), Z_STRLEN (z_ret )); /* copy z_ret to arg 1 */
10251025 zval_dtor (& z_ret ); /* free memory from our previous return value */
1026- call_user_function (& redis_ce -> function_table , z_to , & z_fun_set , & z_ret , 2 , z_args );
1026+ ra_call_user_function (& redis_ce -> function_table , z_to , & z_fun_set , & z_ret , 2 , z_args TSRMLS_CC );
10271027 /* cleanup */
10281028 zval_dtor (& z_args [1 ]);
10291029 }
@@ -1041,7 +1041,7 @@ ra_move_hash(const char *key, int key_len, zval *z_from, zval *z_to, long ttl TS
10411041 /* run HGETALL on source */
10421042 ZVAL_STRINGL (& z_args [0 ], key , key_len );
10431043 ZVAL_STRINGL (& z_fun_hgetall , "HGETALL" , 7 );
1044- call_user_function (& redis_ce -> function_table , z_from , & z_fun_hgetall , & z_args [1 ], 1 , z_args );
1044+ ra_call_user_function (& redis_ce -> function_table , z_from , & z_fun_hgetall , & z_args [1 ], 1 , z_args TSRMLS_CC );
10451045 zval_dtor (& z_fun_hgetall );
10461046
10471047 if (Z_TYPE (z_args [1 ]) != IS_ARRAY ) { /* key not found or replaced */
@@ -1053,7 +1053,7 @@ ra_move_hash(const char *key, int key_len, zval *z_from, zval *z_to, long ttl TS
10531053
10541054 /* run HMSET on target */
10551055 ZVAL_STRINGL (& z_fun_hmset , "HMSET" , 5 );
1056- call_user_function (& redis_ce -> function_table , z_to , & z_fun_hmset , & z_ret_dest , 2 , z_args );
1056+ ra_call_user_function (& redis_ce -> function_table , z_to , & z_fun_hmset , & z_ret_dest , 2 , z_args TSRMLS_CC );
10571057 zval_dtor (& z_fun_hmset );
10581058 zval_dtor (& z_ret_dest );
10591059
@@ -1088,7 +1088,7 @@ ra_move_collection(const char *key, int key_len, zval *z_from, zval *z_to,
10881088 ZVAL_STRING (& z_retrieve_args [i ], cmd_list [i ]);
10891089 }
10901090
1091- call_user_function (& redis_ce -> function_table , z_from , & z_fun_retrieve , & z_ret , list_count , z_retrieve_args );
1091+ ra_call_user_function (& redis_ce -> function_table , z_from , & z_fun_retrieve , & z_ret , list_count , z_retrieve_args TSRMLS_CC );
10921092
10931093 /* cleanup */
10941094 zval_dtor (& z_fun_retrieve );
@@ -1120,7 +1120,7 @@ ra_move_collection(const char *key, int key_len, zval *z_from, zval *z_to,
11201120 /* Clean up our input return value */
11211121 zval_dtor (& z_ret );
11221122
1123- call_user_function (& redis_ce -> function_table , z_to , & z_fun_sadd , & z_ret , count , z_sadd_args );
1123+ ra_call_user_function (& redis_ce -> function_table , z_to , & z_fun_sadd , & z_ret , count , z_sadd_args TSRMLS_CC );
11241124
11251125 /* cleanup */
11261126 zval_dtor (& z_fun_sadd );
@@ -1263,7 +1263,7 @@ ra_rehash_server(RedisArray *ra, zval *z_redis, zend_string *hostname, zend_bool
12631263 ZVAL_STRING (& z_argv , "*" );
12641264 }
12651265 ZVAL_NULL (& z_ret );
1266- call_user_function (& redis_ce -> function_table , z_redis , & z_fun , & z_ret , 1 , & z_argv );
1266+ ra_call_user_function (& redis_ce -> function_table , z_redis , & z_fun , & z_ret , 1 , & z_argv TSRMLS_CC );
12671267 zval_dtor (& z_argv );
12681268 zval_dtor (& z_fun );
12691269
0 commit comments