Re: [ZEND-ENGINE-CVS] cvs: Zend / zend.c zend_execute_API.c zend_globals.h

From: Date: Thu, 10 Oct 2002 16:31:28 +0000
Subject: Re: [ZEND-ENGINE-CVS] cvs: Zend / zend.c zend_execute_API.c zend_globals.h
References: 1  Groups: php.zend-engine.cvs 
Request: Send a blank email to php-zend-engine-cvs+get-486@lists.php.net to get a copy of this message
Just a reminder: if globals are changed, it's good to change API number, since new version is not binary compatible with old anymore. I don't know if this should be done each time (I'd say yes, but maybe it's not practical), but it needs to be kept in mind, I think. IA>> iliaa Thu Oct 10 12:27:52 2002 EDT IA>> IA>> Modified files: IA>> /Zend zend.c zend_execute_API.c zend_globals.h IA>> Log: IA>> This patch fixes handling of floats on locales where decimal point is not a IA>> '.'. Problem is best demonstrated by bug #17079. IA>> IA>> IA>> Index: Zend/zend.c IA>> diff -u Zend/zend.c:1.157 Zend/zend.c:1.158 IA>> --- Zend/zend.c:1.157 Tue Sep 24 06:58:33 2002 IA>> +++ Zend/zend.c Thu Oct 10 12:27:51 2002 IA>> @@ -154,6 +154,19 @@ IA>> expr_copy->value.str.len = sizeof("Object")-1; IA>> expr_copy->value.str.val = estrndup("Object", IA>> expr_copy->value.str.len); IA>> break; IA>> + case IS_DOUBLE: IA>> + *expr_copy = *expr; IA>> + zval_copy_ctor(expr_copy); IA>> + convert_to_string(expr_copy); IA>> + IA>> + /* locale hanling */ IA>> + if (EG(float_separator)[0] != '.') { IA>> + char *p = expr_copy->value.str.val; IA>> + if ((p = strchr(p, '.'))) { IA>> + *p = EG(float_separator)[0]; IA>> + } IA>> + } IA>> + break; IA>> default: IA>> *expr_copy = *expr; IA>> zval_copy_ctor(expr_copy); IA>> Index: Zend/zend_execute_API.c IA>> diff -u Zend/zend_execute_API.c:1.154 Zend/zend_execute_API.c:1.155 IA>> --- Zend/zend_execute_API.c:1.154 Wed Oct 9 10:17:53 2002 IA>> +++ Zend/zend_execute_API.c Thu Oct 10 12:27:52 2002 IA>> @@ -166,6 +166,8 @@ IA>> #ifdef ZEND_WIN32 IA>> EG(timed_out) = 0; IA>> #endif IA>> + IA>> + EG(float_separator)[0] = '.'; IA>> } IA>> IA>> IA>> Index: Zend/zend_globals.h IA>> diff -u Zend/zend_globals.h:1.91 Zend/zend_globals.h:1.92 IA>> --- Zend/zend_globals.h:1.91 Mon Sep 23 08:00:38 2002 IA>> +++ Zend/zend_globals.h Thu Oct 10 12:27:52 2002 IA>> @@ -207,6 +207,9 @@ IA>> IA>> HashTable *ini_directives; IA>> IA>> + /* locale stuff */ IA>> + char float_separator[1]; IA>> + IA>> void *reserved[ZEND_MAX_RESERVED_RESOURCES]; IA>> }; IA>> IA>> IA>> IA>> IA>> -- Stanislav Malyshev, Zend Products Engineer stas@zend.com http://www.zend.com/ +972-3-6139665 ext.109

« previous php.zend-engine.cvs (#486) next »