summaryrefslogtreecommitdiff
path: root/ext/intl/breakiterator/breakiterator_methods.cpp
diff options
context:
space:
mode:
authorAnatol Belski <ab@php.net>2014-08-19 22:57:17 +0200
committerAnatol Belski <ab@php.net>2014-08-19 22:57:17 +0200
commit063079b62e383036dd24cd6465d3db31edf6cb6d (patch)
treefdbf5ac3e408fbd7ef46be5ffc3d65b33eaccc24 /ext/intl/breakiterator/breakiterator_methods.cpp
parent729bce4321b54e7054a88c0d90f4d102729ba570 (diff)
downloadphp-git-063079b62e383036dd24cd6465d3db31edf6cb6d.tar.gz
ported ext/intl, bugfixes to go
Diffstat (limited to 'ext/intl/breakiterator/breakiterator_methods.cpp')
-rw-r--r--ext/intl/breakiterator/breakiterator_methods.cpp26
1 files changed, 13 insertions, 13 deletions
diff --git a/ext/intl/breakiterator/breakiterator_methods.cpp b/ext/intl/breakiterator/breakiterator_methods.cpp
index 99ededb25c..a8c32cc8d4 100644
--- a/ext/intl/breakiterator/breakiterator_methods.cpp
+++ b/ext/intl/breakiterator/breakiterator_methods.cpp
@@ -208,7 +208,7 @@ static void _breakiter_no_args_ret_int32(
int32_t res = (bio->biter->*func)();
- RETURN_INT((long)res);
+ RETURN_INT((php_int_t)res);
}
static void _breakiter_int32_ret_int32(
@@ -217,11 +217,11 @@ static void _breakiter_int32_ret_int32(
INTERNAL_FUNCTION_PARAMETERS)
{
char *msg;
- long arg;
+ php_int_t arg;
BREAKITER_METHOD_INIT_VARS;
object = getThis();
- if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "l", &arg) == FAILURE) {
+ if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "i", &arg) == FAILURE) {
spprintf(&msg, 0, "%s: bad arguments", func_name);
intl_error_set(NULL, U_ILLEGAL_ARGUMENT_ERROR, msg, 1 TSRMLS_CC);
efree(msg);
@@ -240,7 +240,7 @@ static void _breakiter_int32_ret_int32(
int32_t res = (bio->biter->*func)((int32_t)arg);
- RETURN_INT((long)res);
+ RETURN_INT((php_int_t)res);
}
U_CFUNC PHP_FUNCTION(breakiter_first)
@@ -308,7 +308,7 @@ U_CFUNC PHP_FUNCTION(breakiter_current)
int32_t res = bio->biter->current();
- RETURN_INT((long)res);
+ RETURN_INT((php_int_t)res);
}
U_CFUNC PHP_FUNCTION(breakiter_following)
@@ -327,11 +327,11 @@ U_CFUNC PHP_FUNCTION(breakiter_preceding)
U_CFUNC PHP_FUNCTION(breakiter_is_boundary)
{
- long offset;
+ php_int_t offset;
BREAKITER_METHOD_INIT_VARS;
object = getThis();
- if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "l",
+ if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "i",
&offset) == FAILURE) {
intl_error_set(NULL, U_ILLEGAL_ARGUMENT_ERROR,
"breakiter_is_boundary: bad arguments", 0 TSRMLS_CC);
@@ -349,16 +349,16 @@ U_CFUNC PHP_FUNCTION(breakiter_is_boundary)
UBool res = bio->biter->isBoundary((int32_t)offset);
- RETURN_BOOL((long)res);
+ RETURN_BOOL((php_int_t)res);
}
U_CFUNC PHP_FUNCTION(breakiter_get_locale)
{
- long locale_type;
+ php_int_t locale_type;
BREAKITER_METHOD_INIT_VARS;
object = getThis();
- if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "l", &locale_type) == FAILURE) {
+ if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "i", &locale_type) == FAILURE) {
intl_error_set(NULL, U_ILLEGAL_ARGUMENT_ERROR,
"breakiter_get_locale: bad arguments", 0 TSRMLS_CC);
RETURN_FALSE;
@@ -382,11 +382,11 @@ U_CFUNC PHP_FUNCTION(breakiter_get_locale)
U_CFUNC PHP_FUNCTION(breakiter_get_parts_iterator)
{
- long key_type = 0;
+ php_int_t key_type = 0;
BREAKITER_METHOD_INIT_VARS;
object = getThis();
- if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "|l", &key_type) == FAILURE) {
+ if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "|i", &key_type) == FAILURE) {
intl_error_set(NULL, U_ILLEGAL_ARGUMENT_ERROR,
"breakiter_get_parts_iterator: bad arguments", 0 TSRMLS_CC);
RETURN_FALSE;
@@ -422,7 +422,7 @@ U_CFUNC PHP_FUNCTION(breakiter_get_error_code)
if (bio == NULL)
RETURN_FALSE;
- RETURN_INT((long)BREAKITER_ERROR_CODE(bio));
+ RETURN_INT((php_int_t)BREAKITER_ERROR_CODE(bio));
}
U_CFUNC PHP_FUNCTION(breakiter_get_error_message)