this is breaking the CVS ZE2 build, since it depends on changes made
in Zend that haven't been made in ZendEngine2
moving the changes over *seems* to fix it but boy do i not know...
i'm attaching a diff of the changes for information
2002-10-10 Ilia Alshanetsky <[EMAIL PROTECTED]>
* ext/standard/formatted_print.c
ext/standard/string.c:
This patch fixes handling of floats on locales where decimal point is not a
'.'. Problem is best demonstrated by bug #17079.
? b17079.txt
Index: zend.c
===================================================================
RCS file: /repository/ZendEngine2/zend.c,v
retrieving revision 1.185
diff -u -r1.185 zend.c
--- zend.c 7 Oct 2002 21:20:23 -0000 1.185
+++ zend.c 12 Oct 2002 07:52:38 -0000
@@ -156,6 +156,19 @@
expr_copy->value.str.val = estrndup("Object",
expr_copy->value.str.len);
#endif
break;
+ case IS_DOUBLE:
+ *expr_copy = *expr;
+ zval_copy_ctor(expr_copy);
+ convert_to_string(expr_copy);
+
+ /* locale handling */
+ if (EG(float_separator)[0] != '.') {
+ char *p = expr_copy->value.str.val;
+ if ((p = strchr(p, '.'))) {
+ *p = EG(float_separator)[0];
+ }
+ }
+ break;
default:
*expr_copy = *expr;
zval_copy_ctor(expr_copy);
Index: zend_execute_API.c
===================================================================
RCS file: /repository/ZendEngine2/zend_execute_API.c,v
retrieving revision 1.180
diff -u -r1.180 zend_execute_API.c
--- zend_execute_API.c 9 Oct 2002 14:21:40 -0000 1.180
+++ zend_execute_API.c 12 Oct 2002 07:52:38 -0000
@@ -180,6 +180,8 @@
EG(current_execute_data) = NULL;
EG(This) = NULL;
+
+ EG(float_separator)[0] = '.';
}
Index: zend_globals.h
===================================================================
RCS file: /repository/ZendEngine2/zend_globals.h,v
retrieving revision 1.107
diff -u -r1.107 zend_globals.h
--- zend_globals.h 7 Oct 2002 21:20:23 -0000 1.107
+++ zend_globals.h 12 Oct 2002 07:52:39 -0000
@@ -209,6 +209,9 @@
struct _zend_execute_data *current_execute_data;
+ /* locale stuff */
+ char float_separator[1];
+
void *reserved[ZEND_MAX_RESERVED_RESOURCES];
};
--
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php