[PHP-CVS-DAILY] cvs: php-src / ChangeLog
changelog Wed Nov 26 01:32:18 2008 UTC Modified files: /php-srcChangeLog Log: ChangeLog update http://cvs.php.net/viewvc.cgi/php-src/ChangeLog?r1=1.3239r2=1.3240diff_format=u Index: php-src/ChangeLog diff -u php-src/ChangeLog:1.3239 php-src/ChangeLog:1.3240 --- php-src/ChangeLog:1.3239Tue Nov 25 01:32:34 2008 +++ php-src/ChangeLog Wed Nov 26 01:32:17 2008 @@ -1,3 +1,467 @@ +2008-11-25 Ilia Alshanetsky [EMAIL PROTECTED] + +* ext/sqlite3/libsqlite/sqlite3.c + ext/sqlite3/libsqlite/sqlite3.h + ext/sqlite3/libsqlite/sqlite3ext.h: + + MFB: Upgraded bundled sqlite to version 3.6.6.1. + +* (PHP_5_3) + NEWS + ext/sqlite3/libsqlite/sqlite3.c + ext/sqlite3/libsqlite/sqlite3.h + ext/sqlite3/libsqlite/sqlite3ext.h: + + Upgraded bundled sqlite to version 3.6.6.1 + +2008-11-25 Stanislav Malyshev [EMAIL PROTECTED] + +* ZendEngine2/zend_API.c + ZendEngine2/zend_API.c: + cleanup + +* (PHP_5_3) + ext/standard/tests/array/array_key_exists.phpt + ext/standard/tests/array/array_key_exists_object1.phpt + ext/standard/tests/array/array_key_exists_object2.phpt + ext/standard/tests/array/array_key_exists_variation2.phpt + ext/standard/tests/array/array_walk_object1.phpt + ext/standard/tests/array/array_walk_objects.phpt + ext/standard/tests/array/array_walk_rec_objects.phpt + ext/standard/tests/array/array_walk_recursive_object1.phpt + ext/standard/tests/array/current_variation1.phpt + ext/standard/tests/array/end_variation1.phpt + ext/standard/tests/array/key_variation1.phpt + ext/standard/tests/array/next_variation1.phpt + ext/standard/tests/array/prev_variation1.phpt + ext/standard/tests/array/reset_variation1.phpt: + fix tests for array/object BC + +2008-11-25 Felipe Pena [EMAIL PROTECTED] + +* (PHP_5_3) + ZendEngine2/zend_execute_API.c: + - Fixed bug #46665 (Triggering autoload with a variable classname causes + truncated autoload param) + +2008-11-25 Ant Phillips [EMAIL PROTECTED] + +* ext/standard/tests/file/chmod_variation3.phpt + ext/standard/tests/file/chmod_variation3.phpt + ext/standard/tests/file/copy_variation12-win32.phpt + ext/standard/tests/file/disk_free_space_error.phpt + ext/standard/tests/file/feof_basic.phpt + ext/standard/tests/file/feof_basic.phpt + ext/standard/tests/file/fflush_error.phpt + ext/standard/tests/file/fgets_socket_variation1.phpt + ext/standard/tests/file/fgets_socket_variation1.phpt + ext/standard/tests/file/file_get_contents_variation4.phpt + ext/standard/tests/file/file_get_contents_variation4.phpt + ext/standard/tests/file/file_variation9.phpt + ext/standard/tests/file/file_variation9.phpt + ext/standard/tests/file/filegroup_variation1.phpt + ext/standard/tests/file/filegroup_variation1.phpt + ext/standard/tests/file/fopen_variation17.phpt + ext/standard/tests/file/fopen_variation17.phpt + ext/standard/tests/file/fpassthru_error.phpt + ext/standard/tests/file/is_readable_variation1.phpt + ext/standard/tests/file/parse_ini_file_variation1.phpt + ext/standard/tests/file/parse_ini_file_variation1.phpt + ext/standard/tests/file/pathinfo_basic1.phpt + ext/standard/tests/file/pathinfo_basic1.phpt + ext/standard/tests/file/pathinfo_variation1.phpt + ext/standard/tests/file/pathinfo_variation1.phpt + ext/standard/tests/file/rename_variation-win32.phpt + ext/standard/tests/file/rename_variation12.phpt + ext/standard/tests/file/rename_variation12.phpt + ext/standard/tests/file/touch_variation1.phpt + ext/standard/tests/file/touch_variation1.phpt + ext/standard/tests/file/touch_variation3.phpt + ext/standard/tests/file/touch_variation3.phpt + ext/standard/tests/file/unlink_variation8.phpt + ext/standard/tests/file/unlink_variation8.phpt: + + file chmod_variation3.phpt was initially added on branch PHP_5_2. + +* (PHP_5_2) + ext/standard/tests/file/001-win32.phpt + ext/standard/tests/file/005_variation2-win32.phpt + ext/standard/tests/file/005_variation2-win32.phpt + ext/standard/tests/file/006_error.phpt + ext/standard/tests/file/007_error.phpt + ext/standard/tests/file/basename_error.phpt + ext/standard/tests/file/basename_error.phpt + ext/standard/tests/file/bug41655_1.phpt + ext/standard/tests/file/chmod_variation4.phpt + ext/standard/tests/file/chmod_variation4.phpt + ext/standard/tests/file/dirname_basic.phpt + ext/standard/tests/file/dirname_basic.phpt + ext/standard/tests/file/dirname_error.phpt + ext/standard/tests/file/dirname_error.phpt + ext/standard/tests/file/disk.phpt + ext/standard/tests/file/disk_free_space_variation.phpt + ext/standard/tests/file/disk_total_space_error.phpt +
Re: [PHP-CVS] cvs: php-src(PHP_5_3) /ext/standard array.c basic_functions.c
On 24.11.2008 21:12, Stanislav Malyshev wrote: stas Mon Nov 24 18:12:17 2008 UTC Modified files: (Branch: PHP_5_3) /php-src/ext/standard array.c basic_functions.c Log: restore BC for arrays [DOC] natsort, natcasesort, usort, uasort, uksort, array_flip, array_unique still won't work with objects All these tests fail after your patch: /local/qa/5_3.zts/ext/standard/tests/array/array_key_exists.phpt /local/qa/5_3.zts/ext/standard/tests/array/array_key_exists_object1.phpt /local/qa/5_3.zts/ext/standard/tests/array/array_key_exists_object2.phpt /local/qa/5_3.zts/ext/standard/tests/array/array_key_exists_variation2.phpt /local/qa/5_3.zts/ext/standard/tests/array/array_walk_object1.phpt /local/qa/5_3.zts/ext/standard/tests/array/array_walk_objects.phpt /local/qa/5_3.zts/ext/standard/tests/array/array_walk_rec_objects.phpt /local/qa/5_3.zts/ext/standard/tests/array/array_walk_recursive_object1.phpt /local/qa/5_3.zts/ext/standard/tests/array/current_variation1.phpt /local/qa/5_3.zts/ext/standard/tests/array/end_variation1.phpt /local/qa/5_3.zts/ext/standard/tests/array/key_variation1.phpt /local/qa/5_3.zts/ext/standard/tests/array/next_variation1.phpt /local/qa/5_3.zts/ext/standard/tests/array/prev_variation1.phpt /local/qa/5_3.zts/ext/standard/tests/array/reset_variation1.phpt -- Wbr, Antony Dovgal -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-CVS] cvs: php-src(PHP_5_3) /ext/standard array.c basic_functions.c
Hi! All these tests fail after your patch: /local/qa/5_3.zts/ext/standard/tests/array/array_key_exists.phpt /local/qa/5_3.zts/ext/standard/tests/array/array_key_exists_object1.phpt /local/qa/5_3.zts/ext/standard/tests/array/array_key_exists_object2.phpt /local/qa/5_3.zts/ext/standard/tests/array/array_key_exists_variation2.phpt /local/qa/5_3.zts/ext/standard/tests/array/array_walk_object1.phpt /local/qa/5_3.zts/ext/standard/tests/array/array_walk_objects.phpt /local/qa/5_3.zts/ext/standard/tests/array/array_walk_rec_objects.phpt /local/qa/5_3.zts/ext/standard/tests/array/array_walk_recursive_object1.phpt /local/qa/5_3.zts/ext/standard/tests/array/current_variation1.phpt /local/qa/5_3.zts/ext/standard/tests/array/end_variation1.phpt /local/qa/5_3.zts/ext/standard/tests/array/key_variation1.phpt /local/qa/5_3.zts/ext/standard/tests/array/next_variation1.phpt /local/qa/5_3.zts/ext/standard/tests/array/prev_variation1.phpt /local/qa/5_3.zts/ext/standard/tests/array/reset_variation1.phpt These tests expect BC breakage, which this patch fixes. So they need to be fixed, I guess. -- Stanislav Malyshev, Zend Software Architect [EMAIL PROTECTED] http://www.zend.com/ (408)253-8829 MSN: [EMAIL PROTECTED] -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-CVS] cvs: php-src(PHP_5_3) /ext/standard array.c basic_functions.c
On 25.11.2008 12:15, Stanislav Malyshev wrote: Hi! All these tests fail after your patch: ... These tests expect BC breakage, which this patch fixes. So they need to be fixed, I guess. Does this mean you didn't run the tests before applying the patch? Or does this mean you've just ignored them? In either case, please fix the tests, if you're sure they need fixing. -- Wbr, Antony Dovgal -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php-src(PHP_5_3) /ext/standard/tests/array array_key_exists.phpt array_key_exists_object1.phpt array_key_exists_object2.phpt array_key_exists_variation2.phpt array_walk_object1.phpt arr
stasTue Nov 25 22:13:45 2008 UTC Modified files: (Branch: PHP_5_3) /php-src/ext/standard/tests/array array_key_exists.phpt array_key_exists_object1.phpt array_key_exists_object2.phpt array_key_exists_variation2.phpt array_walk_object1.phpt array_walk_objects.phpt array_walk_rec_objects.phpt array_walk_recursive_object1.phpt current_variation1.phpt end_variation1.phpt key_variation1.phpt next_variation1.phpt prev_variation1.phpt reset_variation1.phpt Log: fix tests for array/object BC http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/array/array_key_exists.phpt?r1=1.1.2.3.2.2r2=1.1.2.3.2.3diff_format=u Index: php-src/ext/standard/tests/array/array_key_exists.phpt diff -u php-src/ext/standard/tests/array/array_key_exists.phpt:1.1.2.3.2.2 php-src/ext/standard/tests/array/array_key_exists.phpt:1.1.2.3.2.3 --- php-src/ext/standard/tests/array/array_key_exists.phpt:1.1.2.3.2.2 Fri Aug 29 03:05:43 2008 +++ php-src/ext/standard/tests/array/array_key_exists.phpt Tue Nov 25 22:13:44 2008 @@ -280,23 +280,13 @@ bool(false) *** Testing operation on objects *** - -Warning: array_key_exists() expects parameter 2 to be array, object given in %s on line %d -NULL - -Warning: array_key_exists() expects parameter 2 to be array, object given in %s on line %d -NULL - -Warning: array_key_exists() expects parameter 2 to be array, object given in %s on line %d -NULL - -Warning: array_key_exists() expects parameter 2 to be array, object given in %s on line %d -NULL - -Warning: array_key_exists() expects parameter 2 to be array, object given in %s on line %d -NULL +bool(false) +bool(false) +bool(true) +bool(false) +bool(true) bool(true) -Warning: array_key_exists() expects parameter 2 to be array, object given in %s on line %d -NULL +Warning: array_key_exists(): The first argument should be either a string or an integer in %s on line %d +bool(false) Done http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/array/array_key_exists_object1.phpt?r1=1.1.4.3r2=1.1.4.4diff_format=u Index: php-src/ext/standard/tests/array/array_key_exists_object1.phpt diff -u php-src/ext/standard/tests/array/array_key_exists_object1.phpt:1.1.4.3 php-src/ext/standard/tests/array/array_key_exists_object1.phpt:1.1.4.4 --- php-src/ext/standard/tests/array/array_key_exists_object1.phpt:1.1.4.3 Fri Aug 29 03:05:43 2008 +++ php-src/ext/standard/tests/array/array_key_exists_object1.phpt Tue Nov 25 22:13:44 2008 @@ -52,15 +52,11 @@ -- Do not assign a value to $class1-var3 -- $key = var1: - -Warning: array_key_exists() expects parameter 2 to be array, object given in %s on line %d -NULL +bool(true) $key = var3: - -Warning: array_key_exists() expects parameter 2 to be array, object given in %s on line %d -NULL +bool(true) $class1: -object(myClass)#%d (3) { +object(myClass)#1 (3) { [var1]= string(1) a [var2]= @@ -71,11 +67,9 @@ -- Assign a value to $class2-var3 -- $key = var3: - -Warning: array_key_exists() expects parameter 2 to be array, object given in %s on line %d -NULL +bool(true) $class2: -object(myClass)#%d (3) { +object(myClass)#2 (3) { [var1]= string(1) x [var2]= http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/array/array_key_exists_object2.phpt?r1=1.1.4.3r2=1.1.4.4diff_format=u Index: php-src/ext/standard/tests/array/array_key_exists_object2.phpt diff -u php-src/ext/standard/tests/array/array_key_exists_object2.phpt:1.1.4.3 php-src/ext/standard/tests/array/array_key_exists_object2.phpt:1.1.4.4 --- php-src/ext/standard/tests/array/array_key_exists_object2.phpt:1.1.4.3 Fri Aug 29 03:05:43 2008 +++ php-src/ext/standard/tests/array/array_key_exists_object2.phpt Tue Nov 25 22:13:44 2008 @@ -54,19 +54,13 @@ -- Do not assign a value to $class1-var3 -- $key = var1: - -Warning: array_key_exists() expects parameter 2 to be array, object given in %s on line %d -NULL +bool(true) $key = var2: - -Warning: array_key_exists() expects parameter 2 to be array, object given in %s on line %d -NULL +bool(false) $key = var3: - -Warning: array_key_exists() expects parameter 2 to be array, object given in %s on line %d -NULL +bool(false) $class1: -object(myClass)#%d (3) { +object(myClass)#1 (3) { [var1]= string(1) a [var2:protected]= @@ -77,11 +71,9 @@ -- Assign a value to $class2-var3 -- $key = var3: - -Warning: array_key_exists() expects parameter 2 to be array, object given in %s on line
[PHP-CVS] cvs: php-src(PHP_5_3) / NEWS /ext/sqlite3/libsqlite sqlite3.c sqlite3.h sqlite3ext.h
iliaa Tue Nov 25 23:50:51 2008 UTC Modified files: (Branch: PHP_5_3) /php-srcNEWS /php-src/ext/sqlite3/libsqlite sqlite3.c sqlite3.h sqlite3ext.h Log: Upgraded bundled sqlite to version 3.6.6.1 http://cvs.php.net/viewvc.cgi/php-src/NEWS?r1=1.2027.2.547.2.965.2.389r2=1.2027.2.547.2.965.2.390diff_format=u Index: php-src/NEWS diff -u php-src/NEWS:1.2027.2.547.2.965.2.389 php-src/NEWS:1.2027.2.547.2.965.2.390 --- php-src/NEWS:1.2027.2.547.2.965.2.389 Tue Nov 25 09:56:31 2008 +++ php-src/NEWSTue Nov 25 23:50:31 2008 @@ -2,7 +2,7 @@ ||| ?? ??? 200?, PHP 5.3.0 Alpha 3 - Upgraded bundled PCRE to version 7.8. (Nuno) -- Upgraded bundled sqlite to version 3.6.2. (Scott) +- Upgraded bundled sqlite to version 3.6.6.1. (Scott, Ilia) - Moved ext/msql to PECL. (Derick, Lukas) http://cvs.php.net/viewvc.cgi/php-src/ext/sqlite3/libsqlite/sqlite3.c?r1=1.1.2.10r2=1.1.2.11diff_format=u Index: php-src/ext/sqlite3/libsqlite/sqlite3.c diff -u php-src/ext/sqlite3/libsqlite/sqlite3.c:1.1.2.10 php-src/ext/sqlite3/libsqlite/sqlite3.c:1.1.2.11 --- php-src/ext/sqlite3/libsqlite/sqlite3.c:1.1.2.10Sat Nov 22 13:41:21 2008 +++ php-src/ext/sqlite3/libsqlite/sqlite3.c Tue Nov 25 23:50:32 2008 @@ -4,7 +4,7 @@ /** ** This file is an amalgamation of many separate C source files from SQLite -** version 3.6.6. By combining all the individual C code files into this +** version 3.6.6.1. By combining all the individual C code files into this ** single large file, the entire code can be compiled as a one translation ** unit. This allows many compilers to do optimizations that would not be ** possible if the files were compiled separately. Performance improvements @@ -21,7 +21,7 @@ ** is also in a separate file. This file contains only code for the core ** SQLite library. ** -** This amalgamation was generated on 2008-11-19 21:08:14 UTC. +** This amalgamation was generated on 2008-11-22 14:31:32 UTC. */ #define SQLITE_CORE 1 #define SQLITE_AMALGAMATION 1 @@ -45,7 +45,7 @@ * ** Internal interface definitions for SQLite. ** -** @(#) $Id: sqlite3.c,v 1.1.2.10 2008/11/22 13:41:21 pajoye Exp $ +** @(#) $Id: sqlite3.c,v 1.1.2.11 2008/11/25 23:50:32 iliaa Exp $ */ #ifndef _SQLITEINT_H_ #define _SQLITEINT_H_ @@ -74,7 +74,7 @@ ** ** This file defines various limits of what SQLite can process. ** -** @(#) $Id: sqlite3.c,v 1.1.2.10 2008/11/22 13:41:21 pajoye Exp $ +** @(#) $Id: sqlite3.c,v 1.1.2.11 2008/11/25 23:50:32 iliaa Exp $ */ /* @@ -401,7 +401,7 @@ ** If none of the above are defined, then set SQLITE_SYSTEM_MALLOC as ** the default. */ -#if defined(SQLITE_SYSTEM_MALLOC)+defined(SQLITE_MEMDEBUG)+ defined(SQLITE_MEMORY_SIZE)+defined(SQLITE_MMAP_HEAP_SIZE)+defined(SQLITE_POW2_MEMORY_SIZE)1 +#if defined(SQLITE_SYSTEM_MALLOC)+defined(SQLITE_MEMDEBUG)+defined(SQLITE_MEMORY_SIZE)+defined(SQLITE_MMAP_HEAP_SIZE)+defined(SQLITE_POW2_MEMORY_SIZE)1 # error At most one of the following compile-time configuration options\ is allows: SQLITE_SYSTEM_MALLOC, SQLITE_MEMDEBUG, SQLITE_MEMORY_SIZE,\ SQLITE_MMAP_HEAP_SIZE, SQLITE_POW2_MEMORY_SIZE @@ -487,7 +487,7 @@ ** the version number) and changes its name to sqlite3.h as ** part of the build process. ** -** @(#) $Id: sqlite3.c,v 1.1.2.10 2008/11/22 13:41:21 pajoye Exp $ +** @(#) $Id: sqlite3.c,v 1.1.2.11 2008/11/25 23:50:32 iliaa Exp $ */ #ifndef _SQLITE3_H_ #define _SQLITE3_H_ @@ -564,7 +564,7 @@ ** with the value (X*100 + Y*1000 + Z) where X, Y, and Z ** are the major version, minor version, and release number. */ -#define SQLITE_VERSION 3.6.6 +#define SQLITE_VERSION 3.6.6.1 #define SQLITE_VERSION_NUMBER 3006006 /* @@ -7202,7 +7202,7 @@ ** This is the header file for the generic hash-table implemenation ** used in SQLite. ** -** $Id: sqlite3.c,v 1.1.2.10 2008/11/22 13:41:21 pajoye Exp $ +** $Id: sqlite3.c,v 1.1.2.11 2008/11/25 23:50:32 iliaa Exp $ */ #ifndef _SQLITE_HASH_H_ #define _SQLITE_HASH_H_ @@ -7753,7 +7753,7 @@ ** subsystem. See comments in the source code for a detailed description ** of what each interface routine does. ** -** @(#) $Id: sqlite3.c,v 1.1.2.10 2008/11/22 13:41:21 pajoye Exp $ +** @(#) $Id: sqlite3.c,v 1.1.2.11 2008/11/25 23:50:32 iliaa Exp $ */ #ifndef _BTREE_H_ #define _BTREE_H_ @@ -7984,7 +7984,7 @@ ** or VDBE. The VDBE implements an abstract machine that runs a ** simple program to access and modify the underlying database. ** -** $Id: sqlite3.c,v 1.1.2.10 2008/11/22 13:41:21 pajoye Exp $ +** $Id: sqlite3.c,v 1.1.2.11 2008/11/25 23:50:32 iliaa Exp $ */ #ifndef _SQLITE_VDBE_H_ #define _SQLITE_VDBE_H_ @@ -8375,7 +8375,7 @@ ** subsystem. The page cache subsystem reads and
[PHP-CVS] cvs: php-src /ext/sqlite3/libsqlite sqlite3.c sqlite3.h sqlite3ext.h
iliaa Tue Nov 25 23:53:34 2008 UTC Modified files: /php-src/ext/sqlite3/libsqlite sqlite3.c sqlite3.h sqlite3ext.h Log: MFB: Upgraded bundled sqlite to version 3.6.6.1. http://cvs.php.net/viewvc.cgi/php-src/ext/sqlite3/libsqlite/sqlite3.c?r1=1.11r2=1.12diff_format=u Index: php-src/ext/sqlite3/libsqlite/sqlite3.c diff -u php-src/ext/sqlite3/libsqlite/sqlite3.c:1.11 php-src/ext/sqlite3/libsqlite/sqlite3.c:1.12 --- php-src/ext/sqlite3/libsqlite/sqlite3.c:1.11Sat Nov 22 13:46:17 2008 +++ php-src/ext/sqlite3/libsqlite/sqlite3.c Tue Nov 25 23:53:33 2008 @@ -4,7 +4,7 @@ /** ** This file is an amalgamation of many separate C source files from SQLite -** version 3.6.6. By combining all the individual C code files into this +** version 3.6.6.1. By combining all the individual C code files into this ** single large file, the entire code can be compiled as a one translation ** unit. This allows many compilers to do optimizations that would not be ** possible if the files were compiled separately. Performance improvements @@ -21,7 +21,7 @@ ** is also in a separate file. This file contains only code for the core ** SQLite library. ** -** This amalgamation was generated on 2008-11-19 21:08:14 UTC. +** This amalgamation was generated on 2008-11-22 14:31:32 UTC. */ #define SQLITE_CORE 1 #define SQLITE_AMALGAMATION 1 @@ -45,7 +45,7 @@ * ** Internal interface definitions for SQLite. ** -** @(#) $Id: sqlite3.c,v 1.11 2008/11/22 13:46:17 pajoye Exp $ +** @(#) $Id: sqlite3.c,v 1.12 2008/11/25 23:53:33 iliaa Exp $ */ #ifndef _SQLITEINT_H_ #define _SQLITEINT_H_ @@ -74,7 +74,7 @@ ** ** This file defines various limits of what SQLite can process. ** -** @(#) $Id: sqlite3.c,v 1.11 2008/11/22 13:46:17 pajoye Exp $ +** @(#) $Id: sqlite3.c,v 1.12 2008/11/25 23:53:33 iliaa Exp $ */ /* @@ -487,7 +487,7 @@ ** the version number) and changes its name to sqlite3.h as ** part of the build process. ** -** @(#) $Id: sqlite3.c,v 1.11 2008/11/22 13:46:17 pajoye Exp $ +** @(#) $Id: sqlite3.c,v 1.12 2008/11/25 23:53:33 iliaa Exp $ */ #ifndef _SQLITE3_H_ #define _SQLITE3_H_ @@ -564,7 +564,7 @@ ** with the value (X*100 + Y*1000 + Z) where X, Y, and Z ** are the major version, minor version, and release number. */ -#define SQLITE_VERSION 3.6.6 +#define SQLITE_VERSION 3.6.6.1 #define SQLITE_VERSION_NUMBER 3006006 /* @@ -7202,7 +7202,7 @@ ** This is the header file for the generic hash-table implemenation ** used in SQLite. ** -** $Id: sqlite3.c,v 1.11 2008/11/22 13:46:17 pajoye Exp $ +** $Id: sqlite3.c,v 1.12 2008/11/25 23:53:33 iliaa Exp $ */ #ifndef _SQLITE_HASH_H_ #define _SQLITE_HASH_H_ @@ -7753,7 +7753,7 @@ ** subsystem. See comments in the source code for a detailed description ** of what each interface routine does. ** -** @(#) $Id: sqlite3.c,v 1.11 2008/11/22 13:46:17 pajoye Exp $ +** @(#) $Id: sqlite3.c,v 1.12 2008/11/25 23:53:33 iliaa Exp $ */ #ifndef _BTREE_H_ #define _BTREE_H_ @@ -7984,7 +7984,7 @@ ** or VDBE. The VDBE implements an abstract machine that runs a ** simple program to access and modify the underlying database. ** -** $Id: sqlite3.c,v 1.11 2008/11/22 13:46:17 pajoye Exp $ +** $Id: sqlite3.c,v 1.12 2008/11/25 23:53:33 iliaa Exp $ */ #ifndef _SQLITE_VDBE_H_ #define _SQLITE_VDBE_H_ @@ -8375,7 +8375,7 @@ ** subsystem. The page cache subsystem reads and writes a file a page ** at a time and provides a journal for rollback. ** -** @(#) $Id: sqlite3.c,v 1.11 2008/11/22 13:46:17 pajoye Exp $ +** @(#) $Id: sqlite3.c,v 1.12 2008/11/25 23:53:33 iliaa Exp $ */ #ifndef _PAGER_H_ @@ -8521,7 +8521,7 @@ ** This header file defines the interface that the sqlite page cache ** subsystem. ** -** @(#) $Id: sqlite3.c,v 1.11 2008/11/22 13:46:17 pajoye Exp $ +** @(#) $Id: sqlite3.c,v 1.12 2008/11/25 23:53:33 iliaa Exp $ */ #ifndef _PCACHE_H_ @@ -8689,7 +8689,7 @@ ** This header file is #include-ed by sqliteInt.h and thus ends up ** being included by every source file. ** -** $Id: sqlite3.c,v 1.11 2008/11/22 13:46:17 pajoye Exp $ +** $Id: sqlite3.c,v 1.12 2008/11/25 23:53:33 iliaa Exp $ */ #ifndef _SQLITE_OS_H_ #define _SQLITE_OS_H_ @@ -8971,7 +8971,7 @@ ** Source files should #include the sqliteInt.h file and let that file ** include this one indirectly. ** -** $Id: sqlite3.c,v 1.11 2008/11/22 13:46:17 pajoye Exp $ +** $Id: sqlite3.c,v 1.12 2008/11/25 23:53:33 iliaa Exp $ */ @@ -11071,7 +11071,7 @@ ** ** This file contains definitions of global variables and contants. ** -** $Id: sqlite3.c,v 1.11 2008/11/22 13:46:17 pajoye Exp $ +** $Id: sqlite3.c,v 1.12 2008/11/25 23:53:33 iliaa Exp $ */ @@ -11159,7 +11159,7 @@ ** This module implements the sqlite3_status() interface and related ** functionality.
[PHP-CVS] cvs: php-src /ext/standard array.c /ext/standard/tests/array extract_variation10.phpt extract_variation11.phpt
lbarnaudWed Nov 26 00:59:14 2008 UTC Added files: /php-src/ext/standard/tests/array extract_variation10.phpt extract_variation11.phpt Modified files: /php-src/ext/standard array.c Log: Fixed bugs #44181 #44182 (extract() and references) (robin_fernandes at uk dot ibm dot com) http://cvs.php.net/viewvc.cgi/php-src/ext/standard/array.c?r1=1.466r2=1.467diff_format=u Index: php-src/ext/standard/array.c diff -u php-src/ext/standard/array.c:1.466 php-src/ext/standard/array.c:1.467 --- php-src/ext/standard/array.c:1.466 Mon Nov 24 19:24:09 2008 +++ php-src/ext/standard/array.cWed Nov 26 00:59:13 2008 @@ -21,7 +21,7 @@ +--+ */ -/* $Id: array.c,v 1.466 2008/11/24 19:24:09 stas Exp $ */ +/* $Id: array.c,v 1.467 2008/11/26 00:59:13 lbarnaud Exp $ */ #include php.h #include php_ini.h @@ -1461,18 +1461,13 @@ if (extract_refs) { zval **orig_var; + SEPARATE_ZVAL_TO_MAKE_IS_REF(entry); + zval_add_ref(entry); + if (zend_u_hash_find(EG(active_symbol_table), Z_TYPE(final_name), Z_UNIVAL(final_name), Z_UNILEN(final_name) + 1, (void **) orig_var) == SUCCESS) { - SEPARATE_ZVAL_TO_MAKE_IS_REF(entry); - zval_add_ref(entry); zval_ptr_dtor(orig_var); *orig_var = *entry; } else { - if (Z_REFCOUNT_P(var_array) 1 || *entry == EG(uninitialized_zval_ptr)) { - SEPARATE_ZVAL_TO_MAKE_IS_REF(entry); - } else { - Z_SET_ISREF_PP(entry); - } - zval_add_ref(entry); zend_u_hash_update(EG(active_symbol_table), Z_TYPE(final_name), Z_UNIVAL(final_name), Z_UNILEN(final_name) + 1, (void **) entry, sizeof(zval *), NULL); } } else { http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/array/extract_variation10.phpt?view=markuprev=1.1 Index: php-src/ext/standard/tests/array/extract_variation10.phpt +++ php-src/ext/standard/tests/array/extract_variation10.phpt --TEST-- Test extract() function - ensure EXTR_REFS doesn't mess with isRef flag on COW references to array elements. --FILE-- ?php $a = array('foo' = 'original.foo'); $nonref = $a['foo']; $ref = $a; extract($a, EXTR_REFS); $a['foo'] = 'changed.foo'; var_dump($nonref); ? --EXPECTF-- %unicode|string%(12) original.foo http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/array/extract_variation11.phpt?view=markuprev=1.1 Index: php-src/ext/standard/tests/array/extract_variation11.phpt +++ php-src/ext/standard/tests/array/extract_variation11.phpt --TEST-- Test extract() function - ensure EXTR_REFS works when array is referenced and keys clash with variables in current scope. --FILE-- ?php $a = array('foo' = 'original.foo'); $ref = $a; $foo = 'test'; extract($a, EXTR_OVERWRITE|EXTR_REFS); $foo = 'changed.foo'; var_dump($a['foo']); ? --EXPECTF-- %unicode|string%(11) changed.foo -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php-src(PHP_5_3) /ext/standard array.c /ext/standard/tests/array extract_variation10.phpt extract_variation11.phpt
lbarnaudWed Nov 26 00:59:41 2008 UTC Added files: (Branch: PHP_5_3) /php-src/ext/standard/tests/array extract_variation10.phpt extract_variation11.phpt Modified files: /php-src/ext/standard array.c Log: MFH: Fixed bugs #44181 #44182 (extract() and references) (robin_fernandes at uk dot ibm dot com) http://cvs.php.net/viewvc.cgi/php-src/ext/standard/array.c?r1=1.308.2.21.2.37.2.46r2=1.308.2.21.2.37.2.47diff_format=u Index: php-src/ext/standard/array.c diff -u php-src/ext/standard/array.c:1.308.2.21.2.37.2.46 php-src/ext/standard/array.c:1.308.2.21.2.37.2.47 --- php-src/ext/standard/array.c:1.308.2.21.2.37.2.46 Mon Nov 24 18:12:16 2008 +++ php-src/ext/standard/array.cWed Nov 26 00:59:41 2008 @@ -21,7 +21,7 @@ +--+ */ -/* $Id: array.c,v 1.308.2.21.2.37.2.46 2008/11/24 18:12:16 stas Exp $ */ +/* $Id: array.c,v 1.308.2.21.2.37.2.47 2008/11/26 00:59:41 lbarnaud Exp $ */ #include php.h #include php_ini.h @@ -1359,18 +1359,13 @@ if (extract_refs) { zval **orig_var; + SEPARATE_ZVAL_TO_MAKE_IS_REF(entry); + zval_add_ref(entry); + if (zend_hash_find(EG(active_symbol_table), Z_STRVAL(final_name), Z_STRLEN(final_name) + 1, (void **) orig_var) == SUCCESS) { - SEPARATE_ZVAL_TO_MAKE_IS_REF(entry); - zval_add_ref(entry); zval_ptr_dtor(orig_var); *orig_var = *entry; } else { - if (Z_REFCOUNT_P(var_array) 1 || *entry == EG(uninitialized_zval_ptr)) { - SEPARATE_ZVAL_TO_MAKE_IS_REF(entry); - } else { - Z_SET_ISREF_PP(entry); - } - zval_add_ref(entry); zend_hash_update(EG(active_symbol_table), Z_STRVAL(final_name), Z_STRLEN(final_name) + 1, (void **) entry, sizeof(zval *), NULL); } } else { http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/array/extract_variation10.phpt?view=markuprev=1.1 Index: php-src/ext/standard/tests/array/extract_variation10.phpt +++ php-src/ext/standard/tests/array/extract_variation10.phpt --TEST-- Test extract() function - ensure EXTR_REFS doesn't mess with isRef flag on COW references to array elements. --FILE-- ?php $a = array('foo' = 'original.foo'); $nonref = $a['foo']; $ref = $a; extract($a, EXTR_REFS); $a['foo'] = 'changed.foo'; var_dump($nonref); ? --EXPECTF-- %unicode|string%(12) original.foo http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/array/extract_variation11.phpt?view=markuprev=1.1 Index: php-src/ext/standard/tests/array/extract_variation11.phpt +++ php-src/ext/standard/tests/array/extract_variation11.phpt --TEST-- Test extract() function - ensure EXTR_REFS works when array is referenced and keys clash with variables in current scope. --FILE-- ?php $a = array('foo' = 'original.foo'); $ref = $a; $foo = 'test'; extract($a, EXTR_OVERWRITE|EXTR_REFS); $foo = 'changed.foo'; var_dump($a['foo']); ? --EXPECTF-- %unicode|string%(11) changed.foo -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php-src(PHP_5_2) / NEWS /ext/standard array.c /ext/standard/tests/array extract_variation10.phpt extract_variation11.phpt
lbarnaudWed Nov 26 01:00:37 2008 UTC Added files: (Branch: PHP_5_2) /php-src/ext/standard/tests/array extract_variation10.phpt extract_variation11.phpt Modified files: /php-src/ext/standard array.c /php-srcNEWS Log: MFH: Fixed bugs #44181 #44182 (extract() and references) (robin_fernandes at uk dot ibm dot com) http://cvs.php.net/viewvc.cgi/php-src/ext/standard/array.c?r1=1.308.2.21.2.58r2=1.308.2.21.2.59diff_format=u Index: php-src/ext/standard/array.c diff -u php-src/ext/standard/array.c:1.308.2.21.2.58 php-src/ext/standard/array.c:1.308.2.21.2.59 --- php-src/ext/standard/array.c:1.308.2.21.2.58Thu Jun 19 12:09:21 2008 +++ php-src/ext/standard/array.cWed Nov 26 01:00:36 2008 @@ -21,7 +21,7 @@ +--+ */ -/* $Id: array.c,v 1.308.2.21.2.58 2008/06/19 12:09:21 dmitry Exp $ */ +/* $Id: array.c,v 1.308.2.21.2.59 2008/11/26 01:00:36 lbarnaud Exp $ */ #include php.h #include php_ini.h @@ -1466,20 +1466,13 @@ if (extract_refs) { zval **orig_var; + SEPARATE_ZVAL_TO_MAKE_IS_REF(entry); + zval_add_ref(entry); + if (zend_hash_find(EG(active_symbol_table), final_name.c, final_name.len+1, (void **) orig_var) == SUCCESS) { - SEPARATE_ZVAL_TO_MAKE_IS_REF(entry); - zval_add_ref(entry); - zval_ptr_dtor(orig_var); - *orig_var = *entry; } else { - if ((*var_array)-refcount 1 || *entry == EG(uninitialized_zval_ptr)) { - SEPARATE_ZVAL_TO_MAKE_IS_REF(entry); - } else { - (*entry)-is_ref = 1; - } - zval_add_ref(entry); zend_hash_update(EG(active_symbol_table), final_name.c, final_name.len+1, (void **) entry, sizeof(zval *), NULL); } } else { http://cvs.php.net/viewvc.cgi/php-src/NEWS?r1=1.2027.2.547.2.1329r2=1.2027.2.547.2.1330diff_format=u Index: php-src/NEWS diff -u php-src/NEWS:1.2027.2.547.2.1329 php-src/NEWS:1.2027.2.547.2.1330 --- php-src/NEWS:1.2027.2.547.2.1329Mon Nov 24 21:23:45 2008 +++ php-src/NEWSWed Nov 26 01:00:36 2008 @@ -8,6 +8,10 @@ inconsistent results). (Arnaud) - Fixed bug #46626 (mb_convert_case does not handle apostrophe correctly). (Ilia) +- Fixed bug #44182 (extract($a, EXTR_REFS) can fail to split copy-on-write + references). (robin_fernandes at uk dot ibm dot com) +- Fixed bug #44181 (extract($a, EXTR_OVERWRITE|EXTR_REFS) can fail to create + references to $a). (robin_fernandes at uk dot ibm dot com) 20 Nov 2008, PHP 5.2.7RC4 - Added logging option for error_log to send directly to SAPI. (Stas) http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/array/extract_variation10.phpt?view=markuprev=1.1 Index: php-src/ext/standard/tests/array/extract_variation10.phpt +++ php-src/ext/standard/tests/array/extract_variation10.phpt --TEST-- Test extract() function - ensure EXTR_REFS doesn't mess with isRef flag on COW references to array elements. --FILE-- ?php $a = array('foo' = 'original.foo'); $nonref = $a['foo']; $ref = $a; extract($a, EXTR_REFS); $a['foo'] = 'changed.foo'; var_dump($nonref); ? --EXPECTF-- %unicode|string%(12) original.foo http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/array/extract_variation11.phpt?view=markuprev=1.1 Index: php-src/ext/standard/tests/array/extract_variation11.phpt +++ php-src/ext/standard/tests/array/extract_variation11.phpt --TEST-- Test extract() function - ensure EXTR_REFS works when array is referenced and keys clash with variables in current scope. --FILE-- ?php $a = array('foo' = 'original.foo'); $ref = $a; $foo = 'test'; extract($a, EXTR_OVERWRITE|EXTR_REFS); $foo = 'changed.foo'; var_dump($a['foo']); ? --EXPECTF-- %unicode|string%(11) changed.foo -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php-src /ext/standard php_fopen_wrapper.c
lbarnaudWed Nov 26 01:20:10 2008 UTC Modified files: /php-src/ext/standard php_fopen_wrapper.c Log: Fixed bug #42473 (ob_start php://output and headers) http://cvs.php.net/viewvc.cgi/php-src/ext/standard/php_fopen_wrapper.c?r1=1.65r2=1.66diff_format=u Index: php-src/ext/standard/php_fopen_wrapper.c diff -u php-src/ext/standard/php_fopen_wrapper.c:1.65 php-src/ext/standard/php_fopen_wrapper.c:1.66 --- php-src/ext/standard/php_fopen_wrapper.c:1.65 Tue Nov 11 00:44:36 2008 +++ php-src/ext/standard/php_fopen_wrapper.cWed Nov 26 01:20:10 2008 @@ -17,7 +17,7 @@ | Hartmut Holzgraefe [EMAIL PROTECTED] | +--+ */ -/* $Id: php_fopen_wrapper.c,v 1.65 2008/11/11 00:44:36 lbarnaud Exp $ */ +/* $Id: php_fopen_wrapper.c,v 1.66 2008/11/26 01:20:10 lbarnaud Exp $ */ #include stdio.h #include stdlib.h @@ -51,18 +51,11 @@ } /* }}} */ -static int php_stream_output_flush(php_stream *stream TSRMLS_DC) /* {{{ */ -{ - sapi_flush(TSRMLS_C); - return 0; -} -/* }}} */ - php_stream_ops php_stream_output_ops = { php_stream_output_write, php_stream_output_read, php_stream_output_close, - php_stream_output_flush, + NULL, /* flush */ Output, NULL, /* seek */ NULL, /* cast */ -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php-src(PHP_5_3) /ext/standard php_fopen_wrapper.c
lbarnaudWed Nov 26 01:20:31 2008 UTC Modified files: (Branch: PHP_5_3) /php-src/ext/standard php_fopen_wrapper.c Log: MFH: Fixed bug #42473 (ob_start php://output and headers) http://cvs.php.net/viewvc.cgi/php-src/ext/standard/php_fopen_wrapper.c?r1=1.45.2.4.2.7.2.5r2=1.45.2.4.2.7.2.6diff_format=u Index: php-src/ext/standard/php_fopen_wrapper.c diff -u php-src/ext/standard/php_fopen_wrapper.c:1.45.2.4.2.7.2.5 php-src/ext/standard/php_fopen_wrapper.c:1.45.2.4.2.7.2.6 --- php-src/ext/standard/php_fopen_wrapper.c:1.45.2.4.2.7.2.5 Tue Nov 11 00:44:55 2008 +++ php-src/ext/standard/php_fopen_wrapper.cWed Nov 26 01:20:31 2008 @@ -17,7 +17,7 @@ | Hartmut Holzgraefe [EMAIL PROTECTED] | +--+ */ -/* $Id: php_fopen_wrapper.c,v 1.45.2.4.2.7.2.5 2008/11/11 00:44:55 lbarnaud Exp $ */ +/* $Id: php_fopen_wrapper.c,v 1.45.2.4.2.7.2.6 2008/11/26 01:20:31 lbarnaud Exp $ */ #include stdio.h #include stdlib.h @@ -48,17 +48,11 @@ return 0; } -static int php_stream_output_flush(php_stream *stream TSRMLS_DC) -{ - sapi_flush(TSRMLS_C); - return 0; -} - php_stream_ops php_stream_output_ops = { php_stream_output_write, php_stream_output_read, php_stream_output_close, - php_stream_output_flush, + NULL, /* flush */ Output, NULL, /* seek */ NULL, /* cast */ -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php-src(PHP_5_2) / NEWS /ext/standard php_fopen_wrapper.c
lbarnaudWed Nov 26 01:21:11 2008 UTC Modified files: (Branch: PHP_5_2) /php-src/ext/standard php_fopen_wrapper.c /php-srcNEWS Log: MFH: Fixed bug #42473 (ob_start php://output and headers) http://cvs.php.net/viewvc.cgi/php-src/ext/standard/php_fopen_wrapper.c?r1=1.45.2.4.2.11r2=1.45.2.4.2.12diff_format=u Index: php-src/ext/standard/php_fopen_wrapper.c diff -u php-src/ext/standard/php_fopen_wrapper.c:1.45.2.4.2.11 php-src/ext/standard/php_fopen_wrapper.c:1.45.2.4.2.12 --- php-src/ext/standard/php_fopen_wrapper.c:1.45.2.4.2.11 Tue Nov 11 00:45:36 2008 +++ php-src/ext/standard/php_fopen_wrapper.cWed Nov 26 01:21:10 2008 @@ -17,7 +17,7 @@ | Hartmut Holzgraefe [EMAIL PROTECTED] | +--+ */ -/* $Id: php_fopen_wrapper.c,v 1.45.2.4.2.11 2008/11/11 00:45:36 lbarnaud Exp $ */ +/* $Id: php_fopen_wrapper.c,v 1.45.2.4.2.12 2008/11/26 01:21:10 lbarnaud Exp $ */ #include stdio.h #include stdlib.h @@ -48,17 +48,11 @@ return 0; } -static int php_stream_output_flush(php_stream *stream TSRMLS_DC) -{ - sapi_flush(TSRMLS_C); - return 0; -} - php_stream_ops php_stream_output_ops = { php_stream_output_write, php_stream_output_read, php_stream_output_close, - php_stream_output_flush, + NULL, /* flush */ Output, NULL, /* seek */ NULL, /* cast */ http://cvs.php.net/viewvc.cgi/php-src/NEWS?r1=1.2027.2.547.2.1330r2=1.2027.2.547.2.1331diff_format=u Index: php-src/NEWS diff -u php-src/NEWS:1.2027.2.547.2.1330 php-src/NEWS:1.2027.2.547.2.1331 --- php-src/NEWS:1.2027.2.547.2.1330Wed Nov 26 01:00:36 2008 +++ php-src/NEWSWed Nov 26 01:21:10 2008 @@ -12,6 +12,7 @@ references). (robin_fernandes at uk dot ibm dot com) - Fixed bug #44181 (extract($a, EXTR_OVERWRITE|EXTR_REFS) can fail to create references to $a). (robin_fernandes at uk dot ibm dot com) +- Fixed bug #42473 (ob_start php://output and headers). (Arnaud) 20 Nov 2008, PHP 5.2.7RC4 - Added logging option for error_log to send directly to SAPI. (Stas) -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php-src(PHP_5_3) /ext/standard html.c
lbarnaudWed Nov 26 02:43:16 2008 UTC Modified files: (Branch: PHP_5_3) /php-src/ext/standard html.c Log: MFB 5.2 http://cvs.php.net/viewvc.cgi/php-src/ext/standard/html.c?r1=1.111.2.2.2.14.2.12r2=1.111.2.2.2.14.2.13diff_format=u Index: php-src/ext/standard/html.c diff -u php-src/ext/standard/html.c:1.111.2.2.2.14.2.12 php-src/ext/standard/html.c:1.111.2.2.2.14.2.13 --- php-src/ext/standard/html.c:1.111.2.2.2.14.2.12 Tue Oct 21 22:08:37 2008 +++ php-src/ext/standard/html.c Wed Nov 26 02:43:16 2008 @@ -18,7 +18,7 @@ +--+ */ -/* $Id: html.c,v 1.111.2.2.2.14.2.12 2008/10/21 22:08:37 lbarnaud Exp $ */ +/* $Id: html.c,v 1.111.2.2.2.14.2.13 2008/11/26 02:43:16 lbarnaud Exp $ */ /* * HTML entity resources: @@ -527,6 +527,10 @@ do { if (this_char 0x80) { more = 0; + if(stat) { + /* we didn't finish the UTF sequence correctly */ + *status = FAILURE; + } break; } else if (this_char 0xc0) { switch (stat) { -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php-src /ext/standard html.c
lbarnaudWed Nov 26 02:43:43 2008 UTC Modified files: /php-src/ext/standard html.c Log: MFB 5.2 http://cvs.php.net/viewvc.cgi/php-src/ext/standard/html.c?r1=1.136r2=1.137diff_format=u Index: php-src/ext/standard/html.c diff -u php-src/ext/standard/html.c:1.136 php-src/ext/standard/html.c:1.137 --- php-src/ext/standard/html.c:1.136 Tue Oct 21 22:06:48 2008 +++ php-src/ext/standard/html.c Wed Nov 26 02:43:43 2008 @@ -18,7 +18,7 @@ +--+ */ -/* $Id: html.c,v 1.136 2008/10/21 22:06:48 lbarnaud Exp $ */ +/* $Id: html.c,v 1.137 2008/11/26 02:43:43 lbarnaud Exp $ */ /* * HTML entity resources: @@ -533,6 +533,10 @@ do { if (this_char 0x80) { more = 0; + if(stat) { + /* we didn't finish the UTF sequence correctly */ + *status = FAILURE; + } break; } else if (this_char 0xc0) { switch (stat) { -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php-src /ext/standard html.c html.h /ext/standard/tests/strings htmlentities-utf-2.phpt htmlentities-utf.phpt
lbarnaudWed Nov 26 02:57:32 2008 UTC Added files: /php-src/ext/standard/tests/strings htmlentities-utf-2.phpt Modified files: /php-src/ext/standard/tests/strings htmlentities-utf.phpt /php-src/ext/standard html.c html.h Log: [DOC] Added ENT_IGNORE as a compatibility flag for htmlentities() and htmlspecialchars() to skip multibyte sequences intead of returning an empty string (as iconv's //IGNORE). These functions will still never return an invalid or incomplete multibyte sequence. Example: htmlspecialchars(..., ENT_QUOTES | ENT_COMPAT, utf-8); http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/strings/htmlentities-utf.phpt?r1=1.4r2=1.5diff_format=u Index: php-src/ext/standard/tests/strings/htmlentities-utf.phpt diff -u php-src/ext/standard/tests/strings/htmlentities-utf.phpt:1.4 php-src/ext/standard/tests/strings/htmlentities-utf.phpt:1.5 --- php-src/ext/standard/tests/strings/htmlentities-utf.phpt:1.4Fri Jun 13 00:18:57 2008 +++ php-src/ext/standard/tests/strings/htmlentities-utf.phptWed Nov 26 02:57:31 2008 @@ -4,8 +4,12 @@ output_handler= --FILE-- ?php -setlocale (LC_CTYPE, C); -$strings = array(, \xD0, \xD0\x90, \xD0\x90\xD0, \xD0\x90\xD0\xB0, \xE0, A\xE0, \xE0\x80, \xE0\x80\xBE); [EMAIL PROTECTED] (LC_CTYPE, C); +$strings = array(b, b\xD0, b\xD0\x90, b\xD0\x90\xD0, b\xD0\x90\xD0\xB0, b\xE0, bA\xE0, b\xE0\x80, b\xE0\x79, b\xE0\x80\xBE, + bVoil\xE0, bClich\xE9s, + b\xFE, b\xFE\x41, b\xC3\xA9, b\xC3\x79, b\xF7\xBF\xBF\xBF, b\xFB\xBF\xBF\xBF\xBF, b\xFD\xBF\xBF\xBF\xBF\xBF, + b\x41\xF7\xF7\x42, b\x42\xFB\xFB\x42, b\x43\xFD\xFD\x42, b\x44\xF7\xF7, b\x45\xFB\xFB, b\x46\xFD\xFD + ); foreach($strings as $string) { $sc_encoded = htmlspecialchars ($string, ENT_QUOTES, utf-8); var_dump(bin2hex($sc_encoded)); @@ -13,22 +17,54 @@ var_dump(bin2hex($ent_encoded)); } ? ---EXPECT-- -unicode(8) 266c743b -unicode(8) 266c743b -unicode(0) -unicode(0) -unicode(4) d090 -unicode(4) d090 -unicode(0) -unicode(0) -unicode(8) d090d0b0 -unicode(8) d090d0b0 -unicode(0) -unicode(0) -unicode(0) -unicode(0) -unicode(0) -unicode(0) -unicode(8) 2667743b -unicode(8) 2667743b +--EXPECTF-- +%unicode|string%(8) 266c743b +%unicode|string%(8) 266c743b +%unicode|string%(0) +%unicode|string%(0) +%unicode|string%(4) d090 +%unicode|string%(4) d090 +%unicode|string%(0) +%unicode|string%(0) +%unicode|string%(8) d090d0b0 +%unicode|string%(8) d090d0b0 +%unicode|string%(0) +%unicode|string%(0) +%unicode|string%(0) +%unicode|string%(0) +%unicode|string%(0) +%unicode|string%(0) +%unicode|string%(0) +%unicode|string%(0) +%unicode|string%(8) 2667743b +%unicode|string%(8) 2667743b +%unicode|string%(0) +%unicode|string%(0) +%unicode|string%(0) +%unicode|string%(0) +%unicode|string%(0) +%unicode|string%(0) +%unicode|string%(0) +%unicode|string%(0) +%unicode|string%(4) c3a9 +%unicode|string%(16) 266561637574653b +%unicode|string%(0) +%unicode|string%(0) +%unicode|string%(8) f7bfbfbf +%unicode|string%(8) f7bfbfbf +%unicode|string%(10) fbbfbfbfbf +%unicode|string%(10) fbbfbfbfbf +%unicode|string%(12) fdbfbfbfbfbf +%unicode|string%(12) fdbfbfbfbfbf +%unicode|string%(0) +%unicode|string%(0) +%unicode|string%(0) +%unicode|string%(0) +%unicode|string%(0) +%unicode|string%(0) +%unicode|string%(0) +%unicode|string%(0) +%unicode|string%(0) +%unicode|string%(0) +%unicode|string%(0) +%unicode|string%(0) http://cvs.php.net/viewvc.cgi/php-src/ext/standard/html.c?r1=1.137r2=1.138diff_format=u Index: php-src/ext/standard/html.c diff -u php-src/ext/standard/html.c:1.137 php-src/ext/standard/html.c:1.138 --- php-src/ext/standard/html.c:1.137 Wed Nov 26 02:43:43 2008 +++ php-src/ext/standard/html.c Wed Nov 26 02:57:32 2008 @@ -18,7 +18,7 @@ +--+ */ -/* $Id: html.c,v 1.137 2008/11/26 02:43:43 lbarnaud Exp $ */ +/* $Id: html.c,v 1.138 2008/11/26 02:57:32 lbarnaud Exp $ */ /* * HTML entity resources: @@ -491,6 +491,7 @@ #define CHECK_LEN(pos, chars_need) \ if((str_len - (pos)) chars_need) {\ + *newpos = pos; \ *status = FAILURE; \ return 0; \ } @@ -535,6 +536,7 @@ more = 0; if(stat) { /* we didn't finish the UTF sequence correctly */ + --pos; *status = FAILURE; } break; @@ -1138,6 +1140,9 @@
[PHP-CVS] cvs: php-src(PHP_5_3) /ext/standard html.c html.h /ext/standard/tests/strings htmlentities-utf-2.phpt htmlentities-utf.phpt
lbarnaudWed Nov 26 03:00:06 2008 UTC Added files: (Branch: PHP_5_3) /php-src/ext/standard/tests/strings htmlentities-utf-2.phpt Modified files: /php-src/ext/standard/tests/strings htmlentities-utf.phpt /php-src/ext/standard html.c html.h Log: MFH: Added ENT_IGNORE as a compatibility flag for htmlentities() and htmlspecialchars() to skip multibyte sequences intead of returning an empty string (as iconv's //IGNORE). These functions will still never return an invalid or incomplete multibyte sequence. Fixes #43896 http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/strings/htmlentities-utf.phpt?r1=1.1.4.2r2=1.1.4.3diff_format=u Index: php-src/ext/standard/tests/strings/htmlentities-utf.phpt diff -u php-src/ext/standard/tests/strings/htmlentities-utf.phpt:1.1.4.2 php-src/ext/standard/tests/strings/htmlentities-utf.phpt:1.1.4.3 --- php-src/ext/standard/tests/strings/htmlentities-utf.phpt:1.1.4.2Wed Oct 3 05:05:37 2007 +++ php-src/ext/standard/tests/strings/htmlentities-utf.phptWed Nov 26 03:00:06 2008 @@ -4,8 +4,12 @@ output_handler= --FILE-- ?php -setlocale (LC_CTYPE, C); -$strings = array(, \xD0, \xD0\x90, \xD0\x90\xD0, \xD0\x90\xD0\xB0, \xE0, A\xE0, \xE0\x80, \xE0\x80\xBE); [EMAIL PROTECTED] (LC_CTYPE, C); +$strings = array(b, b\xD0, b\xD0\x90, b\xD0\x90\xD0, b\xD0\x90\xD0\xB0, b\xE0, bA\xE0, b\xE0\x80, b\xE0\x79, b\xE0\x80\xBE, + bVoil\xE0, bClich\xE9s, + b\xFE, b\xFE\x41, b\xC3\xA9, b\xC3\x79, b\xF7\xBF\xBF\xBF, b\xFB\xBF\xBF\xBF\xBF, b\xFD\xBF\xBF\xBF\xBF\xBF, + b\x41\xF7\xF7\x42, b\x42\xFB\xFB\x42, b\x43\xFD\xFD\x42, b\x44\xF7\xF7, b\x45\xFB\xFB, b\x46\xFD\xFD + ); foreach($strings as $string) { $sc_encoded = htmlspecialchars ($string, ENT_QUOTES, utf-8); var_dump(bin2hex($sc_encoded)); @@ -13,22 +17,54 @@ var_dump(bin2hex($ent_encoded)); } ? ---EXPECT-- -string(8) 266c743b -string(8) 266c743b -string(0) -string(0) -string(4) d090 -string(4) d090 -string(0) -string(0) -string(8) d090d0b0 -string(8) d090d0b0 -string(0) -string(0) -string(0) -string(0) -string(0) -string(0) -string(8) 2667743b -string(8) 2667743b \ No newline at end of file +--EXPECTF-- +%unicode|string%(8) 266c743b +%unicode|string%(8) 266c743b +%unicode|string%(0) +%unicode|string%(0) +%unicode|string%(4) d090 +%unicode|string%(4) d090 +%unicode|string%(0) +%unicode|string%(0) +%unicode|string%(8) d090d0b0 +%unicode|string%(8) d090d0b0 +%unicode|string%(0) +%unicode|string%(0) +%unicode|string%(0) +%unicode|string%(0) +%unicode|string%(0) +%unicode|string%(0) +%unicode|string%(0) +%unicode|string%(0) +%unicode|string%(8) 2667743b +%unicode|string%(8) 2667743b +%unicode|string%(0) +%unicode|string%(0) +%unicode|string%(0) +%unicode|string%(0) +%unicode|string%(0) +%unicode|string%(0) +%unicode|string%(0) +%unicode|string%(0) +%unicode|string%(4) c3a9 +%unicode|string%(16) 266561637574653b +%unicode|string%(0) +%unicode|string%(0) +%unicode|string%(8) f7bfbfbf +%unicode|string%(8) f7bfbfbf +%unicode|string%(10) fbbfbfbfbf +%unicode|string%(10) fbbfbfbfbf +%unicode|string%(12) fdbfbfbfbfbf +%unicode|string%(12) fdbfbfbfbfbf +%unicode|string%(0) +%unicode|string%(0) +%unicode|string%(0) +%unicode|string%(0) +%unicode|string%(0) +%unicode|string%(0) +%unicode|string%(0) +%unicode|string%(0) +%unicode|string%(0) +%unicode|string%(0) +%unicode|string%(0) +%unicode|string%(0) http://cvs.php.net/viewvc.cgi/php-src/ext/standard/html.c?r1=1.111.2.2.2.14.2.13r2=1.111.2.2.2.14.2.14diff_format=u Index: php-src/ext/standard/html.c diff -u php-src/ext/standard/html.c:1.111.2.2.2.14.2.13 php-src/ext/standard/html.c:1.111.2.2.2.14.2.14 --- php-src/ext/standard/html.c:1.111.2.2.2.14.2.13 Wed Nov 26 02:43:16 2008 +++ php-src/ext/standard/html.c Wed Nov 26 03:00:06 2008 @@ -18,7 +18,7 @@ +--+ */ -/* $Id: html.c,v 1.111.2.2.2.14.2.13 2008/11/26 02:43:16 lbarnaud Exp $ */ +/* $Id: html.c,v 1.111.2.2.2.14.2.14 2008/11/26 03:00:06 lbarnaud Exp $ */ /* * HTML entity resources: @@ -485,6 +485,7 @@ #define CHECK_LEN(pos, chars_need) \ if((str_len - (pos)) chars_need) {\ + *newpos = pos; \ *status = FAILURE; \ return 0; \ } @@ -529,6 +530,7 @@ more = 0; if(stat) { /* we didn't finish the UTF sequence correctly */ + --pos; *status = FAILURE; }
[PHP-CVS] cvs: php-src /ext/standard basic_functions.c
lbarnaudWed Nov 26 04:08:08 2008 UTC Modified files: /php-src/ext/standard basic_functions.c Log: Missed file from commit for #44181 #44182 http://cvs.php.net/viewvc.cgi/php-src/ext/standard/basic_functions.c?r1=1.940r2=1.941diff_format=u Index: php-src/ext/standard/basic_functions.c diff -u php-src/ext/standard/basic_functions.c:1.940 php-src/ext/standard/basic_functions.c:1.941 --- php-src/ext/standard/basic_functions.c:1.940Mon Nov 24 19:24:09 2008 +++ php-src/ext/standard/basic_functions.c Wed Nov 26 04:08:07 2008 @@ -17,7 +17,7 @@ +--+ */ -/* $Id: basic_functions.c,v 1.940 2008/11/24 19:24:09 stas Exp $ */ +/* $Id: basic_functions.c,v 1.941 2008/11/26 04:08:07 lbarnaud Exp $ */ #include php.h #include php_streams.h @@ -328,7 +328,7 @@ ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_INFO_EX(arginfo_extract, 0, 0, 1) - ZEND_ARG_INFO(0, arg) /* ARRAY_INFO(0, arg, 0) */ + ZEND_ARG_INFO(ZEND_SEND_PREFER_REF, arg) /* ARRAY_INFO(0, arg, 0) */ ZEND_ARG_INFO(0, extract_type) ZEND_ARG_INFO(0, prefix) ZEND_END_ARG_INFO() -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php-src(PHP_5_3) /ext/standard basic_functions.c
lbarnaudWed Nov 26 04:08:19 2008 UTC Modified files: (Branch: PHP_5_3) /php-src/ext/standard basic_functions.c Log: MFH: Missed file from commit for #44181 #44182 http://cvs.php.net/viewvc.cgi/php-src/ext/standard/basic_functions.c?r1=1.725.2.31.2.64.2.75r2=1.725.2.31.2.64.2.76diff_format=u Index: php-src/ext/standard/basic_functions.c diff -u php-src/ext/standard/basic_functions.c:1.725.2.31.2.64.2.75 php-src/ext/standard/basic_functions.c:1.725.2.31.2.64.2.76 --- php-src/ext/standard/basic_functions.c:1.725.2.31.2.64.2.75 Mon Nov 24 19:17:34 2008 +++ php-src/ext/standard/basic_functions.c Wed Nov 26 04:08:19 2008 @@ -18,7 +18,7 @@ +--+ */ -/* $Id: basic_functions.c,v 1.725.2.31.2.64.2.75 2008/11/24 19:17:34 lbarnaud Exp $ */ +/* $Id: basic_functions.c,v 1.725.2.31.2.64.2.76 2008/11/26 04:08:19 lbarnaud Exp $ */ #include php.h #include php_streams.h @@ -330,7 +330,7 @@ ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_INFO_EX(arginfo_extract, 0, 0, 1) - ZEND_ARG_INFO(0, arg) /* ARRAY_INFO(0, arg, 0) */ + ZEND_ARG_INFO(ZEND_SEND_PREFER_REF, arg) /* ARRAY_INFO(0, arg, 0) */ ZEND_ARG_INFO(0, extract_type) ZEND_ARG_INFO(0, prefix) ZEND_END_ARG_INFO() -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php-src(PHP_5_2) /ext/standard basic_functions.c
lbarnaudWed Nov 26 04:08:30 2008 UTC Modified files: (Branch: PHP_5_2) /php-src/ext/standard basic_functions.c Log: MFH: Missed file from commit for #44181 #44182 http://cvs.php.net/viewvc.cgi/php-src/ext/standard/basic_functions.c?r1=1.725.2.31.2.77r2=1.725.2.31.2.78diff_format=u Index: php-src/ext/standard/basic_functions.c diff -u php-src/ext/standard/basic_functions.c:1.725.2.31.2.77 php-src/ext/standard/basic_functions.c:1.725.2.31.2.78 --- php-src/ext/standard/basic_functions.c:1.725.2.31.2.77 Mon Nov 24 19:17:56 2008 +++ php-src/ext/standard/basic_functions.c Wed Nov 26 04:08:30 2008 @@ -17,7 +17,7 @@ +--+ */ -/* $Id: basic_functions.c,v 1.725.2.31.2.77 2008/11/24 19:17:56 lbarnaud Exp $ */ +/* $Id: basic_functions.c,v 1.725.2.31.2.78 2008/11/26 04:08:30 lbarnaud Exp $ */ #include php.h #include php_streams.h @@ -378,7 +378,7 @@ static ZEND_BEGIN_ARG_INFO_EX(arginfo_extract, 0, 0, 1) - ZEND_ARG_INFO(0, arg) /* ARRAY_INFO(0, arg, 0) */ + ZEND_ARG_INFO(ZEND_SEND_PREFER_REF, arg) /* ARRAY_INFO(0, arg, 0) */ ZEND_ARG_INFO(0, extract_type) ZEND_ARG_INFO(0, prefix) ZEND_END_ARG_INFO() -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php-src /ext/standard file.c flock_compat.h /ext/standard/tests/file userstreams_004.phpt /main/streams userspace.c
lbarnaudWed Nov 26 04:18:24 2008 UTC Added files: /php-src/ext/standard/tests/fileuserstreams_004.phpt Modified files: /php-src/ext/standard file.c flock_compat.h /php-src/main/streams userspace.c Log: Fixed bug #46673 (stream_lock call with wrong paramater) http://cvs.php.net/viewvc.cgi/php-src/ext/standard/file.c?r1=1.531r2=1.532diff_format=u Index: php-src/ext/standard/file.c diff -u php-src/ext/standard/file.c:1.531 php-src/ext/standard/file.c:1.532 --- php-src/ext/standard/file.c:1.531 Tue Nov 11 00:40:04 2008 +++ php-src/ext/standard/file.c Wed Nov 26 04:18:24 2008 @@ -21,7 +21,7 @@ +--+ */ -/* $Id: file.c,v 1.531 2008/11/11 00:40:04 lbarnaud Exp $ */ +/* $Id: file.c,v 1.532 2008/11/26 04:18:24 lbarnaud Exp $ */ /* Synced with php 3.0 revision 1.218 1999-06-16 [ssb] */ @@ -192,10 +192,10 @@ REGISTER_LONG_CONSTANT(SEEK_SET, SEEK_SET, CONST_CS | CONST_PERSISTENT); REGISTER_LONG_CONSTANT(SEEK_CUR, SEEK_CUR, CONST_CS | CONST_PERSISTENT); REGISTER_LONG_CONSTANT(SEEK_END, SEEK_END, CONST_CS | CONST_PERSISTENT); - REGISTER_LONG_CONSTANT(LOCK_SH, 1, CONST_CS | CONST_PERSISTENT); - REGISTER_LONG_CONSTANT(LOCK_EX, 2, CONST_CS | CONST_PERSISTENT); - REGISTER_LONG_CONSTANT(LOCK_UN, 3, CONST_CS | CONST_PERSISTENT); - REGISTER_LONG_CONSTANT(LOCK_NB, 4, CONST_CS | CONST_PERSISTENT); + REGISTER_LONG_CONSTANT(LOCK_SH, PHP_LOCK_SH, CONST_CS | CONST_PERSISTENT); + REGISTER_LONG_CONSTANT(LOCK_EX, PHP_LOCK_EX, CONST_CS | CONST_PERSISTENT); + REGISTER_LONG_CONSTANT(LOCK_UN, PHP_LOCK_UN, CONST_CS | CONST_PERSISTENT); + REGISTER_LONG_CONSTANT(LOCK_NB, PHP_LOCK_NB, CONST_CS | CONST_PERSISTENT); REGISTER_LONG_CONSTANT(STREAM_NOTIFY_CONNECT, PHP_STREAM_NOTIFY_CONNECT, CONST_CS | CONST_PERSISTENT); REGISTER_LONG_CONSTANT(STREAM_NOTIFY_AUTH_REQUIRED, PHP_STREAM_NOTIFY_AUTH_REQUIRED,CONST_CS | CONST_PERSISTENT); @@ -342,7 +342,7 @@ } /* flock_values contains all possible actions if (operation 4) we won't block on the lock */ - act = flock_values[act - 1] | (operation 4 ? LOCK_NB : 0); + act = flock_values[act - 1] | (operation PHP_LOCK_NB ? LOCK_NB : 0); if (php_stream_lock(stream, act)) { if (operation errno == EWOULDBLOCK arg3 PZVAL_IS_REF(arg3)) { Z_LVAL_P(arg3) = 1; http://cvs.php.net/viewvc.cgi/php-src/ext/standard/flock_compat.h?r1=1.24r2=1.25diff_format=u Index: php-src/ext/standard/flock_compat.h diff -u php-src/ext/standard/flock_compat.h:1.24 php-src/ext/standard/flock_compat.h:1.25 --- php-src/ext/standard/flock_compat.h:1.24Sat Aug 23 20:31:27 2008 +++ php-src/ext/standard/flock_compat.h Wed Nov 26 04:18:24 2008 @@ -16,7 +16,7 @@ +--+ */ -/* $Id: flock_compat.h,v 1.24 2008/08/23 20:31:27 pajoye Exp $ */ +/* $Id: flock_compat.h,v 1.25 2008/11/26 04:18:24 lbarnaud Exp $ */ #ifndef FLOCK_COMPAT_H #define FLOCK_COMPAT_H @@ -35,6 +35,12 @@ PHPAPI int flock(int fd, int operation); #endif +/* Userland LOCK_* constants */ +#define PHP_LOCK_SH 1 +#define PHP_LOCK_EX 2 +#define PHP_LOCK_UN 3 +#define PHP_LOCK_NB 4 + #ifdef PHP_WIN32 #define EWOULDBLOCK WSAEWOULDBLOCK # define fsync _commit http://cvs.php.net/viewvc.cgi/php-src/main/streams/userspace.c?r1=1.49r2=1.50diff_format=u Index: php-src/main/streams/userspace.c diff -u php-src/main/streams/userspace.c:1.49 php-src/main/streams/userspace.c:1.50 --- php-src/main/streams/userspace.c:1.49 Sat Nov 15 12:50:17 2008 +++ php-src/main/streams/userspace.cWed Nov 26 04:18:24 2008 @@ -17,11 +17,15 @@ +--+ */ -/* $Id: userspace.c,v 1.49 2008/11/15 12:50:17 lbarnaud Exp $ */ +/* $Id: userspace.c,v 1.50 2008/11/26 04:18:24 lbarnaud Exp $ */ #include php.h #include php_globals.h #include ext/standard/file.h +#include ext/standard/flock_compat.h +#ifdef HAVE_SYS_FILE_H +#include sys/file.h +#endif static int le_protocols; @@ -942,7 +946,23 @@ case PHP_STREAM_OPTION_LOCKING: MAKE_STD_ZVAL(zvalue); - ZVAL_LONG(zvalue, value); + ZVAL_LONG(zvalue, 0); + + if (value LOCK_NB) { + Z_LVAL_P(zvalue) |= PHP_LOCK_NB; + } + switch(value ~LOCK_NB) { + case LOCK_SH: + Z_LVAL_P(zvalue) |= PHP_LOCK_SH; + break; + case LOCK_EX: + Z_LVAL_P(zvalue) |= PHP_LOCK_EX; + break; + case LOCK_UN: + Z_LVAL_P(zvalue) |= PHP_LOCK_UN; +
[PHP-CVS] cvs: php-src(PHP_5_3) /ext/standard file.c flock_compat.h /ext/standard/tests/file userstreams_004.phpt /main/streams userspace.c
lbarnaudWed Nov 26 04:19:20 2008 UTC Added files: (Branch: PHP_5_3) /php-src/ext/standard/tests/fileuserstreams_004.phpt Modified files: /php-src/ext/standard file.c flock_compat.h /php-src/main/streams userspace.c Log: MFH: Fixed bug #46673 (stream_lock call with wrong paramater) http://cvs.php.net/viewvc.cgi/php-src/ext/standard/file.c?r1=1.409.2.6.2.28.2.24r2=1.409.2.6.2.28.2.25diff_format=u Index: php-src/ext/standard/file.c diff -u php-src/ext/standard/file.c:1.409.2.6.2.28.2.24 php-src/ext/standard/file.c:1.409.2.6.2.28.2.25 --- php-src/ext/standard/file.c:1.409.2.6.2.28.2.24 Sun Nov 2 18:24:34 2008 +++ php-src/ext/standard/file.c Wed Nov 26 04:19:20 2008 @@ -21,7 +21,7 @@ +--+ */ -/* $Id: file.c,v 1.409.2.6.2.28.2.24 2008/11/02 18:24:34 felipe Exp $ */ +/* $Id: file.c,v 1.409.2.6.2.28.2.25 2008/11/26 04:19:20 lbarnaud Exp $ */ /* Synced with php 3.0 revision 1.218 1999-06-16 [ssb] */ @@ -193,10 +193,10 @@ REGISTER_LONG_CONSTANT(SEEK_SET, SEEK_SET, CONST_CS | CONST_PERSISTENT); REGISTER_LONG_CONSTANT(SEEK_CUR, SEEK_CUR, CONST_CS | CONST_PERSISTENT); REGISTER_LONG_CONSTANT(SEEK_END, SEEK_END, CONST_CS | CONST_PERSISTENT); - REGISTER_LONG_CONSTANT(LOCK_SH, 1, CONST_CS | CONST_PERSISTENT); - REGISTER_LONG_CONSTANT(LOCK_EX, 2, CONST_CS | CONST_PERSISTENT); - REGISTER_LONG_CONSTANT(LOCK_UN, 3, CONST_CS | CONST_PERSISTENT); - REGISTER_LONG_CONSTANT(LOCK_NB, 4, CONST_CS | CONST_PERSISTENT); + REGISTER_LONG_CONSTANT(LOCK_SH, PHP_LOCK_SH, CONST_CS | CONST_PERSISTENT); + REGISTER_LONG_CONSTANT(LOCK_EX, PHP_LOCK_EX, CONST_CS | CONST_PERSISTENT); + REGISTER_LONG_CONSTANT(LOCK_UN, PHP_LOCK_UN, CONST_CS | CONST_PERSISTENT); + REGISTER_LONG_CONSTANT(LOCK_NB, PHP_LOCK_NB, CONST_CS | CONST_PERSISTENT); REGISTER_LONG_CONSTANT(STREAM_NOTIFY_CONNECT, PHP_STREAM_NOTIFY_CONNECT, CONST_CS | CONST_PERSISTENT); REGISTER_LONG_CONSTANT(STREAM_NOTIFY_AUTH_REQUIRED, PHP_STREAM_NOTIFY_AUTH_REQUIRED,CONST_CS | CONST_PERSISTENT); @@ -344,7 +344,7 @@ } /* flock_values contains all possible actions if (operation 4) we won't block on the lock */ - act = flock_values[act - 1] | (operation 4 ? LOCK_NB : 0); + act = flock_values[act - 1] | (operation PHP_LOCK_NB ? LOCK_NB : 0); if (php_stream_lock(stream, act)) { if (operation errno == EWOULDBLOCK arg3 PZVAL_IS_REF(arg3)) { Z_LVAL_P(arg3) = 1; http://cvs.php.net/viewvc.cgi/php-src/ext/standard/flock_compat.h?r1=1.20.2.1.2.1.2.3r2=1.20.2.1.2.1.2.4diff_format=u Index: php-src/ext/standard/flock_compat.h diff -u php-src/ext/standard/flock_compat.h:1.20.2.1.2.1.2.3 php-src/ext/standard/flock_compat.h:1.20.2.1.2.1.2.4 --- php-src/ext/standard/flock_compat.h:1.20.2.1.2.1.2.3Sat Aug 23 20:21:08 2008 +++ php-src/ext/standard/flock_compat.h Wed Nov 26 04:19:20 2008 @@ -16,7 +16,7 @@ +--+ */ -/* $Id: flock_compat.h,v 1.20.2.1.2.1.2.3 2008/08/23 20:21:08 pajoye Exp $ */ +/* $Id: flock_compat.h,v 1.20.2.1.2.1.2.4 2008/11/26 04:19:20 lbarnaud Exp $ */ #ifndef FLOCK_COMPAT_H #define FLOCK_COMPAT_H @@ -35,6 +35,12 @@ PHPAPI int flock(int fd, int operation); #endif +/* Userland LOCK_* constants */ +#define PHP_LOCK_SH 1 +#define PHP_LOCK_EX 2 +#define PHP_LOCK_UN 3 +#define PHP_LOCK_NB 4 + #ifdef PHP_WIN32 #define EWOULDBLOCK WSAEWOULDBLOCK # define fsync _commit http://cvs.php.net/viewvc.cgi/php-src/main/streams/userspace.c?r1=1.31.2.3.2.7.2.5r2=1.31.2.3.2.7.2.6diff_format=u Index: php-src/main/streams/userspace.c diff -u php-src/main/streams/userspace.c:1.31.2.3.2.7.2.5 php-src/main/streams/userspace.c:1.31.2.3.2.7.2.6 --- php-src/main/streams/userspace.c:1.31.2.3.2.7.2.5 Sat Nov 15 12:52:13 2008 +++ php-src/main/streams/userspace.cWed Nov 26 04:19:20 2008 @@ -17,11 +17,15 @@ +--+ */ -/* $Id: userspace.c,v 1.31.2.3.2.7.2.5 2008/11/15 12:52:13 lbarnaud Exp $ */ +/* $Id: userspace.c,v 1.31.2.3.2.7.2.6 2008/11/26 04:19:20 lbarnaud Exp $ */ #include php.h #include php_globals.h #include ext/standard/file.h +#include ext/standard/flock_compat.h +#ifdef HAVE_SYS_FILE_H +#include sys/file.h +#endif static int le_protocols; @@ -942,7 +946,23 @@ case PHP_STREAM_OPTION_LOCKING: MAKE_STD_ZVAL(zvalue); - ZVAL_LONG(zvalue, value); + ZVAL_LONG(zvalue, 0); + + if (value LOCK_NB) { + Z_LVAL_P(zvalue) |= PHP_LOCK_NB; + } + switch(value ~LOCK_NB) { + case LOCK_SH: +
[PHP-CVS] cvs: php-src(PHP_5_2) / NEWS /ext/standard file.c flock_compat.h /ext/standard/tests/file userstreams_004.phpt /main/streams userspace.c
lbarnaudWed Nov 26 04:20:42 2008 UTC Added files: (Branch: PHP_5_2) /php-src/ext/standard/tests/fileuserstreams_004.phpt Modified files: /php-src/ext/standard file.c flock_compat.h /php-src/main/streams userspace.c /php-srcNEWS Log: MFH: Fixed bug #46673 (stream_lock call with wrong paramater) http://cvs.php.net/viewvc.cgi/php-src/ext/standard/file.c?r1=1.409.2.6.2.36r2=1.409.2.6.2.37diff_format=u Index: php-src/ext/standard/file.c diff -u php-src/ext/standard/file.c:1.409.2.6.2.36 php-src/ext/standard/file.c:1.409.2.6.2.37 --- php-src/ext/standard/file.c:1.409.2.6.2.36 Sat Nov 1 22:39:14 2008 +++ php-src/ext/standard/file.c Wed Nov 26 04:20:41 2008 @@ -21,7 +21,7 @@ +--+ */ -/* $Id: file.c,v 1.409.2.6.2.36 2008/11/01 22:39:14 jani Exp $ */ +/* $Id: file.c,v 1.409.2.6.2.37 2008/11/26 04:20:41 lbarnaud Exp $ */ /* Synced with php 3.0 revision 1.218 1999-06-16 [ssb] */ @@ -195,10 +195,10 @@ REGISTER_LONG_CONSTANT(SEEK_SET, SEEK_SET, CONST_CS | CONST_PERSISTENT); REGISTER_LONG_CONSTANT(SEEK_CUR, SEEK_CUR, CONST_CS | CONST_PERSISTENT); REGISTER_LONG_CONSTANT(SEEK_END, SEEK_END, CONST_CS | CONST_PERSISTENT); - REGISTER_LONG_CONSTANT(LOCK_SH, 1, CONST_CS | CONST_PERSISTENT); - REGISTER_LONG_CONSTANT(LOCK_EX, 2, CONST_CS | CONST_PERSISTENT); - REGISTER_LONG_CONSTANT(LOCK_UN, 3, CONST_CS | CONST_PERSISTENT); - REGISTER_LONG_CONSTANT(LOCK_NB, 4, CONST_CS | CONST_PERSISTENT); + REGISTER_LONG_CONSTANT(LOCK_SH, PHP_LOCK_SH, CONST_CS | CONST_PERSISTENT); + REGISTER_LONG_CONSTANT(LOCK_EX, PHP_LOCK_EX, CONST_CS | CONST_PERSISTENT); + REGISTER_LONG_CONSTANT(LOCK_UN, PHP_LOCK_UN, CONST_CS | CONST_PERSISTENT); + REGISTER_LONG_CONSTANT(LOCK_NB, PHP_LOCK_NB, CONST_CS | CONST_PERSISTENT); REGISTER_LONG_CONSTANT(STREAM_NOTIFY_CONNECT, PHP_STREAM_NOTIFY_CONNECT, CONST_CS | CONST_PERSISTENT); REGISTER_LONG_CONSTANT(STREAM_NOTIFY_AUTH_REQUIRED, PHP_STREAM_NOTIFY_AUTH_REQUIRED,CONST_CS | CONST_PERSISTENT); @@ -347,7 +347,7 @@ } /* flock_values contains all possible actions if (operation 4) we won't block on the lock */ - act = flock_values[act - 1] | (operation 4 ? LOCK_NB : 0); + act = flock_values[act - 1] | (operation PHP_LOCK_NB ? LOCK_NB : 0); if (php_stream_lock(stream, act)) { if (operation errno == EWOULDBLOCK arg3 PZVAL_IS_REF(arg3)) { Z_LVAL_P(arg3) = 1; http://cvs.php.net/viewvc.cgi/php-src/ext/standard/flock_compat.h?r1=1.20.2.1.2.2r2=1.20.2.1.2.3diff_format=u Index: php-src/ext/standard/flock_compat.h diff -u php-src/ext/standard/flock_compat.h:1.20.2.1.2.2 php-src/ext/standard/flock_compat.h:1.20.2.1.2.3 --- php-src/ext/standard/flock_compat.h:1.20.2.1.2.2Mon Dec 31 07:20:12 2007 +++ php-src/ext/standard/flock_compat.h Wed Nov 26 04:20:41 2008 @@ -16,7 +16,7 @@ +--+ */ -/* $Id: flock_compat.h,v 1.20.2.1.2.2 2007/12/31 07:20:12 sebastian Exp $ */ +/* $Id: flock_compat.h,v 1.20.2.1.2.3 2008/11/26 04:20:41 lbarnaud Exp $ */ #ifndef FLOCK_COMPAT_H #define FLOCK_COMPAT_H @@ -35,6 +35,12 @@ PHPAPI int flock(int fd, int operation); #endif +/* Userland LOCK_* constants */ +#define PHP_LOCK_SH 1 +#define PHP_LOCK_EX 2 +#define PHP_LOCK_UN 3 +#define PHP_LOCK_NB 4 + #ifdef PHP_WIN32 #define EWOULDBLOCK WSAEWOULDBLOCK # define fsync _commit http://cvs.php.net/viewvc.cgi/php-src/main/streams/userspace.c?r1=1.31.2.3.2.8r2=1.31.2.3.2.9diff_format=u Index: php-src/main/streams/userspace.c diff -u php-src/main/streams/userspace.c:1.31.2.3.2.8 php-src/main/streams/userspace.c:1.31.2.3.2.9 --- php-src/main/streams/userspace.c:1.31.2.3.2.8 Mon Dec 31 07:20:15 2007 +++ php-src/main/streams/userspace.cWed Nov 26 04:20:41 2008 @@ -17,11 +17,15 @@ +--+ */ -/* $Id: userspace.c,v 1.31.2.3.2.8 2007/12/31 07:20:15 sebastian Exp $ */ +/* $Id: userspace.c,v 1.31.2.3.2.9 2008/11/26 04:20:41 lbarnaud Exp $ */ #include php.h #include php_globals.h #include ext/standard/file.h +#include ext/standard/flock_compat.h +#ifdef HAVE_SYS_FILE_H +#include sys/file.h +#endif static int le_protocols; @@ -908,7 +912,23 @@ case PHP_STREAM_OPTION_LOCKING: MAKE_STD_ZVAL(zvalue); - ZVAL_LONG(zvalue, value); + ZVAL_LONG(zvalue, 0); + + if (value LOCK_NB) { + Z_LVAL_P(zvalue) |= PHP_LOCK_NB; + } + switch(value ~LOCK_NB) { + case LOCK_SH: + Z_LVAL_P(zvalue) |= PHP_LOCK_SH; + break; +
Re: [PHP-CVS] cvs: php-src /ext/date/tests gmmktime_basic.phpt gmmktime_error.phpt gmmktime_variation1.phpt gmmktime_variation2.phpt gmmktime_variation3.phpt gmmktime_variation4.phpt gmmktime_variatio
Antony, I have changed the test case and committed. Can you please check and let me know if any problems. Thanks, Sanjay Mantoor On Mon, Nov 24, 2008 at 1:55 PM, Antony Dovgal [EMAIL PROTECTED] wrote: On 24.11.2008 09:15, Sanjay M Mantoor wrote: Antony, Yes. It takes some time in passing on linux 64 bit. But I am seeing tests are passing consistently here. Here is sample run on linux64 bit. Please let me know if any problems. Could you change this test, so that it doesn't take 3 minutes to pass, please? I believe it would make 30 minutes under valgrind, which is unreasonably long for a test. -- Wbr, Antony Dovgal -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- Thanks, Sanjay Mantoor -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php