]> granicus.if.org Git - php/commitdiff
- Add convert_to_number_ex()
authorAndi Gutmans <andi@php.net>
Fri, 15 Oct 1999 06:25:42 +0000 (06:25 +0000)
committerAndi Gutmans <andi@php.net>
Fri, 15 Oct 1999 06:25:42 +0000 (06:25 +0000)
Zend/zend_operators.h

index d0d71e97ab52127381645329134d8264a293de6d..0add5a936d5c377d1051fd431fc48107e98b783f 100644 (file)
@@ -118,4 +118,12 @@ ZEND_API void zendi_smart_strcmp(zval *result, zval *s1, zval *s2);
                convert_to_boolean(*ppzv);                                                      \
        }
 
+#define convert_scalar_to_number_ex(ppzv)                                                      \
+       if ((*ppzv)->type!=IS_LONG && (*ppzv)->type!=IS_DOUBLE) {               \
+               if (!(*ppzv)->is_ref) {                                                                         \
+                       SEPARATE_ZVAL(ppzv);                                                                    \
+               }                                                                                                                       \
+               convert_scalar_to_number(*ppzv);                                                        \
+       }
+
 #endif