diff options
author | Anatol Belski <ab@php.net> | 2014-08-25 19:24:55 +0200 |
---|---|---|
committer | Anatol Belski <ab@php.net> | 2014-08-25 19:24:55 +0200 |
commit | c3e3c98ec666812daaaca896cf5ef758a8a6df14 (patch) | |
tree | d82a76de5c8d117d1cf2dcca19bb30a283621870 /ext/pspell | |
parent | 0cf2dbdf58645b52cb6582b1b2571c5cd9e9e6b3 (diff) | |
download | php-git-c3e3c98ec666812daaaca896cf5ef758a8a6df14.tar.gz |
master renames phase 1
Diffstat (limited to 'ext/pspell')
-rw-r--r-- | ext/pspell/pspell.c | 82 |
1 files changed, 41 insertions, 41 deletions
diff --git a/ext/pspell/pspell.c b/ext/pspell/pspell.c index 359f02fb15..ff97306ecf 100644 --- a/ext/pspell/pspell.c +++ b/ext/pspell/pspell.c @@ -249,10 +249,10 @@ static void php_pspell_close_config(zend_resource *rsrc TSRMLS_DC) */ static PHP_MINIT_FUNCTION(pspell) { - REGISTER_INT_CONSTANT("PSPELL_FAST", PSPELL_FAST, CONST_PERSISTENT | CONST_CS); - REGISTER_INT_CONSTANT("PSPELL_NORMAL", PSPELL_NORMAL, CONST_PERSISTENT | CONST_CS); - REGISTER_INT_CONSTANT("PSPELL_BAD_SPELLERS", PSPELL_BAD_SPELLERS, CONST_PERSISTENT | CONST_CS); - REGISTER_INT_CONSTANT("PSPELL_RUN_TOGETHER", PSPELL_RUN_TOGETHER, CONST_PERSISTENT | CONST_CS); + REGISTER_LONG_CONSTANT("PSPELL_FAST", PSPELL_FAST, CONST_PERSISTENT | CONST_CS); + REGISTER_LONG_CONSTANT("PSPELL_NORMAL", PSPELL_NORMAL, CONST_PERSISTENT | CONST_CS); + REGISTER_LONG_CONSTANT("PSPELL_BAD_SPELLERS", PSPELL_BAD_SPELLERS, CONST_PERSISTENT | CONST_CS); + REGISTER_LONG_CONSTANT("PSPELL_RUN_TOGETHER", PSPELL_RUN_TOGETHER, CONST_PERSISTENT | CONST_CS); le_pspell = zend_register_list_destructors_ex(php_pspell_close, NULL, "pspell", module_number); le_pspell_config = zend_register_list_destructors_ex(php_pspell_close_config, NULL, "pspell config", module_number); return SUCCESS; @@ -265,7 +265,7 @@ static PHP_FUNCTION(pspell_new) { char *language, *spelling = NULL, *jargon = NULL, *encoding = NULL; int language_len, spelling_len = 0, jargon_len = 0, encoding_len = 0; - php_int_t mode = Z_I(0), speed = Z_I(0); + zend_long mode = Z_I(0), speed = Z_I(0); int argc = ZEND_NUM_ARGS(); zval *ind; @@ -281,7 +281,7 @@ static PHP_FUNCTION(pspell_new) PspellManager *manager; PspellConfig *config; - if (zend_parse_parameters(argc TSRMLS_CC, "s|sssi", &language, &language_len, &spelling, &spelling_len, + if (zend_parse_parameters(argc TSRMLS_CC, "s|sssl", &language, &language_len, &spelling, &spelling_len, &jargon, &jargon_len, &encoding, &encoding_len, &mode) == FAILURE) { return; } @@ -352,7 +352,7 @@ static PHP_FUNCTION(pspell_new) manager = to_pspell_manager(ret); ind = zend_list_insert(manager, le_pspell TSRMLS_CC); - RETURN_INT(Z_RES_HANDLE_P(ind)); + RETURN_LONG(Z_RES_HANDLE_P(ind)); } /* }}} */ @@ -362,7 +362,7 @@ static PHP_FUNCTION(pspell_new_personal) { char *personal, *language, *spelling = NULL, *jargon = NULL, *encoding = NULL; int personal_len, language_len, spelling_len = 0, jargon_len = 0, encoding_len = 0; - php_int_t mode = Z_I(0), speed = Z_I(0); + zend_long mode = Z_I(0), speed = Z_I(0); int argc = ZEND_NUM_ARGS(); zval *ind; @@ -378,7 +378,7 @@ static PHP_FUNCTION(pspell_new_personal) PspellManager *manager; PspellConfig *config; - if (zend_parse_parameters(argc TSRMLS_CC, "ps|sssi", &personal, &personal_len, &language, &language_len, + if (zend_parse_parameters(argc TSRMLS_CC, "ps|sssl", &personal, &personal_len, &language, &language_len, &spelling, &spelling_len, &jargon, &jargon_len, &encoding, &encoding_len, &mode) == FAILURE) { return; } @@ -457,7 +457,7 @@ static PHP_FUNCTION(pspell_new_personal) manager = to_pspell_manager(ret); ind = zend_list_insert(manager, le_pspell TSRMLS_CC); - RETURN_INT(Z_RES_HANDLE_P(ind)); + RETURN_LONG(Z_RES_HANDLE_P(ind)); } /* }}} */ @@ -465,13 +465,13 @@ static PHP_FUNCTION(pspell_new_personal) Load a dictionary based on the given config */ static PHP_FUNCTION(pspell_new_config) { - php_int_t conf; + zend_long conf; zval *ind; PspellCanHaveError *ret; PspellManager *manager; PspellConfig *config; - if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "i", &conf) == FAILURE) { + if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "l", &conf) == FAILURE) { return; } @@ -487,7 +487,7 @@ static PHP_FUNCTION(pspell_new_config) manager = to_pspell_manager(ret); ind = zend_list_insert(manager, le_pspell TSRMLS_CC); - RETURN_INT(Z_RES_HANDLE_P(ind)); + RETURN_LONG(Z_RES_HANDLE_P(ind)); } /* }}} */ @@ -496,11 +496,11 @@ static PHP_FUNCTION(pspell_new_config) static PHP_FUNCTION(pspell_check) { int word_len; - php_int_t scin; + zend_long scin; char *word; PspellManager *manager; - if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "is", &scin, &word, &word_len) == FAILURE) { + if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "ls", &scin, &word, &word_len) == FAILURE) { return; } @@ -518,14 +518,14 @@ static PHP_FUNCTION(pspell_check) Returns array of suggestions */ static PHP_FUNCTION(pspell_suggest) { - php_int_t scin; + zend_long scin; char *word; int word_len; PspellManager *manager; const PspellWordList *wl; const char *sug; - if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "is", &scin, &word, &word_len) == FAILURE) { + if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "ls", &scin, &word, &word_len) == FAILURE) { return; } @@ -552,11 +552,11 @@ static PHP_FUNCTION(pspell_suggest) static PHP_FUNCTION(pspell_store_replacement) { int miss_len, corr_len; - php_int_t scin; + zend_long scin; char *miss, *corr; PspellManager *manager; - if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "iss", &scin, &miss, &miss_len, &corr, &corr_len) == FAILURE) { + if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "lss", &scin, &miss, &miss_len, &corr, &corr_len) == FAILURE) { return; } @@ -577,11 +577,11 @@ static PHP_FUNCTION(pspell_store_replacement) static PHP_FUNCTION(pspell_add_to_personal) { int word_len; - php_int_t scin; + zend_long scin; char *word; PspellManager *manager; - if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "is", &scin, &word, &word_len) == FAILURE) { + if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "ls", &scin, &word, &word_len) == FAILURE) { return; } @@ -607,11 +607,11 @@ static PHP_FUNCTION(pspell_add_to_personal) static PHP_FUNCTION(pspell_add_to_session) { int word_len; - php_int_t scin; + zend_long scin; char *word; PspellManager *manager; - if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "is", &scin, &word, &word_len) == FAILURE) { + if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "ls", &scin, &word, &word_len) == FAILURE) { return; } @@ -636,10 +636,10 @@ static PHP_FUNCTION(pspell_add_to_session) Clears the current session */ static PHP_FUNCTION(pspell_clear_session) { - php_int_t scin; + zend_long scin; PspellManager *manager; - if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "i", &scin) == FAILURE) { + if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "l", &scin) == FAILURE) { return; } @@ -659,10 +659,10 @@ static PHP_FUNCTION(pspell_clear_session) Saves the current (personal) wordlist */ static PHP_FUNCTION(pspell_save_wordlist) { - php_int_t scin; + zend_long scin; PspellManager *manager; - if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "i", &scin) == FAILURE) { + if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "l", &scin) == FAILURE) { return; } @@ -744,7 +744,7 @@ static PHP_FUNCTION(pspell_config_create) pspell_config_replace(config, "save-repl", "false"); ind = zend_list_insert(config, le_pspell_config TSRMLS_CC); - RETURN_INT(Z_RES_HANDLE_P(ind)); + RETURN_LONG(Z_RES_HANDLE_P(ind)); } /* }}} */ @@ -752,11 +752,11 @@ static PHP_FUNCTION(pspell_config_create) Consider run-together words as valid components */ static PHP_FUNCTION(pspell_config_runtogether) { - php_int_t conf; + zend_long conf; zend_bool runtogether; PspellConfig *config; - if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "ib", &conf, &runtogether) == FAILURE) { + if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "lb", &conf, &runtogether) == FAILURE) { return; } @@ -772,10 +772,10 @@ static PHP_FUNCTION(pspell_config_runtogether) Select mode for config (PSPELL_FAST, PSPELL_NORMAL or PSPELL_BAD_SPELLERS) */ static PHP_FUNCTION(pspell_config_mode) { - php_int_t conf, mode; + zend_long conf, mode; PspellConfig *config; - if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "ii", &conf, &mode) == FAILURE) { + if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "ll", &conf, &mode) == FAILURE) { return; } @@ -798,11 +798,11 @@ static PHP_FUNCTION(pspell_config_mode) Ignore words <= n chars */ static PHP_FUNCTION(pspell_config_ignore) { - char ignore_str[MAX_LENGTH_OF_ZEND_INT + 1]; - php_int_t conf, ignore = 0L; + char ignore_str[MAX_LENGTH_OF_LONG + 1]; + zend_long conf, ignore = 0L; PspellConfig *config; - if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "ii", &conf, &ignore) == FAILURE) { + if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "ll", &conf, &ignore) == FAILURE) { return; } @@ -817,12 +817,12 @@ static PHP_FUNCTION(pspell_config_ignore) static void pspell_config_path(INTERNAL_FUNCTION_PARAMETERS, char *option) { - php_int_t conf; + zend_long conf; char *value; int value_len; PspellConfig *config; - if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "ip", &conf, &value, &value_len) == FAILURE) { + if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "lp", &conf, &value, &value_len) == FAILURE) { return; } @@ -865,12 +865,12 @@ static PHP_FUNCTION(pspell_config_data_dir) Use a personal dictionary with replacement pairs for this config */ static PHP_FUNCTION(pspell_config_repl) { - php_int_t conf; + zend_long conf; char *repl; int repl_len; PspellConfig *config; - if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "ip", &conf, &repl, &repl_len) == FAILURE) { + if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "lp", &conf, &repl, &repl_len) == FAILURE) { return; } @@ -892,11 +892,11 @@ static PHP_FUNCTION(pspell_config_repl) Save replacement pairs when personal list is saved for this config */ static PHP_FUNCTION(pspell_config_save_repl) { - php_int_t conf; + zend_long conf; zend_bool save; PspellConfig *config; - if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "ib", &conf, &save) == FAILURE) { + if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "lb", &conf, &save) == FAILURE) { return; } |