summaryrefslogtreecommitdiff
path: root/ext/pspell/pspell.c
diff options
context:
space:
mode:
Diffstat (limited to 'ext/pspell/pspell.c')
-rw-r--r--ext/pspell/pspell.c52
1 files changed, 26 insertions, 26 deletions
diff --git a/ext/pspell/pspell.c b/ext/pspell/pspell.c
index f95ecc8b58..bf01f28df6 100644
--- a/ext/pspell/pspell.c
+++ b/ext/pspell/pspell.c
@@ -264,8 +264,8 @@ static PHP_MINIT_FUNCTION(pspell)
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;
- long mode = 0L, speed = 0L;
+ size_t language_len, spelling_len = 0, jargon_len = 0, encoding_len = 0;
+ zend_long mode = Z_L(0), speed = Z_L(0);
int argc = ZEND_NUM_ARGS();
zval *ind;
@@ -361,8 +361,8 @@ static PHP_FUNCTION(pspell_new)
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;
- long mode = 0L, speed = 0L;
+ size_t personal_len, language_len, spelling_len = 0, jargon_len = 0, encoding_len = 0;
+ zend_long mode = Z_L(0), speed = Z_L(0);
int argc = ZEND_NUM_ARGS();
zval *ind;
@@ -465,7 +465,7 @@ static PHP_FUNCTION(pspell_new_personal)
Load a dictionary based on the given config */
static PHP_FUNCTION(pspell_new_config)
{
- long conf;
+ zend_long conf;
zval *ind;
PspellCanHaveError *ret;
PspellManager *manager;
@@ -495,8 +495,8 @@ static PHP_FUNCTION(pspell_new_config)
Returns true if word is valid */
static PHP_FUNCTION(pspell_check)
{
- int word_len;
- long scin;
+ size_t word_len;
+ zend_long scin;
char *word;
PspellManager *manager;
@@ -518,9 +518,9 @@ static PHP_FUNCTION(pspell_check)
Returns array of suggestions */
static PHP_FUNCTION(pspell_suggest)
{
- long scin;
+ zend_long scin;
char *word;
- int word_len;
+ size_t word_len;
PspellManager *manager;
const PspellWordList *wl;
const char *sug;
@@ -551,8 +551,8 @@ static PHP_FUNCTION(pspell_suggest)
Notify the dictionary of a user-selected replacement */
static PHP_FUNCTION(pspell_store_replacement)
{
- int miss_len, corr_len;
- long scin;
+ size_t miss_len, corr_len;
+ zend_long scin;
char *miss, *corr;
PspellManager *manager;
@@ -576,8 +576,8 @@ static PHP_FUNCTION(pspell_store_replacement)
Adds a word to a personal list */
static PHP_FUNCTION(pspell_add_to_personal)
{
- int word_len;
- long scin;
+ size_t word_len;
+ zend_long scin;
char *word;
PspellManager *manager;
@@ -606,8 +606,8 @@ static PHP_FUNCTION(pspell_add_to_personal)
Adds a word to the current session */
static PHP_FUNCTION(pspell_add_to_session)
{
- int word_len;
- long scin;
+ size_t word_len;
+ zend_long scin;
char *word;
PspellManager *manager;
@@ -636,7 +636,7 @@ static PHP_FUNCTION(pspell_add_to_session)
Clears the current session */
static PHP_FUNCTION(pspell_clear_session)
{
- long scin;
+ zend_long scin;
PspellManager *manager;
if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "l", &scin) == FAILURE) {
@@ -659,7 +659,7 @@ static PHP_FUNCTION(pspell_clear_session)
Saves the current (personal) wordlist */
static PHP_FUNCTION(pspell_save_wordlist)
{
- long scin;
+ zend_long scin;
PspellManager *manager;
if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "l", &scin) == FAILURE) {
@@ -685,7 +685,7 @@ static PHP_FUNCTION(pspell_save_wordlist)
static PHP_FUNCTION(pspell_config_create)
{
char *language, *spelling = NULL, *jargon = NULL, *encoding = NULL;
- int language_len, spelling_len = 0, jargon_len = 0, encoding_len = 0;
+ size_t language_len, spelling_len = 0, jargon_len = 0, encoding_len = 0;
zval *ind;
PspellConfig *config;
@@ -752,7 +752,7 @@ static PHP_FUNCTION(pspell_config_create)
Consider run-together words as valid components */
static PHP_FUNCTION(pspell_config_runtogether)
{
- long conf;
+ zend_long conf;
zend_bool runtogether;
PspellConfig *config;
@@ -772,7 +772,7 @@ static PHP_FUNCTION(pspell_config_runtogether)
Select mode for config (PSPELL_FAST, PSPELL_NORMAL or PSPELL_BAD_SPELLERS) */
static PHP_FUNCTION(pspell_config_mode)
{
- long conf, mode;
+ zend_long conf, mode;
PspellConfig *config;
if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "ll", &conf, &mode) == FAILURE) {
@@ -799,7 +799,7 @@ static PHP_FUNCTION(pspell_config_mode)
static PHP_FUNCTION(pspell_config_ignore)
{
char ignore_str[MAX_LENGTH_OF_LONG + 1];
- long conf, ignore = 0L;
+ zend_long conf, ignore = 0L;
PspellConfig *config;
if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "ll", &conf, &ignore) == FAILURE) {
@@ -817,9 +817,9 @@ static PHP_FUNCTION(pspell_config_ignore)
static void pspell_config_path(INTERNAL_FUNCTION_PARAMETERS, char *option)
{
- long conf;
+ zend_long conf;
char *value;
- int value_len;
+ size_t value_len;
PspellConfig *config;
if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "lp", &conf, &value, &value_len) == FAILURE) {
@@ -865,9 +865,9 @@ static PHP_FUNCTION(pspell_config_data_dir)
Use a personal dictionary with replacement pairs for this config */
static PHP_FUNCTION(pspell_config_repl)
{
- long conf;
+ zend_long conf;
char *repl;
- int repl_len;
+ size_t repl_len;
PspellConfig *config;
if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "lp", &conf, &repl, &repl_len) == FAILURE) {
@@ -892,7 +892,7 @@ static PHP_FUNCTION(pspell_config_repl)
Save replacement pairs when personal list is saved for this config */
static PHP_FUNCTION(pspell_config_save_repl)
{
- long conf;
+ zend_long conf;
zend_bool save;
PspellConfig *config;