mirror of
https://github.com/php/php-src.git
synced 2024-11-29 04:46:07 +08:00
- Commiting Sterling's new multi_convert* functions
This commit is contained in:
parent
d57e56ab4c
commit
715774bed7
@ -488,7 +488,51 @@ ZEND_API void convert_to_object(zval *op)
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
ZEND_API void multi_convert_to_long_ex(int argc, ...)
|
||||
{
|
||||
zval **arg;
|
||||
va_list ap;
|
||||
|
||||
va_start(ap, argc);
|
||||
|
||||
while (argc--) {
|
||||
arg = va_arg(ap, zval **);
|
||||
convert_to_long_ex(arg);
|
||||
}
|
||||
|
||||
va_end(ap);
|
||||
}
|
||||
|
||||
ZEND_API void multi_convert_to_double_ex(int argc, ...)
|
||||
{
|
||||
zval **arg;
|
||||
va_list ap;
|
||||
|
||||
va_start(ap, argc);
|
||||
|
||||
while (argc--) {
|
||||
arg = va_arg(ap, zval **);
|
||||
convert_to_double_ex(arg);
|
||||
}
|
||||
|
||||
va_end(ap);
|
||||
}
|
||||
|
||||
ZEND_API void multi_convert_to_string_ex(int argc, ...)
|
||||
{
|
||||
zval **arg;
|
||||
va_list ap;
|
||||
|
||||
va_start(ap, argc);
|
||||
|
||||
while (argc--) {
|
||||
arg = va_arg(ap, zval **);
|
||||
convert_to_string_ex(arg);
|
||||
}
|
||||
|
||||
va_end(ap);
|
||||
}
|
||||
|
||||
ZEND_API int add_function(zval *result, zval *op1, zval *op2)
|
||||
{
|
||||
zval op1_copy, op2_copy;
|
||||
|
@ -132,6 +132,9 @@ ZEND_API void convert_to_null(zval *op);
|
||||
ZEND_API void convert_to_boolean(zval *op);
|
||||
ZEND_API void convert_to_array(zval *op);
|
||||
ZEND_API void convert_to_object(zval *op);
|
||||
ZEND_API void multi_convert_to_long_ex(int argc, ...);
|
||||
ZEND_API void multi_convert_to_double_ex(int argc, ...);
|
||||
ZEND_API void multi_convert_to_string_ex(int argc, ...);
|
||||
ZEND_API int add_char_to_string(zval *result, zval *op1, zval *op2);
|
||||
ZEND_API int add_string_to_string(zval *result, zval *op1, zval *op2);
|
||||
#define convert_to_string(op) _convert_to_string((op) ZEND_FILE_LINE_CC)
|
||||
|
Loading…
Reference in New Issue
Block a user