cvs: ZendEngine2(PHP_5_1) / zend.c zend_globals.h zend_language_scanner.l zend_multibyte.c php-src NEWS

From: Date: Tue, 15 Nov 2005 13:29:29 +0000
Subject: cvs: ZendEngine2(PHP_5_1) / zend.c zend_globals.h zend_language_scanner.l zend_multibyte.c php-src NEWS
Groups: php.zend-engine.cvs 
Request: Send a blank email to php-zend-engine-cvs+get-4332@lists.php.net to get a copy of this message
dmitry Tue Nov 15 08:29:29 2005 EDT Modified files: (Branch: PHP_5_1) /php-src NEWS /ZendEngine2 zend.c zend_globals.h zend_language_scanner.l zend_multibyte.c Log: Fixed bug #35147 (__HALT_COMPILER() breaks with --enable-zend-multibyte) http://cvs.php.net/diff.php/php-src/NEWS?r1=1.2027.2.188&r2=1.2027.2.189&ty=u Index: php-src/NEWS diff -u php-src/NEWS:1.2027.2.188 php-src/NEWS:1.2027.2.189 --- php-src/NEWS:1.2027.2.188 Tue Nov 15 06:13:35 2005 +++ php-src/NEWS Tue Nov 15 08:29:15 2005 @@ -9,6 +9,8 @@ - Fixed bug #35179 (tokenizer extension needs T_HALT_COMPILER). (Greg) - Fixed bug #35176 (include()/require()/*_once() produce wrong error messages about main()). (Dmitry) +- Fixed bug #35147 (__HALT_COMPILER() breaks with --enable-zend-multibyte). + (Dmitry, Moriyoshi) - Fixed bug #35142 (SOAP Client/Server Complex Object Support). (Dmitry) - Fixed bug #35135 (PDOStatment without related PDO object may crash). (Ilia) - Fixed bug #35091 (SoapClient leaks memory). (Dmitry) http://cvs.php.net/diff.php/ZendEngine2/zend.c?r1=1.308.2.3&r2=1.308.2.4&ty=u Index: ZendEngine2/zend.c diff -u ZendEngine2/zend.c:1.308.2.3 ZendEngine2/zend.c:1.308.2.4 --- ZendEngine2/zend.c:1.308.2.3 Mon Nov 7 07:24:55 2005 +++ ZendEngine2/zend.c Tue Nov 15 08:29:28 2005 @@ -17,7 +17,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: zend.c,v 1.308.2.3 2005/11/07 12:24:55 dmitry Exp $ */ +/* $Id: zend.c,v 1.308.2.4 2005/11/15 13:29:28 dmitry Exp $ */ #include "zend.h" #include "zend_extensions.h" @@ -78,6 +78,9 @@ ZEND_INI_BEGIN() ZEND_INI_ENTRY("error_reporting", NULL, ZEND_INI_ALL, OnUpdateErrorReporting) STD_ZEND_INI_BOOLEAN("zend.ze1_compatibility_mode", "0", ZEND_INI_ALL, OnUpdateBool, ze1_compatibility_mode, zend_executor_globals, executor_globals) +#ifdef ZEND_MULTIBYTE + STD_ZEND_INI_BOOLEAN("detect_unicode", "1", ZEND_INI_ALL, OnUpdateBool, detect_unicode, zend_compiler_globals, compiler_globals) +#endif ZEND_INI_END() http://cvs.php.net/diff.php/ZendEngine2/zend_globals.h?r1=1.141&r2=1.141.2.1&ty=u Index: ZendEngine2/zend_globals.h diff -u ZendEngine2/zend_globals.h:1.141 ZendEngine2/zend_globals.h:1.141.2.1 --- ZendEngine2/zend_globals.h:1.141 Wed Aug 3 09:30:52 2005 +++ ZendEngine2/zend_globals.h Tue Nov 15 08:29:28 2005 @@ -17,7 +17,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: zend_globals.h,v 1.141 2005/08/03 13:30:52 sniper Exp $ */ +/* $Id: zend_globals.h,v 1.141.2.1 2005/11/15 13:29:28 dmitry Exp $ */ #ifndef ZEND_GLOBALS_H #define ZEND_GLOBALS_H @@ -135,6 +135,7 @@ #ifdef ZEND_MULTIBYTE zend_encoding **script_encoding_list; int script_encoding_list_size; + zend_bool detect_unicode; zend_encoding *internal_encoding; http://cvs.php.net/diff.php/ZendEngine2/zend_language_scanner.l?r1=1.131.2.2&r2=1.131.2.3&ty=u Index: ZendEngine2/zend_language_scanner.l diff -u ZendEngine2/zend_language_scanner.l:1.131.2.2 ZendEngine2/zend_language_scanner.l:1.131.2.3 --- ZendEngine2/zend_language_scanner.l:1.131.2.2 Fri Oct 21 09:22:05 2005 +++ ZendEngine2/zend_language_scanner.l Tue Nov 15 08:29:28 2005 @@ -19,7 +19,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: zend_language_scanner.l,v 1.131.2.2 2005/10/21 13:22:05 dmitry Exp $ */ +/* $Id: zend_language_scanner.l,v 1.131.2.3 2005/11/15 13:29:28 dmitry Exp $ */ #define yyleng SCNG(yy_leng) #define yytext SCNG(yy_text) @@ -506,7 +506,9 @@ return zend_stream_ftell(yyin TSRMLS_CC) - offset_from_the_end; } else { - return -1; + /* The entire file is in the buffer; probably zend multibyte + is enabled */ + return (yy_c_buf_p - (YY_CURRENT_BUFFER)->yy_ch_buf); } } http://cvs.php.net/diff.php/ZendEngine2/zend_multibyte.c?r1=1.4&r2=1.4.2.1&ty=u Index: ZendEngine2/zend_multibyte.c diff -u ZendEngine2/zend_multibyte.c:1.4 ZendEngine2/zend_multibyte.c:1.4.2.1 --- ZendEngine2/zend_multibyte.c:1.4 Wed Aug 3 09:30:55 2005 +++ ZendEngine2/zend_multibyte.c Tue Nov 15 08:29:29 2005 @@ -17,7 +17,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: zend_multibyte.c,v 1.4 2005/08/03 13:30:55 sniper Exp $ */ +/* $Id: zend_multibyte.c,v 1.4.2.1 2005/11/15 13:29:29 dmitry Exp $ */ #include "zend.h" #include "zend_compile.h" @@ -994,11 +994,13 @@ return onetime_encoding; } - /* check out bom(byte order mark) and see if containing wchars */ - script_encoding = zend_multibyte_detect_unicode(TSRMLS_C); - if (script_encoding != NULL) { - /* bom or wchar detection is prior to 'script_encoding' option */ - return script_encoding; + if (CG(detect_unicode)) { + /* check out bom(byte order mark) and see if containing wchars */ + script_encoding = zend_multibyte_detect_unicode(TSRMLS_C); + if (script_encoding != NULL) { + /* bom or wchar detection is prior to 'script_encoding' option */ + return script_encoding; + } } /* if no script_encoding specified, just leave alone */

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