diff options
Diffstat (limited to 'Zend/zend_builtin_functions.c')
-rw-r--r-- | Zend/zend_builtin_functions.c | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/Zend/zend_builtin_functions.c b/Zend/zend_builtin_functions.c index ed2ba749c4..0ce917d327 100644 --- a/Zend/zend_builtin_functions.c +++ b/Zend/zend_builtin_functions.c @@ -172,14 +172,14 @@ ZEND_FUNCTION(func_num_args) int arg_count; p = EG(argument_stack).top_element-1-1; - arg_count = (ulong) *p; /* this is the amount of arguments passed to func_num_args(); */ + arg_count = (int)(zend_uintptr_t) *p; /* this is the amount of arguments passed to func_num_args(); */ p -= 1+arg_count; if (*p) { zend_error(E_ERROR, "func_num_args(): Can't be used as a function parameter"); } --p; if (p>=EG(argument_stack).elements) { - RETURN_LONG((ulong) *p); + RETURN_LONG((long)(zend_uintptr_t) *p); } else { zend_error(E_WARNING, "func_num_args(): Called from the global scope - no function context"); RETURN_LONG(-1); @@ -210,7 +210,7 @@ ZEND_FUNCTION(func_get_arg) } p = EG(argument_stack).top_element-1-1; - arg_count = (ulong) *p; /* this is the amount of arguments passed to func_get_arg(); */ + arg_count = (int)(zend_uintptr_t) *p; /* this is the amount of arguments passed to func_get_arg(); */ p -= 1+arg_count; if (*p) { zend_error(E_ERROR, "func_get_arg(): Can't be used as a function parameter"); @@ -220,7 +220,7 @@ ZEND_FUNCTION(func_get_arg) zend_error(E_WARNING, "func_get_arg(): Called from the global scope - no function context"); RETURN_FALSE; } - arg_count = (ulong) *p; + arg_count = (int)(zend_uintptr_t) *p; if (requested_offset>=arg_count) { zend_error(E_WARNING, "func_get_arg(): Argument %ld not passed to function", requested_offset); @@ -244,7 +244,7 @@ ZEND_FUNCTION(func_get_args) int i; p = EG(argument_stack).top_element-1-1; - arg_count = (ulong) *p; /* this is the amount of arguments passed to func_get_args(); */ + arg_count = (int)(zend_uintptr_t) *p; /* this is the amount of arguments passed to func_get_args(); */ p -= 1+arg_count; if (*p) { zend_error(E_ERROR, "func_get_args(): Can't be used as a function parameter"); @@ -255,7 +255,7 @@ ZEND_FUNCTION(func_get_args) zend_error(E_WARNING, "func_get_args(): Called from the global scope - no function context"); RETURN_FALSE; } - arg_count = (ulong) *p; + arg_count = (int)(zend_uintptr_t) *p; array_init(return_value); @@ -1655,7 +1655,7 @@ static zval *debug_backtrace_get_args(void ***curpos TSRMLS_DC) { void **p = *curpos - 2; zval *arg_array, **arg; - int arg_count = (ulong) *p; + int arg_count = (int)(zend_uintptr_t) *p; *curpos -= (arg_count+2); |