summaryrefslogtreecommitdiff
path: root/ext/pspell
diff options
context:
space:
mode:
authorAnatol Belski <ab@php.net>2014-12-13 23:06:14 +0100
committerAnatol Belski <ab@php.net>2014-12-13 23:06:14 +0100
commitbdeb220f48825642f84cdbf3ff23a30613c92e86 (patch)
tree1a6cf34d20420e4815b4becb21311a4457d84103 /ext/pspell
parentbb66f385d09e7e55390e9f57fcbca08f6b43ff91 (diff)
downloadphp-git-bdeb220f48825642f84cdbf3ff23a30613c92e86.tar.gz
first shot remove TSRMLS_* things
Diffstat (limited to 'ext/pspell')
-rw-r--r--ext/pspell/pspell.c74
1 files changed, 37 insertions, 37 deletions
diff --git a/ext/pspell/pspell.c b/ext/pspell/pspell.c
index 72165ae78e..d9fad750fb 100644
--- a/ext/pspell/pspell.c
+++ b/ext/pspell/pspell.c
@@ -213,14 +213,14 @@ zend_module_entry pspell_module_entry = {
ZEND_GET_MODULE(pspell)
#endif
-static void php_pspell_close(zend_resource *rsrc TSRMLS_DC)
+static void php_pspell_close(zend_resource *rsrc)
{
PspellManager *manager = (PspellManager *)rsrc->ptr;
delete_pspell_manager(manager);
}
-static void php_pspell_close_config(zend_resource *rsrc TSRMLS_DC)
+static void php_pspell_close_config(zend_resource *rsrc)
{
PspellConfig *config = (PspellConfig *)rsrc->ptr;
@@ -230,7 +230,7 @@ static void php_pspell_close_config(zend_resource *rsrc TSRMLS_DC)
#define PSPELL_FETCH_CONFIG do { \
zval *res = zend_hash_index_find(&EG(regular_list), conf); \
if (res == NULL || Z_RES_P(res)->type != le_pspell_config) { \
- php_error_docref(NULL TSRMLS_CC, E_WARNING, "%ld is not a PSPELL config index", conf); \
+ php_error_docref(NULL, E_WARNING, "%ld is not a PSPELL config index", conf); \
RETURN_FALSE; \
} \
config = (PspellConfig *)Z_RES_P(res)->ptr; \
@@ -239,7 +239,7 @@ static void php_pspell_close_config(zend_resource *rsrc TSRMLS_DC)
#define PSPELL_FETCH_MANAGER do { \
zval *res = zend_hash_index_find(&EG(regular_list), scin); \
if (res == NULL || Z_RES_P(res)->type != le_pspell) { \
- php_error_docref(NULL TSRMLS_CC, E_WARNING, "%ld is not a PSPELL result index", scin); \
+ php_error_docref(NULL, E_WARNING, "%ld is not a PSPELL result index", scin); \
RETURN_FALSE; \
} \
manager = (PspellManager *)Z_RES_P(res)->ptr; \
@@ -281,7 +281,7 @@ static PHP_FUNCTION(pspell_new)
PspellManager *manager;
PspellConfig *config;
- if (zend_parse_parameters(argc TSRMLS_CC, "s|sssl", &language, &language_len, &spelling, &spelling_len,
+ if (zend_parse_parameters(argc, "s|sssl", &language, &language_len, &spelling, &spelling_len,
&jargon, &jargon_len, &encoding, &encoding_len, &mode) == FAILURE) {
return;
}
@@ -345,13 +345,13 @@ static PHP_FUNCTION(pspell_new)
delete_pspell_config(config);
if (pspell_error_number(ret) != 0) {
- php_error_docref(NULL TSRMLS_CC, E_WARNING, "PSPELL couldn't open the dictionary. reason: %s", pspell_error_message(ret));
+ php_error_docref(NULL, E_WARNING, "PSPELL couldn't open the dictionary. reason: %s", pspell_error_message(ret));
delete_pspell_can_have_error(ret);
RETURN_FALSE;
}
manager = to_pspell_manager(ret);
- ind = zend_list_insert(manager, le_pspell TSRMLS_CC);
+ ind = zend_list_insert(manager, le_pspell);
RETURN_LONG(Z_RES_HANDLE_P(ind));
}
/* }}} */
@@ -378,7 +378,7 @@ static PHP_FUNCTION(pspell_new_personal)
PspellManager *manager;
PspellConfig *config;
- if (zend_parse_parameters(argc TSRMLS_CC, "ps|sssl", &personal, &personal_len, &language, &language_len,
+ if (zend_parse_parameters(argc, "ps|sssl", &personal, &personal_len, &language, &language_len,
&spelling, &spelling_len, &jargon, &jargon_len, &encoding, &encoding_len, &mode) == FAILURE) {
return;
}
@@ -406,7 +406,7 @@ static PHP_FUNCTION(pspell_new_personal)
}
#endif
- if (php_check_open_basedir(personal TSRMLS_CC)) {
+ if (php_check_open_basedir(personal)) {
delete_pspell_config(config);
RETURN_FALSE;
}
@@ -450,13 +450,13 @@ static PHP_FUNCTION(pspell_new_personal)
delete_pspell_config(config);
if (pspell_error_number(ret) != 0) {
- php_error_docref(NULL TSRMLS_CC, E_WARNING, "PSPELL couldn't open the dictionary. reason: %s", pspell_error_message(ret));
+ php_error_docref(NULL, E_WARNING, "PSPELL couldn't open the dictionary. reason: %s", pspell_error_message(ret));
delete_pspell_can_have_error(ret);
RETURN_FALSE;
}
manager = to_pspell_manager(ret);
- ind = zend_list_insert(manager, le_pspell TSRMLS_CC);
+ ind = zend_list_insert(manager, le_pspell);
RETURN_LONG(Z_RES_HANDLE_P(ind));
}
/* }}} */
@@ -471,7 +471,7 @@ static PHP_FUNCTION(pspell_new_config)
PspellManager *manager;
PspellConfig *config;
- if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "l", &conf) == FAILURE) {
+ if (zend_parse_parameters(ZEND_NUM_ARGS(), "l", &conf) == FAILURE) {
return;
}
@@ -480,13 +480,13 @@ static PHP_FUNCTION(pspell_new_config)
ret = new_pspell_manager(config);
if (pspell_error_number(ret) != 0) {
- php_error_docref(NULL TSRMLS_CC, E_WARNING, "PSPELL couldn't open the dictionary. reason: %s", pspell_error_message(ret));
+ php_error_docref(NULL, E_WARNING, "PSPELL couldn't open the dictionary. reason: %s", pspell_error_message(ret));
delete_pspell_can_have_error(ret);
RETURN_FALSE;
}
manager = to_pspell_manager(ret);
- ind = zend_list_insert(manager, le_pspell TSRMLS_CC);
+ ind = zend_list_insert(manager, le_pspell);
RETURN_LONG(Z_RES_HANDLE_P(ind));
}
/* }}} */
@@ -500,7 +500,7 @@ static PHP_FUNCTION(pspell_check)
char *word;
PspellManager *manager;
- if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "ls", &scin, &word, &word_len) == FAILURE) {
+ if (zend_parse_parameters(ZEND_NUM_ARGS(), "ls", &scin, &word, &word_len) == FAILURE) {
return;
}
@@ -525,7 +525,7 @@ static PHP_FUNCTION(pspell_suggest)
const PspellWordList *wl;
const char *sug;
- if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "ls", &scin, &word, &word_len) == FAILURE) {
+ if (zend_parse_parameters(ZEND_NUM_ARGS(), "ls", &scin, &word, &word_len) == FAILURE) {
return;
}
@@ -541,7 +541,7 @@ static PHP_FUNCTION(pspell_suggest)
}
delete_pspell_string_emulation(els);
} else {
- php_error_docref(NULL TSRMLS_CC, E_WARNING, "PSPELL had a problem. details: %s", pspell_manager_error_message(manager));
+ php_error_docref(NULL, E_WARNING, "PSPELL had a problem. details: %s", pspell_manager_error_message(manager));
RETURN_FALSE;
}
}
@@ -556,7 +556,7 @@ static PHP_FUNCTION(pspell_store_replacement)
char *miss, *corr;
PspellManager *manager;
- if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "lss", &scin, &miss, &miss_len, &corr, &corr_len) == FAILURE) {
+ if (zend_parse_parameters(ZEND_NUM_ARGS(), "lss", &scin, &miss, &miss_len, &corr, &corr_len) == FAILURE) {
return;
}
@@ -566,7 +566,7 @@ static PHP_FUNCTION(pspell_store_replacement)
if (pspell_manager_error_number(manager) == 0) {
RETURN_TRUE;
} else {
- php_error_docref(NULL TSRMLS_CC, E_WARNING, "pspell_store_replacement() gave error: %s", pspell_manager_error_message(manager));
+ php_error_docref(NULL, E_WARNING, "pspell_store_replacement() gave error: %s", pspell_manager_error_message(manager));
RETURN_FALSE;
}
}
@@ -581,7 +581,7 @@ static PHP_FUNCTION(pspell_add_to_personal)
char *word;
PspellManager *manager;
- if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "ls", &scin, &word, &word_len) == FAILURE) {
+ if (zend_parse_parameters(ZEND_NUM_ARGS(), "ls", &scin, &word, &word_len) == FAILURE) {
return;
}
@@ -596,7 +596,7 @@ static PHP_FUNCTION(pspell_add_to_personal)
if (pspell_manager_error_number(manager) == 0) {
RETURN_TRUE;
} else {
- php_error_docref(NULL TSRMLS_CC, E_WARNING, "pspell_add_to_personal() gave error: %s", pspell_manager_error_message(manager));
+ php_error_docref(NULL, E_WARNING, "pspell_add_to_personal() gave error: %s", pspell_manager_error_message(manager));
RETURN_FALSE;
}
}
@@ -611,7 +611,7 @@ static PHP_FUNCTION(pspell_add_to_session)
char *word;
PspellManager *manager;
- if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "ls", &scin, &word, &word_len) == FAILURE) {
+ if (zend_parse_parameters(ZEND_NUM_ARGS(), "ls", &scin, &word, &word_len) == FAILURE) {
return;
}
@@ -626,7 +626,7 @@ static PHP_FUNCTION(pspell_add_to_session)
if (pspell_manager_error_number(manager) == 0) {
RETURN_TRUE;
} else {
- php_error_docref(NULL TSRMLS_CC, E_WARNING, "pspell_add_to_session() gave error: %s", pspell_manager_error_message(manager));
+ php_error_docref(NULL, E_WARNING, "pspell_add_to_session() gave error: %s", pspell_manager_error_message(manager));
RETURN_FALSE;
}
}
@@ -639,7 +639,7 @@ static PHP_FUNCTION(pspell_clear_session)
zend_long scin;
PspellManager *manager;
- if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "l", &scin) == FAILURE) {
+ if (zend_parse_parameters(ZEND_NUM_ARGS(), "l", &scin) == FAILURE) {
return;
}
@@ -649,7 +649,7 @@ static PHP_FUNCTION(pspell_clear_session)
if (pspell_manager_error_number(manager) == 0) {
RETURN_TRUE;
} else {
- php_error_docref(NULL TSRMLS_CC, E_WARNING, "pspell_clear_session() gave error: %s", pspell_manager_error_message(manager));
+ php_error_docref(NULL, E_WARNING, "pspell_clear_session() gave error: %s", pspell_manager_error_message(manager));
RETURN_FALSE;
}
}
@@ -662,7 +662,7 @@ static PHP_FUNCTION(pspell_save_wordlist)
zend_long scin;
PspellManager *manager;
- if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "l", &scin) == FAILURE) {
+ if (zend_parse_parameters(ZEND_NUM_ARGS(), "l", &scin) == FAILURE) {
return;
}
@@ -673,7 +673,7 @@ static PHP_FUNCTION(pspell_save_wordlist)
if (pspell_manager_error_number(manager) == 0) {
RETURN_TRUE;
} else {
- php_error_docref(NULL TSRMLS_CC, E_WARNING, "pspell_save_wordlist() gave error: %s", pspell_manager_error_message(manager));
+ php_error_docref(NULL, E_WARNING, "pspell_save_wordlist() gave error: %s", pspell_manager_error_message(manager));
RETURN_FALSE;
}
@@ -697,7 +697,7 @@ static PHP_FUNCTION(pspell_config_create)
DWORD dwType,dwLen;
#endif
- if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "s|sss", &language, &language_len, &spelling, &spelling_len,
+ if (zend_parse_parameters(ZEND_NUM_ARGS(), "s|sss", &language, &language_len, &spelling, &spelling_len,
&jargon, &jargon_len, &encoding, &encoding_len) == FAILURE) {
return;
}
@@ -743,7 +743,7 @@ static PHP_FUNCTION(pspell_config_create)
which is not what we want */
pspell_config_replace(config, "save-repl", "false");
- ind = zend_list_insert(config, le_pspell_config TSRMLS_CC);
+ ind = zend_list_insert(config, le_pspell_config);
RETURN_LONG(Z_RES_HANDLE_P(ind));
}
/* }}} */
@@ -756,7 +756,7 @@ static PHP_FUNCTION(pspell_config_runtogether)
zend_bool runtogether;
PspellConfig *config;
- if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "lb", &conf, &runtogether) == FAILURE) {
+ if (zend_parse_parameters(ZEND_NUM_ARGS(), "lb", &conf, &runtogether) == FAILURE) {
return;
}
@@ -775,7 +775,7 @@ static PHP_FUNCTION(pspell_config_mode)
zend_long conf, mode;
PspellConfig *config;
- if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "ll", &conf, &mode) == FAILURE) {
+ if (zend_parse_parameters(ZEND_NUM_ARGS(), "ll", &conf, &mode) == FAILURE) {
return;
}
@@ -802,7 +802,7 @@ static PHP_FUNCTION(pspell_config_ignore)
zend_long conf, ignore = 0L;
PspellConfig *config;
- if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "ll", &conf, &ignore) == FAILURE) {
+ if (zend_parse_parameters(ZEND_NUM_ARGS(), "ll", &conf, &ignore) == FAILURE) {
return;
}
@@ -822,13 +822,13 @@ static void pspell_config_path(INTERNAL_FUNCTION_PARAMETERS, char *option)
size_t value_len;
PspellConfig *config;
- if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "lp", &conf, &value, &value_len) == FAILURE) {
+ if (zend_parse_parameters(ZEND_NUM_ARGS(), "lp", &conf, &value, &value_len) == FAILURE) {
return;
}
PSPELL_FETCH_CONFIG;
- if (php_check_open_basedir(value TSRMLS_CC)) {
+ if (php_check_open_basedir(value)) {
RETURN_FALSE;
}
@@ -870,7 +870,7 @@ static PHP_FUNCTION(pspell_config_repl)
size_t repl_len;
PspellConfig *config;
- if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "lp", &conf, &repl, &repl_len) == FAILURE) {
+ if (zend_parse_parameters(ZEND_NUM_ARGS(), "lp", &conf, &repl, &repl_len) == FAILURE) {
return;
}
@@ -878,7 +878,7 @@ static PHP_FUNCTION(pspell_config_repl)
pspell_config_replace(config, "save-repl", "true");
- if (php_check_open_basedir(repl TSRMLS_CC)) {
+ if (php_check_open_basedir(repl)) {
RETURN_FALSE;
}
@@ -896,7 +896,7 @@ static PHP_FUNCTION(pspell_config_save_repl)
zend_bool save;
PspellConfig *config;
- if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "lb", &conf, &save) == FAILURE) {
+ if (zend_parse_parameters(ZEND_NUM_ARGS(), "lb", &conf, &save) == FAILURE) {
return;
}