diff options
author | Kalle Sommer Nielsen <kalle@php.net> | 2013-12-18 09:32:26 +0100 |
---|---|---|
committer | Kalle Sommer Nielsen <kalle@php.net> | 2013-12-18 09:32:26 +0100 |
commit | aed4b086acaa50318b3e91146a35a9af6f46e11d (patch) | |
tree | 90bbc596c33ee84e06d53786ec0338a91df506f6 /main/php_ticks.c | |
parent | c83598119be083b572e92af292e9e9faa98d8d85 (diff) | |
download | php-git-aed4b086acaa50318b3e91146a35a9af6f46e11d.tar.gz |
Eliminate the TSRMLS_FETCH() calls in the ticks functions and hook
Diffstat (limited to 'main/php_ticks.c')
-rw-r--r-- | main/php_ticks.c | 12 |
1 files changed, 3 insertions, 9 deletions
diff --git a/main/php_ticks.c b/main/php_ticks.c index 17ffb9c770..c65fc3246c 100644 --- a/main/php_ticks.c +++ b/main/php_ticks.c @@ -46,17 +46,13 @@ static int php_compare_tick_functions(void *elem1, void *elem2) return (func1 == func2); } -PHPAPI void php_add_tick_function(void (*func)(int)) +PHPAPI void php_add_tick_function(void (*func)(int) TSRMLS_DC) { - TSRMLS_FETCH(); - zend_llist_add_element(&PG(tick_functions), (void *)&func); } -PHPAPI void php_remove_tick_function(void (*func)(int)) +PHPAPI void php_remove_tick_function(void (*func)(int) TSRMLS_DC) { - TSRMLS_FETCH(); - zend_llist_del_element(&PG(tick_functions), (void *)func, (int(*)(void*, void*))php_compare_tick_functions); } @@ -69,10 +65,8 @@ static void php_tick_iterator(void *data, void *arg TSRMLS_DC) func(*((int *)arg)); } -void php_run_ticks(int count) +void php_run_ticks(int count TSRMLS_DC) { - TSRMLS_FETCH(); - zend_llist_apply_with_argument(&PG(tick_functions), (llist_apply_with_arg_func_t) php_tick_iterator, &count TSRMLS_CC); } |