From: Andrei Zmievski Date: Fri, 8 Sep 2006 17:19:42 +0000 (+0000) Subject: convert_to_string_with_converter_ex() X-Git-Tag: RELEASE_1_0_0RC1~1730 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=82ace0625273ac67d63c2d2d219cac19087610db;p=php convert_to_string_with_converter_ex() --- diff --git a/Zend/zend_operators.h b/Zend/zend_operators.h index 3afd3c95d5..e5dc13c4ab 100644 --- a/Zend/zend_operators.h +++ b/Zend/zend_operators.h @@ -375,6 +375,12 @@ END_EXTERN_C() #define convert_to_null_ex(ppzv) convert_to_ex_master(ppzv, null, NULL) #define convert_to_text_ex(ppzv) if (UG(unicode)) {convert_to_unicode_ex(ppzv);} else {convert_to_string_ex(ppzv);} +#define convert_to_string_with_converter_ex(ppzv, conv) \ + if (Z_TYPE_PP(ppzv) != IS_STRING) { \ + SEPARATE_ZVAL_IF_NOT_REF(ppzv); \ + convert_to_string_with_converter(*ppzv, conv); \ + } + #define convert_scalar_to_number_ex(ppzv) \ if (Z_TYPE_PP(ppzv)!=IS_LONG && Z_TYPE_PP(ppzv)!=IS_DOUBLE) { \ if (!(*ppzv)->is_ref) { \