[PHP-CVS-DAILY] cvs: php-src / ChangeLog

2008-07-08 Thread changelog
changelog   Wed Jul  9 01:32:12 2008 UTC

  Modified files:  
/php-srcChangeLog 
  Log:
  ChangeLog update
  http://cvs.php.net/viewvc.cgi/php-src/ChangeLog?r1=1.3101r2=1.3102diff_format=u
Index: php-src/ChangeLog
diff -u php-src/ChangeLog:1.3101 php-src/ChangeLog:1.3102
--- php-src/ChangeLog:1.3101Tue Jul  8 01:32:01 2008
+++ php-src/ChangeLog   Wed Jul  9 01:32:11 2008
@@ -1,3 +1,292 @@
+2008-07-08  Etienne Kneuss  [EMAIL PROTECTED]
+
+* ext/spl/spl_directory.c
+  ext/spl/tests/fileobject_003.phpt:
+  Woopsy
+
+* (PHP_5_3)
+  ext/spl/spl_directory.c
+  ext/spl/tests/dit_001.phpt
+  ext/spl/tests/fileobject_003.phpt
+  ext/spl/tests/fileobject_getfileinfo_basic.phpt:
+  MFH: - Fix filename in debug_info
+  - Fix #45345 (getPathInfo on the file instead of the dir)
+  - Remove trailing / on input
+
+* ext/spl/spl_directory.c
+  ext/spl/tests/dit_001.phpt
+  ext/spl/tests/fileobject_003.phpt
+  ext/spl/tests/fileobject_004.phpt
+  ext/spl/tests/fileobject_getfileinfo_basic.phpt:
+  - Fix filename in debug_info
+  - Fix #45345 (getPathInfo on the file instead of the dir)
+  - Remove trailing / on input
+
+2008-07-08  Derick Rethans  [EMAIL PROTECTED]
+
+* (PHP_5_3)
+  ext/date/lib/parse_date.c
+  ext/date/lib/parse_date.re
+  ext/date/tests/test-parse-from-format.phpt:
+  - MFH: Fixed bug #45459 (date_create_from_format() fails on DATE_RFC3339)
+  by
+allowing a few more format specifiers in date_create_from_format() /
+date_parse_from_format().
+
+* ext/date/lib/parse_date.c
+  ext/date/lib/parse_date.re
+  ext/date/tests/test-parse-from-format.phpt
+  ext/date/tests/test-parse-from-format.phpt:
+  - Fixed bug #45459 (date_create_from_format() fails on DATE_RFC3339) by
+allowing a few more format specifiers in date_create_from_format() /
+date_parse_from_format().
+
+* (PHP_5_3)
+  ext/date/php_date.c:
+  - MFH: Fixed a memleak (Original patch by Hannes Magnusson).
+
+* ext/date/php_date.c:
+  - Fixed a memleak (Original patch by Hannes Magnusson).
+
+2008-07-08  Pierre-Alain Joye  [EMAIL PROTECTED]
+
+* (PHP_5_3)
+  ext/gd/config.w32:
+  MFH:
+   - use _a for static lib
+   - fix logic for shared zlib
+
+* ext/gd/config.w32:
+  - use _a for static lib
+  - fix logic for shared zlib
+
+2008-07-08  Derick Rethans  [EMAIL PROTECTED]
+
+* (PHP_5_3)
+  ext/date/lib/parse_date.c
+  ext/date/lib/parse_date.re
+  ext/date/lib/parse_iso_intervals.c:
+  - MFH: Fixed some ambiguities in the date parser.
+
+* ext/date/lib/parse_date.c
+  ext/date/lib/parse_date.re
+  ext/date/lib/parse_iso_intervals.c:
+  - Fixed some ambiguities in the date parser.
+
+2008-07-08  Nuno Lopes  [EMAIL PROTECTED]
+
+* run-tests.php:
+  MFB: increase pcre.backtrack_limit
+
+* (PHP_5_3)
+  run-tests.php:
+  increase pcre.backtrack_limit so that the phpinfo.phpt test passes on my
+  computer.
+  we should really consider increase the default of this limit.. (but not
+  the recursion one though)
+
+2008-07-08  Derick Rethans  [EMAIL PROTECTED]
+
+* (PHP_5_2)
+  ext/date/php_date.c
+  ext/date/lib/parse_tz.c
+  ext/date/lib/tm2unixtime.c:
+  - MFH: Memory issues
+  - MFH: // style comments
+
+* ext/date/php_date.c
+  ext/date/php_date.c
+  ext/date/lib/parse_date.c
+  ext/date/lib/parse_date.c
+  ext/date/lib/parse_date.re
+  ext/date/lib/parse_date.re
+  ext/date/lib/parse_iso_intervals.c
+  ext/date/lib/parse_iso_intervals.c
+  ext/date/lib/tm2unixtime.c
+  ext/date/lib/tm2unixtime.c:
+  - Replaced // by /* .. */ comments.
+
+* (PHP_5_3)
+  NEWS
+  ext/date/php_date.c
+  ext/date/tests/015.phpt
+  ext/date/tests/dateinterval_errors.phpt:
+  - MFH: Fixed memory leaks and segfaults, patch by Joe Orton.
+  - MFH: Fixed bug #45038 (Crash when using DateTimeZone object returned by
+Date::getTimezone).
+
+* ext/date/tests/015.phpt
+  ext/date/tests/015.phpt
+  ext/date/tests/dateinterval_errors.phpt
+  ext/date/tests/dateinterval_errors.phpt:
+  
+  - Fixed memory leaks and segfaults, patch by Joe Orton.
+  - Fixed bug #45038 (Crash when using DateTimeZone object returned by
+Date::getTimezone).
+
+* ext/date/php_date.c:
+  - Fixed memory leaks and segfaults, patch by Joe Orton.
+  - Fixed bug #45038 (Crash when using DateTimeZone object returned by
+Date::getTimezone).
+
+2008-07-08  Dmitry Stogov  [EMAIL PROTECTED]
+
+* ZendEngine2/zend_closures.c
+  ZendEngine2/tests/closure_013.phpt
+  ZendEngine2/tests/closure_014.phpt:
+  Closure::__invoke() is fixed to support references
+
+2008-07-08  Henrique do Nascimento Angelo  [EMAIL PROTECTED]
+
+* 

[PHP-CVS-DAILY] cvs: ZendEngine2 / ChangeLog

2008-07-08 Thread changelog
changelog   Wed Jul  9 01:32:19 2008 UTC

  Modified files:  
/ZendEngine2ChangeLog 
  Log:
  ChangeLog update
  
http://cvs.php.net/viewvc.cgi/ZendEngine2/ChangeLog?r1=1.1332r2=1.1333diff_format=u
Index: ZendEngine2/ChangeLog
diff -u ZendEngine2/ChangeLog:1.1332 ZendEngine2/ChangeLog:1.1333
--- ZendEngine2/ChangeLog:1.1332Tue Jul  8 01:32:04 2008
+++ ZendEngine2/ChangeLog   Wed Jul  9 01:32:18 2008
@@ -1,3 +1,75 @@
+2008-07-08  Dmitry Stogov  [EMAIL PROTECTED]
+
+* zend_closures.c
+  tests/closure_013.phpt
+  tests/closure_014.phpt:
+  Closure::__invoke() is fixed to support references
+
+2008-07-08  Nuno Lopes  [EMAIL PROTECTED]
+
+* zend_language_scanner.c
+  zend_language_scanner_defs.h:
+  let re2c do its magic
+
+* zend_language_scanner.l:
+  MFB: fix remaining # comments issues
+
+* (PHP_5_3)
+  zend_language_scanner.c
+  zend_language_scanner_defs.h:
+  regenerate
+
+* (PHP_5_3)
+  zend_language_scanner.l:
+  now really fix once and for all the #-style comments.
+  also remove some duplicated code in ?, %, %= handlers. this also has
+  the side-effect of producing better bytecodes in some special cases
+
+2008-07-08  Dmitry Stogov  [EMAIL PROTECTED]
+
+* zend_gc.c
+  zend_gc.c
+  tests/gc_029.phpt
+  tests/gc_029.phpt
+  tests/gc_030.phpt:
+  Fixed bug #45434 (circular reference causes segfault in
+  gc_collect_cycles())
+
+* tests/gc_030.phpt
+  tests/gc_030.phpt:
+  
+  file gc_030.phpt was initially added on branch PHP_5_3.
+
+* Makefile.am
+  Zend.dsp
+  ZendTS.dsp
+  zend.h
+  zend_API.c
+  zend_closures.c
+  zend_closures.h
+  zend_compile.c
+  zend_compile.h
+  zend_default_classes.c
+  zend_execute.c
+  zend_execute_API.c
+  zend_language_parser.y
+  zend_vm_def.h
+  zend_vm_execute.h
+  zend_vm_opcodes.h
+  tests/closure_001.phpt
+  tests/closure_002.phpt
+  tests/closure_003.phpt
+  tests/closure_004.phpt
+  tests/closure_005.phpt
+  tests/closure_006.phpt
+  tests/closure_007.phpt
+  tests/closure_008.phpt
+  tests/closure_009.phpt
+  tests/closure_010.phpt
+  tests/closure_011.phpt
+  tests/closure_012.phpt:
+  Added closures support
+
 2008-07-07  Scott MacVicar  [EMAIL PROTECTED]
 
 * (PHP_5_3)
@@ -24482,7 +24554,7 @@
 2003-06-10  Jani Taskinen  [EMAIL PROTECTED]
 
 * zend_multiply.h:
-  - Missing $Id: ChangeLog,v 1.1332 2008/07/08 01:32:04 changelog Exp $ tag
+  - Missing $Id: ChangeLog,v 1.1333 2008/07/09 01:32:18 changelog Exp $ tag
 
 2003-06-10  James Cox  [EMAIL PROTECTED]
 
@@ -26206,7 +26278,7 @@
   zend_types.h
   zend_variables.c
   zend_variables.h:
-  - Added some missing CVS $Id: ChangeLog,v 1.1332 2008/07/08 01:32:04 
changelog Exp $ tags, headers and footers.
+  - Added some missing CVS $Id: ChangeLog,v 1.1333 2008/07/09 01:32:18 
changelog Exp $ tags, headers and footers.
 
 2003-01-30  Ilia Alshanetsky  [EMAIL PROTECTED]
 




[PHP-CVS] cvs: php-src / NEWS configure.in /ext/pcre php_pcre.c /ext/reflection php_reflection.c ZendEngine2 Makefile.am Zend.dsp ZendTS.dsp zend.h zend_API.c zend_closures.c zend_closures.h zend_c

2008-07-08 Thread Dmitry Stogov
dmitry  Tue Jul  8 07:05:04 2008 UTC

  Added files: 
/ZendEngine2zend_closures.c zend_closures.h 
/ZendEngine2/tests  closure_001.phpt closure_002.phpt 
closure_003.phpt closure_004.phpt 
closure_005.phpt closure_006.phpt 
closure_007.phpt closure_008.phpt 
closure_009.phpt closure_010.phpt 
closure_011.phpt closure_012.phpt 

  Modified files:  
/php-srcNEWS configure.in 
/ZendEngine2Makefile.am Zend.dsp ZendTS.dsp zend.h zend_API.c 
zend_compile.c zend_compile.h zend_default_classes.c 
zend_execute.c zend_execute_API.c 
zend_language_parser.y zend_vm_def.h zend_vm_execute.h 
zend_vm_opcodes.h 
/php-src/ext/pcre   php_pcre.c 
/php-src/ext/reflection php_reflection.c 
  Log:
  Added closures support
  
  http://cvs.php.net/viewvc.cgi/php-src/NEWS?r1=1.2162r2=1.2163diff_format=u
Index: php-src/NEWS
diff -u php-src/NEWS:1.2162 php-src/NEWS:1.2163
--- php-src/NEWS:1.2162 Wed May  7 15:51:34 2008
+++ php-src/NEWSTue Jul  8 07:05:03 2008
@@ -2,6 +2,7 @@
 |||
 ?? ??? 20??, PHP 6.0
 - Unicode support. (Andrei, Dmitry, et al)
+- Closures (Christian Seiler, Dmitry)
 
 - Changed dl() to be disabled by default. Enabled only when explicitly
   registered by the SAPI layer. Enabled only with CLI, CGI and EMBED. (Dmitry)
http://cvs.php.net/viewvc.cgi/php-src/configure.in?r1=1.657r2=1.658diff_format=u
Index: php-src/configure.in
diff -u php-src/configure.in:1.657 php-src/configure.in:1.658
--- php-src/configure.in:1.657  Mon Jun  2 16:29:25 2008
+++ php-src/configure.inTue Jul  8 07:05:03 2008
@@ -1,4 +1,4 @@
-## $Id: configure.in,v 1.657 2008/06/02 16:29:25 helly Exp $ -*- autoconf -*-
+## $Id: configure.in,v 1.658 2008/07/08 07:05:03 dmitry Exp $ -*- autoconf -*-
 dnl ## Process this file with autoconf to produce a configure script.
 
 divert(1)
@@ -1334,7 +1334,7 @@
 zend_list.c zend_indent.c zend_builtin_functions.c zend_sprintf.c \
 zend_ini.c zend_qsort.c zend_ts_hash.c zend_stream.c \
 zend_iterators.c zend_interfaces.c zend_exceptions.c zend_strtod.c \
-zend_strtol.c zend_gc.c)
+zend_strtol.c zend_gc.c zend_closures.c)
 
 if test -r $abs_srcdir/Zend/zend_objects.c; then
   PHP_ADD_SOURCES(Zend, zend_objects.c zend_object_handlers.c 
zend_objects_API.c \
http://cvs.php.net/viewvc.cgi/ZendEngine2/Makefile.am?r1=1.62r2=1.63diff_format=u
Index: ZendEngine2/Makefile.am
diff -u ZendEngine2/Makefile.am:1.62 ZendEngine2/Makefile.am:1.63
--- ZendEngine2/Makefile.am:1.62Wed Mar 26 14:23:01 2008
+++ ZendEngine2/Makefile.am Tue Jul  8 07:05:03 2008
@@ -17,7 +17,7 @@
zend_objects_API.c zend_ts_hash.c zend_stream.c \
zend_default_classes.c \
zend_iterators.c zend_interfaces.c zend_exceptions.c \
-   zend_strtod.c zend_strtod.c zend_strtol.c
+   zend_strtod.c zend_strtod.c zend_strtol.c zend_closures.c
 
 libZend_la_LDFLAGS =
 libZend_la_LIBADD = @ZEND_EXTRA_LIBS@
http://cvs.php.net/viewvc.cgi/ZendEngine2/Zend.dsp?r1=1.26r2=1.27diff_format=u
Index: ZendEngine2/Zend.dsp
diff -u ZendEngine2/Zend.dsp:1.26 ZendEngine2/Zend.dsp:1.27
--- ZendEngine2/Zend.dsp:1.26   Tue Dec  5 08:08:33 2006
+++ ZendEngine2/Zend.dspTue Jul  8 07:05:03 2008
@@ -123,6 +123,10 @@
 # End Source File
 # Begin Source File
 
+SOURCE=.\zend_closures.c
+# End Source File
+# Begin Source File
+
 SOURCE=.\zend_compile.c
 # End Source File
 # Begin Source File
http://cvs.php.net/viewvc.cgi/ZendEngine2/ZendTS.dsp?r1=1.48r2=1.49diff_format=u
Index: ZendEngine2/ZendTS.dsp
diff -u ZendEngine2/ZendTS.dsp:1.48 ZendEngine2/ZendTS.dsp:1.49
--- ZendEngine2/ZendTS.dsp:1.48 Tue Dec  5 08:08:33 2006
+++ ZendEngine2/ZendTS.dsp  Tue Jul  8 07:05:03 2008
@@ -148,6 +148,10 @@
 # End Source File
 # Begin Source File
 
+SOURCE=.\zend_closures.c
+# End Source File
+# Begin Source File
+
 SOURCE=.\zend_compile.c
 # End Source File
 # Begin Source File
http://cvs.php.net/viewvc.cgi/ZendEngine2/zend.h?r1=1.355r2=1.356diff_format=u
Index: ZendEngine2/zend.h
diff -u ZendEngine2/zend.h:1.355 ZendEngine2/zend.h:1.356
--- ZendEngine2/zend.h:1.355Fri Jun 27 18:45:15 2008
+++ ZendEngine2/zend.h  Tue Jul  8 07:05:03 2008
@@ -17,7 +17,7 @@
+--+
 */
 
-/* $Id: zend.h,v 1.355 2008/06/27 18:45:15 stas Exp $ */
+/* $Id: zend.h,v 1.356 2008/07/08 07:05:03 dmitry Exp $ */
 
 #ifndef ZEND_H
 #define ZEND_H
@@ -561,6 +561,8 @@
 #define IS_CONSTANT_TYPE_MASK  0x0f
 #define IS_CONSTANT_RT_NS_CHECK0x10
 #define IS_CONSTANT_INDEX  0x80
+#define IS_LEXICAL_VAR 0x20
+#define IS_LEXICAL_REF 0x40
 
 /* overloaded elements 

[PHP-CVS] cvs: php-src(PHP_5_3) /ext/standard info.c /ext/standard/tests/general_functions phpinfo.phpt

2008-07-08 Thread Antony Dovgal
tony2001Tue Jul  8 08:37:56 2008 UTC

  Modified files:  (Branch: PHP_5_3)
/php-src/ext/standard   info.c 
/php-src/ext/standard/tests/general_functions   phpinfo.phpt 
  Log:
  capitalize multibyte support
  
  
http://cvs.php.net/viewvc.cgi/php-src/ext/standard/info.c?r1=1.249.2.10.2.14.2.9r2=1.249.2.10.2.14.2.10diff_format=u
Index: php-src/ext/standard/info.c
diff -u php-src/ext/standard/info.c:1.249.2.10.2.14.2.9 
php-src/ext/standard/info.c:1.249.2.10.2.14.2.10
--- php-src/ext/standard/info.c:1.249.2.10.2.14.2.9 Mon Jul  7 01:25:53 2008
+++ php-src/ext/standard/info.c Tue Jul  8 08:37:56 2008
@@ -18,7 +18,7 @@
+--+
 */
 
-/* $Id: info.c,v 1.249.2.10.2.14.2.9 2008/07/07 01:25:53 sfox Exp $ */
+/* $Id: info.c,v 1.249.2.10.2.14.2.10 2008/07/08 08:37:56 tony2001 Exp $ */
 
 #include php.h
 #include php_ini.h
@@ -515,9 +515,9 @@
php_info_print_table_row(2, Zend Memory Manager, 
is_zend_mm(TSRMLS_C) ? enabled : disabled );
 
 #ifdef ZEND_MULTIBYTE
-   php_info_print_table_row(2, Zend multibyte support, 
enabled);
+   php_info_print_table_row(2, Zend Multibyte Support, 
enabled);
 #else
-   php_info_print_table_row(2, Zend multibyte support, 
disabled);
+   php_info_print_table_row(2, Zend Multibyte Support, 
disabled);
 #endif
 
 #if HAVE_IPV6
http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/general_functions/phpinfo.phpt?r1=1.1.2.2.2.2r2=1.1.2.2.2.3diff_format=u
Index: php-src/ext/standard/tests/general_functions/phpinfo.phpt
diff -u php-src/ext/standard/tests/general_functions/phpinfo.phpt:1.1.2.2.2.2 
php-src/ext/standard/tests/general_functions/phpinfo.phpt:1.1.2.2.2.3
--- php-src/ext/standard/tests/general_functions/phpinfo.phpt:1.1.2.2.2.2   
Thu Jul  3 09:46:10 2008
+++ php-src/ext/standard/tests/general_functions/phpinfo.phpt   Tue Jul  8 
08:37:56 2008
@@ -31,7 +31,7 @@
 Debug Build = %s
 Thread Safety = %s
 Zend Memory Manager = %s
-Zend multibyte support = %s
+Zend Multibyte Support = %s
 IPv6 Support = %s
 Registered PHP Streams = %s
 Registered Stream Socket Transports = %s



-- 
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP-CVS] cvs: php-src /ext/spl spl_directory.c

2008-07-08 Thread Antony Dovgal

On 05.07.2008 22:58, Marcus Boerger wrote:

Hello Antony,

  I thought all functions we use here are ext/standard and always
available. Or are we referencing non windows functions as well, if so,
could we figure that out somehow and not provide these functions at all?


Yes, they are always available, but wrong hash_find() function was used and
the code failed to find them, which caused unavoidable crash.

--
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) / NEWS

2008-07-08 Thread Jani Taskinen
janiTue Jul  8 09:26:21 2008 UTC

  Modified files:  (Branch: PHP_5_3)
/php-srcNEWS 
  Log:
  - Reorder, simplify, make it somewhat more readable and easier to read. :)
  http://cvs.php.net/viewvc.cgi/php-src/NEWS?r1=1.2027.2.547.2.965.2.191r2=1.2027.2.547.2.965.2.192diff_format=u
Index: php-src/NEWS
diff -u php-src/NEWS:1.2027.2.547.2.965.2.191 
php-src/NEWS:1.2027.2.547.2.965.2.192
--- php-src/NEWS:1.2027.2.547.2.965.2.191   Tue Jul  8 08:16:08 2008
+++ php-src/NEWSTue Jul  8 09:26:21 2008
@@ -1,32 +1,125 @@
 PHPNEWS
 |||
 ?? ??? 20??, PHP 5.3.0
-- Upgraded PCRE to version 7.7 (Nuno)
+- Upgraded bundled PCRE to version 7.7 (Nuno)
+- Upgraded bundled sqlite to version 3.5.6. (Scott)
+
+- Moved extensions to PECL (Pierre):
+  . ext/fdpf
+  . ext/ncurses
+  . ext/sybase (not maintained anymore, sybase_ct has to be used instead)
+
 - Removed the experimental RPL (master/slave) functions from mysqli. (Andrey)
 - Removed zend.ze1_compatibility_mode. (Dmitry)
 
-- Added pcre to list of standard extensions that cannot be disabled. (Marcus)
-- Added jump label operator (limited goto). (Dmitry, Sara)
-- Added hash_copy() function. (Tony)
-- Added ability to use stream wrappers in include_path (Gregory, Dmitry)
-- Added concept of delayed early binding that allows opcode caches to perform
-  class declaration (early and/or run-time binding) in exactly the same order
-  as vanila php. (Dmitry)
-- Added new error mode E_DEPRECATED which is used to inform about stuff to be
-  dropped in future PHP versions. (Lars Strojny, Felipe, Marcus)
-- Added and improved PHP syntax and semantics:
+- Changed PCRE extension to be enabled always. (Marcus)
+- Changed md5() to use improved implementation. (Solar Designer, Dmitry)
+
+- Improved PHP syntax and semantics:
+  . Added jump label operator (limited goto). (Dmitry, Sara)
   . Added NOWDOC syntax. (Gwynne Raskind, Stas, Dmitry)
   . Added HEREDOC syntax with double quotes. (Lars Strojny, Felipe)
   . Added ?: operator. (Marcus)
   . Added support for namespaces. (Dmitry, Stas, Gregory)
   . Added support for Late Static Binding. (Dmitry, Etienne Kneuss)
   . Added support for __callstatic() magic method. (Sara)
+  . Added forward_static_call(_array) to complete LSB. (Mike Lively)
   . Added support for dynamic access of static members using $foo::myFunc().
 (Etienne Kneuss)
   . Improved checks for callbacks. (Marcus)
   . Added __DIR__ constant. (Lars Strojny)
   . Added PHP_MAJOR_VERSION, PHP_MINOR_VERSION, PHP_RELEASE_VERSION,
 PHP_EXTRA_VERSION, PHP_VERSION_ID, PHP_ZTS and PHP_DEBUG constants. 
(Pierre)
+  . Added new error mode E_DEPRECATED which is used to inform about stuff to be
+dropped in future PHP versions. (Lars Strojny, Felipe, Marcus)
+
+- Improved SPL extension:
+  . Added SPL to list of standard extensions that cannot be disabled. (Marcus)
+  . Added ability to store associative information with objects in
+SplObjectStorage. (Marcus)
+  . Added ArrayAccess support to SplObjectStorage. (Marcus)
+  . Added SplDoublyLinkedList, SplStack, SplQueue classes. (Etienne)
+  . Added FilesystemIterator. (Marcus)
+  . Added GlobIterator. (Marcus)
+  . Added SplHeap, SplMinHeap, SplMaxHeap, SplPriorityQueue classes. (Etienne)
+  . Added new parameter $prepend to spl_autoload_register(). (Etienne)
+  . Added FixedArray. (Etienne, Tony)
+
+- Improved Zend Engine:
+  . Added compact handler for Zend MM storage. (Dmitry)
+  . Added + and * specifiers to zend_parse_parameters(). (Andrei)
+  . Added concept of delayed early binding that allows opcode caches to 
perform
+class declaration (early and/or run-time binding) in exactly the same order
+as vanilla PHP. (Dmitry)
+
+- Improved PHP runtime speed and memory usage:
+  . Removed direct executor recursion. (Dmitry)
+  . Use fastcall calling convention in executor on x86. (Dmitry)
+  . Use IS_CV for direct access to $this variable. (Dmitry)
+  . Use ZEND_FREE() opcode instead of ZEND_SWITCH_FREE(IS_TMP_VAR). (Dmitry)
+  . Lazy EG(active_symbol_table) initialization. (Dmitry)
+  . Optimized ZEND_RETURN opcode to not allocate and copy return value if it is
+not used. (Dmitry)
+  . Replaced all flex based scanners with re2c based scanners.
+(Marcus, Nuno, Scott)
+  . Added garbage collector. (David Wang, Dmitry).
+  . Improved PHP binary size and startup speed with GCC4 visibility control.
+(Nuno)
+  . Improved engine stack implementation for better performance and stability.
+(Dmitry)
+  . Improved memory usage by moving constants to read only memory.
+(Dmitry, Pierre)
+  . Changed exception handling. Now each op_array doesn't contain
+ZEND_HANDLE_EXCEPTION opcode in the end. (Dmitry)
+  . Optimized require_once() and include_once() by eliminating fopen(3) on
+second usage. (Dmitry)
+  . 

[PHP-CVS] cvs: php-src(PHP_5_3) / NEWS

2008-07-08 Thread Jani Taskinen
janiTue Jul  8 09:30:38 2008 UTC

  Modified files:  (Branch: PHP_5_3)
/php-srcNEWS 
  Log:
  - Some more reordering
  
http://cvs.php.net/viewvc.cgi/php-src/NEWS?r1=1.2027.2.547.2.965.2.192r2=1.2027.2.547.2.965.2.193diff_format=u
Index: php-src/NEWS
diff -u php-src/NEWS:1.2027.2.547.2.965.2.192 
php-src/NEWS:1.2027.2.547.2.965.2.193
--- php-src/NEWS:1.2027.2.547.2.965.2.192   Tue Jul  8 09:26:21 2008
+++ php-src/NEWSTue Jul  8 09:30:38 2008
@@ -32,25 +32,8 @@
 PHP_EXTRA_VERSION, PHP_VERSION_ID, PHP_ZTS and PHP_DEBUG constants. 
(Pierre)
   . Added new error mode E_DEPRECATED which is used to inform about stuff to be
 dropped in future PHP versions. (Lars Strojny, Felipe, Marcus)
-
-- Improved SPL extension:
-  . Added SPL to list of standard extensions that cannot be disabled. (Marcus)
-  . Added ability to store associative information with objects in
-SplObjectStorage. (Marcus)
-  . Added ArrayAccess support to SplObjectStorage. (Marcus)
-  . Added SplDoublyLinkedList, SplStack, SplQueue classes. (Etienne)
-  . Added FilesystemIterator. (Marcus)
-  . Added GlobIterator. (Marcus)
-  . Added SplHeap, SplMinHeap, SplMaxHeap, SplPriorityQueue classes. (Etienne)
-  . Added new parameter $prepend to spl_autoload_register(). (Etienne)
-  . Added FixedArray. (Etienne, Tony)
-
-- Improved Zend Engine:
-  . Added compact handler for Zend MM storage. (Dmitry)
-  . Added + and * specifiers to zend_parse_parameters(). (Andrei)
-  . Added concept of delayed early binding that allows opcode caches to 
perform
-class declaration (early and/or run-time binding) in exactly the same order
-as vanilla PHP. (Dmitry)
+  . Added request_order INI variable to control specifically $_REQUEST 
behavior.
+(Stas)
 
 - Improved PHP runtime speed and memory usage:
   . Removed direct executor recursion. (Dmitry)
@@ -107,19 +90,35 @@
   . Added params as optional parameter for stream_context_create(). (Sara)
   . Added ability to use stream wrappers in include_path. (Gregory, Dmitry)
 
+- Improved OpenSSL extension: (Dmitry)
+  . Added support for OpenSSL digest and cipher functions.
+  . Added access to internal values of DSA, RSA and DH keys.
+
 - Improved SOAP extension:
   . Added support for element names in context of XMLShema's any. (Dmitry)
   . Added ability to use Traversable objects instead of plain arrays.
(Joshua Reese, Dmitry)
   . Fixed possible crash bug caused by an uninitialized value. (Zdash Urf)
 
-- Improved OpenSSL extension: (Dmitry)
-  . Added support for OpenSSL digest and cipher functions.
-  . Added access to internal values of DSA, RSA and DH keys.
+- Improved SPL extension:
+  . Added SPL to list of standard extensions that cannot be disabled. (Marcus)
+  . Added ability to store associative information with objects in
+SplObjectStorage. (Marcus)
+  . Added ArrayAccess support to SplObjectStorage. (Marcus)
+  . Added SplDoublyLinkedList, SplStack, SplQueue classes. (Etienne)
+  . Added FilesystemIterator. (Marcus)
+  . Added GlobIterator. (Marcus)
+  . Added SplHeap, SplMinHeap, SplMaxHeap, SplPriorityQueue classes. (Etienne)
+  . Added new parameter $prepend to spl_autoload_register(). (Etienne)
+  . Added FixedArray. (Etienne, Tony)
+
+- Improved Zend Engine:
+  . Added compact handler for Zend MM storage. (Dmitry)
+  . Added + and * specifiers to zend_parse_parameters(). (Andrei)
+  . Added concept of delayed early binding that allows opcode caches to 
perform
+class declaration (early and/or run-time binding) in exactly the same order
+as vanilla PHP. (Dmitry)
 
-- Added hash_copy() function. (Tony)
-- Added request_order INI variable to control specifically $_REQUEST 
behavior.
-  (Stas)
 - Added new date/time functionality: (Derick)
   . date_parse_from_format(): Parse date/time strings according to a format.
   . date_create_from_format()/DateTime::createFromFormat(): Create a date/time
@@ -159,10 +158,11 @@
 applying a DateInterval on each iteration, up to an end date or limited by
 a maximum number of occurences.
 
+- Added hash_copy() function. (Tony)
 - Added ReflectionProperty::setAccessible() method that allows non-public
   property's values to be read through ::getValue(). (Derick)
 - Added msg_queue_exists() function. (Benjamin Schulz)
-- Added 3 Firebird specific attributes that can be set via PDO::setAttribute()
+- Added Firebird specific attributes that can be set via PDO::setAttribute()
   to control formatting of date/timestamp columns: PDO::FB_ATTR_DATE_FORMAT,
   PDO::FB_ATTR_TIME_FORMAT and PDO::FB_ATTR_TIMESTAMP_FORMAT. (Lars W)
 - Added gmp_testbit() function. (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) / NEWS

2008-07-08 Thread Jani Taskinen
janiTue Jul  8 09:33:49 2008 UTC

  Modified files:  (Branch: PHP_5_3)
/php-srcNEWS 
  Log:
  - We do not mention bugs that were not in any release. (DMITRY!..)
  
http://cvs.php.net/viewvc.cgi/php-src/NEWS?r1=1.2027.2.547.2.965.2.193r2=1.2027.2.547.2.965.2.194diff_format=u
Index: php-src/NEWS
diff -u php-src/NEWS:1.2027.2.547.2.965.2.193 
php-src/NEWS:1.2027.2.547.2.965.2.194
--- php-src/NEWS:1.2027.2.547.2.965.2.193   Tue Jul  8 09:30:38 2008
+++ php-src/NEWSTue Jul  8 09:33:49 2008
@@ -195,8 +195,6 @@
 
 - Fixed PECL bug #12431 (OCI8 ping functionality is broken). (Oracle Corp.)
 
-- Fixed bug #45434 (circular reference causes segfault in gc_collect_cycles()).
-  (Dmitry)
 - Fixed bug #44769 (declaring private magic methods should throw error). 
(Felipe)
 - Fixed bug #44913 (Segfault when using return in combination with nested loops
   and continue 2). (Dmitry)
@@ -242,7 +240,7 @@
 - Fixed bug #42737 (preg_split('//u') triggers a E_NOTICE with newlines). 
(Nuno)
 - Fixed bug #42736 (xmlrpc_server_call_method() crashes). (Tony)
 - Fixed bug #42657 (ini_get() returns incorrect value when default is NULL).
-  (Jani)
+  (Jani, Scott)
 - Fixed bug #42637 (SoapFault : Only http and https are allowed). (Bill Moran)
 - Fixed bug #42548 (mysqli PROCEDURE calls can't return result sets). (hartmut)
 - Fixed bug #42509 (gmp leaks memory when gmp_init() not used). (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) / NEWS

2008-07-08 Thread Scott MacVicar
scottmacTue Jul  8 10:28:52 2008 UTC

  Modified files:  (Branch: PHP_5_3)
/php-srcNEWS 
  Log:
  Add missing NEWS items.
  
http://cvs.php.net/viewvc.cgi/php-src/NEWS?r1=1.2027.2.547.2.965.2.194r2=1.2027.2.547.2.965.2.195diff_format=u
Index: php-src/NEWS
diff -u php-src/NEWS:1.2027.2.547.2.965.2.194 
php-src/NEWS:1.2027.2.547.2.965.2.195
--- php-src/NEWS:1.2027.2.547.2.965.2.194   Tue Jul  8 09:33:49 2008
+++ php-src/NEWSTue Jul  8 10:28:52 2008
@@ -14,6 +14,7 @@
 
 - Changed PCRE extension to be enabled always. (Marcus)
 - Changed md5() to use improved implementation. (Solar Designer, Dmitry)
+- Changed mhash to be a wrapper layer around the hash extesion. (Scott)
 
 - Improved PHP syntax and semantics:
   . Added jump label operator (limited goto). (Dmitry, Sara)
@@ -159,6 +160,7 @@
 a maximum number of occurences.
 
 - Added hash_copy() function. (Tony)
+- Added sha224 hash algorithm to the hash extension. (Scott)
 - Added ReflectionProperty::setAccessible() method that allows non-public
   property's values to be read through ::getValue(). (Derick)
 - Added msg_queue_exists() function. (Benjamin Schulz)
@@ -192,6 +194,8 @@
   to different characters with cp1251 and cp866. (Scott)
 - Fixed an issue in date() where a : was printed for the O modifier after a P
   modifier was used. (Derick)
+- Fixed an issue where exec() on Windows would eat the first and last double 
quotes
+  (Scott)
 
 - Fixed PECL bug #12431 (OCI8 ping functionality is broken). (Oracle Corp.)
 
@@ -224,6 +228,7 @@
   timezone). (Derick)
 - Fixed bug #43426 (crash on nested call_user_func() calls). (Dmitry)
 - Fixed bug #43323 (Wrong count abstract methods). (Felipe, Dmitry)
+- Fixed bug #43261 (Use ^ as the escape with escapeshellcmd() on Windows). 
(Scott)
 - Fixed bug #43075 (Support 2007-11-01T24:00:00+00:00). (Derick)
 - Fixed bug #43003 (Invalid timezone reported for DateTime objects constructed
   using a timestamp). (Derick)



-- 
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

2008-07-08 Thread Scott MacVicar
scottmacTue Jul  8 10:31:35 2008 UTC

  Modified files:  (Branch: PHP_5_2)
/php-srcNEWS 
  Log:
  This change was backed out of 5.2 and is now in 5.3+
  
http://cvs.php.net/viewvc.cgi/php-src/NEWS?r1=1.2027.2.547.2.1166r2=1.2027.2.547.2.1167diff_format=u
Index: php-src/NEWS
diff -u php-src/NEWS:1.2027.2.547.2.1166 php-src/NEWS:1.2027.2.547.2.1167
--- php-src/NEWS:1.2027.2.547.2.1166Wed Jun 25 12:18:21 2008
+++ php-src/NEWSTue Jul  8 10:31:34 2008
@@ -6,8 +6,6 @@
 - Fixed a crash inside PDO when trying instantiate PDORow manually (Felipe)
 - Fixed build failure of ext/mysqli with libmysql 6.0 - missing rpl
   functions. (Andrey)
-- Fixed a bug where exec() on Windows would eat the first and last double 
quotes
-  (Scott)
 - Fixed bug #45352 (Segmentation fault because of tick function on second
   request). (Dmitry)
 - Fixed bug #45312 (Segmentation fault on second request for array functions).



-- 
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) /tests/lang comments.phpt comments2.phpt script_tag.phpt

2008-07-08 Thread Nuno Lopes
nlopess Tue Jul  8 14:38:31 2008 UTC

  Added files: (Branch: PHP_5_3)
/php-src/tests/lang comments2.phpt script_tag.phpt 

  Modified files:  
/php-src/tests/lang comments.phpt 
  Log:
  add more tests for the parser. currently both fail
  
http://cvs.php.net/viewvc.cgi/php-src/tests/lang/comments.phpt?r1=1.1.2.1r2=1.1.2.2diff_format=u
Index: php-src/tests/lang/comments.phpt
diff -u php-src/tests/lang/comments.phpt:1.1.2.1 
php-src/tests/lang/comments.phpt:1.1.2.2
--- php-src/tests/lang/comments.phpt:1.1.2.1Sun Jul  6 15:40:11 2008
+++ php-src/tests/lang/comments.phptTue Jul  8 14:38:31 2008
@@ -16,7 +16,7 @@
 echo \n;
 
 ?
---EXPECTF--
+--EXPECT--
 #teste2
 #ola
 uhm # ah

http://cvs.php.net/viewvc.cgi/php-src/tests/lang/comments2.phpt?view=markuprev=1.1
Index: php-src/tests/lang/comments2.phpt
+++ php-src/tests/lang/comments2.phpt

http://cvs.php.net/viewvc.cgi/php-src/tests/lang/script_tag.phpt?view=markuprev=1.1
Index: php-src/tests/lang/script_tag.phpt
+++ php-src/tests/lang/script_tag.phpt



-- 
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP-CVS] cvs: php-src /tests/lang comments.phpt comments2.phpt script_tag.phpt

2008-07-08 Thread Nuno Lopes
nlopess Tue Jul  8 14:39:14 2008 UTC

  Modified files:  
/php-src/tests/lang comments2.phpt script_tag.phpt comments.phpt 
  Log:
  add new tests
  
http://cvs.php.net/viewvc.cgi/php-src/tests/lang/comments2.phpt?r1=1.1r2=1.2diff_format=u
Index: php-src/tests/lang/comments2.phpt
diff -u /dev/null php-src/tests/lang/comments2.phpt:1.2
--- /dev/null   Tue Jul  8 14:39:14 2008
+++ php-src/tests/lang/comments2.phpt   Tue Jul  8 14:39:13 2008
@@ -0,0 +1,9 @@
+--TEST--
+#-style comments (part 2)
+--FILEEOF--
+?php
+if (1) {
+?
+#?php }
+--EXPECT--
+#
http://cvs.php.net/viewvc.cgi/php-src/tests/lang/script_tag.phpt?r1=1.1r2=1.2diff_format=u
Index: php-src/tests/lang/script_tag.phpt
diff -u /dev/null php-src/tests/lang/script_tag.phpt:1.2
--- /dev/null   Tue Jul  8 14:39:14 2008
+++ php-src/tests/lang/script_tag.phpt  Tue Jul  8 14:39:13 2008
@@ -0,0 +1,17 @@
+--TEST--
+script tag
+--FILE--
+script language=php echo ola\n;/script
+script language=php echo ola2\n;/script
+script language='php' echo ola3\n;/script
+texto sc s script script language script language=
+script language=php
+#comment
+echo oi\n; //ignore here
+# 2nd comment
+--EXPECT--
+ola
+ola2
+ola3
+texto sc s script script language script language=
+oi
http://cvs.php.net/viewvc.cgi/php-src/tests/lang/comments.phpt?r1=1.2r2=1.3diff_format=u
Index: php-src/tests/lang/comments.phpt
diff -u php-src/tests/lang/comments.phpt:1.2 
php-src/tests/lang/comments.phpt:1.3
--- php-src/tests/lang/comments.phpt:1.2Sun Jul  6 15:40:39 2008
+++ php-src/tests/lang/comments.phptTue Jul  8 14:39:13 2008
@@ -16,7 +16,7 @@
 echo \n;
 
 ?
---EXPECTF--
+--EXPECT--
 #teste2
 #ola
 uhm # ah



-- 
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/gd gd.c

2008-07-08 Thread Antony Dovgal
tony2001Tue Jul  8 15:24:13 2008 UTC

  Modified files:  (Branch: PHP_5_3)
/php-src/ext/gd gd.c 
  Log:
  fix typo
  
  
http://cvs.php.net/viewvc.cgi/php-src/ext/gd/gd.c?r1=1.312.2.20.2.32.2.9r2=1.312.2.20.2.32.2.10diff_format=u
Index: php-src/ext/gd/gd.c
diff -u php-src/ext/gd/gd.c:1.312.2.20.2.32.2.9 
php-src/ext/gd/gd.c:1.312.2.20.2.32.2.10
--- php-src/ext/gd/gd.c:1.312.2.20.2.32.2.9 Sun Jul  6 17:07:26 2008
+++ php-src/ext/gd/gd.c Tue Jul  8 15:24:12 2008
@@ -18,7 +18,7 @@
+--+
  */
 
-/* $Id: gd.c,v 1.312.2.20.2.32.2.9 2008/07/06 17:07:26 pajoye Exp $ */
+/* $Id: gd.c,v 1.312.2.20.2.32.2.10 2008/07/08 15:24:12 tony2001 Exp $ */
 
 /* gd 1.2 is copyright 1994, 1995, Quest Protein Database Center,
Cold Spring Harbor Labs. */
@@ -4176,7 +4176,7 @@
Load a new font from specified file */
 PHP_FUNCTION(imagepsloadfont)
 {
-   zval *file;
+   char *file;
int file_len, f_ind, *font;
 #ifdef PHP_WIN32
struct stat st;



-- 
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP-CVS] cvs: php-src /ext/exif/tests exif007.phpt exif008.phpt exif009.phpt exif010.phpt exif011.phpt exif012.phpt exif013.phpt exif014.phpt exif015.phpt exif016.phpt exif017.phpt exif018.phpt exif0

2008-07-08 Thread Henrique do Nascimento Angelo
hnangeloTue Jul  8 15:34:23 2008 UTC

  Modified files:  
/php-src/ext/exif/tests exif007.phpt exif008.phpt exif009.phpt 
exif010.phpt exif011.phpt exif012.phpt 
exif013.phpt exif014.phpt exif015.phpt 
exif016.phpt exif017.phpt exif018.phpt 
exif020.phpt exif021.phpt exif022.phpt 
exif023.phpt exif024.phpt exif025.phpt 
exif026.phpt exif027.phpt 
  Log:
  Fix the expected FileDateTime
  http://cvs.php.net/viewvc.cgi/php-src/ext/exif/tests/exif007.phpt?r1=1.1r2=1.2diff_format=u
Index: php-src/ext/exif/tests/exif007.phpt
diff -u php-src/ext/exif/tests/exif007.phpt:1.1 
php-src/ext/exif/tests/exif007.phpt:1.2
--- php-src/ext/exif/tests/exif007.phpt:1.1 Mon Jul  7 23:30:29 2008
+++ php-src/ext/exif/tests/exif007.phpt Tue Jul  8 15:34:23 2008
@@ -14,7 +14,7 @@
   [uFileName]=
   unicode(12) image007.jpg
   [uFileDateTime]=
-  int(1215471672)
+  int(%d)
   [uFileSize]=
   int(283)
   [uFileType]=
http://cvs.php.net/viewvc.cgi/php-src/ext/exif/tests/exif008.phpt?r1=1.1r2=1.2diff_format=u
Index: php-src/ext/exif/tests/exif008.phpt
diff -u php-src/ext/exif/tests/exif008.phpt:1.1 
php-src/ext/exif/tests/exif008.phpt:1.2
--- php-src/ext/exif/tests/exif008.phpt:1.1 Mon Jul  7 23:30:29 2008
+++ php-src/ext/exif/tests/exif008.phpt Tue Jul  8 15:34:23 2008
@@ -14,7 +14,7 @@
   [uFileName]=
   unicode(12) image008.jpg
   [uFileDateTime]=
-  int(1215471672)
+  int(%d)
   [uFileSize]=
   int(527)
   [uFileType]=
http://cvs.php.net/viewvc.cgi/php-src/ext/exif/tests/exif009.phpt?r1=1.1r2=1.2diff_format=u
Index: php-src/ext/exif/tests/exif009.phpt
diff -u php-src/ext/exif/tests/exif009.phpt:1.1 
php-src/ext/exif/tests/exif009.phpt:1.2
--- php-src/ext/exif/tests/exif009.phpt:1.1 Mon Jul  7 23:30:29 2008
+++ php-src/ext/exif/tests/exif009.phpt Tue Jul  8 15:34:23 2008
@@ -14,7 +14,7 @@
   [uFileName]=
   unicode(12) image009.jpg
   [uFileDateTime]=
-  int(1215471672)
+  int(%d)
   [uFileSize]=
   int(527)
   [uFileType]=
http://cvs.php.net/viewvc.cgi/php-src/ext/exif/tests/exif010.phpt?r1=1.1r2=1.2diff_format=u
Index: php-src/ext/exif/tests/exif010.phpt
diff -u php-src/ext/exif/tests/exif010.phpt:1.1 
php-src/ext/exif/tests/exif010.phpt:1.2
--- php-src/ext/exif/tests/exif010.phpt:1.1 Mon Jul  7 23:30:29 2008
+++ php-src/ext/exif/tests/exif010.phpt Tue Jul  8 15:34:23 2008
@@ -14,7 +14,7 @@
   [uFileName]=
   unicode(12) image010.jpg
   [uFileDateTime]=
-  int(1215471672)
+  int(%d)
   [uFileSize]=
   int(741)
   [uFileType]=
http://cvs.php.net/viewvc.cgi/php-src/ext/exif/tests/exif011.phpt?r1=1.1r2=1.2diff_format=u
Index: php-src/ext/exif/tests/exif011.phpt
diff -u php-src/ext/exif/tests/exif011.phpt:1.1 
php-src/ext/exif/tests/exif011.phpt:1.2
--- php-src/ext/exif/tests/exif011.phpt:1.1 Mon Jul  7 23:30:29 2008
+++ php-src/ext/exif/tests/exif011.phpt Tue Jul  8 15:34:23 2008
@@ -14,7 +14,7 @@
   [uFileName]=
   unicode(12) image011.jpg
   [uFileDateTime]=
-  int(1215471672)
+  int(%d)
   [uFileSize]=
   int(741)
   [uFileType]=
http://cvs.php.net/viewvc.cgi/php-src/ext/exif/tests/exif012.phpt?r1=1.1r2=1.2diff_format=u
Index: php-src/ext/exif/tests/exif012.phpt
http://cvs.php.net/viewvc.cgi/php-src/ext/exif/tests/exif013.phpt?r1=1.1r2=1.2diff_format=u
Index: php-src/ext/exif/tests/exif013.phpt
http://cvs.php.net/viewvc.cgi/php-src/ext/exif/tests/exif014.phpt?r1=1.1r2=1.2diff_format=u
Index: php-src/ext/exif/tests/exif014.phpt
http://cvs.php.net/viewvc.cgi/php-src/ext/exif/tests/exif015.phpt?r1=1.1r2=1.2diff_format=u
Index: php-src/ext/exif/tests/exif015.phpt
http://cvs.php.net/viewvc.cgi/php-src/ext/exif/tests/exif016.phpt?r1=1.1r2=1.2diff_format=u
Index: php-src/ext/exif/tests/exif016.phpt
diff -u php-src/ext/exif/tests/exif016.phpt:1.1 
php-src/ext/exif/tests/exif016.phpt:1.2
--- php-src/ext/exif/tests/exif016.phpt:1.1 Mon Jul  7 23:30:29 2008
+++ php-src/ext/exif/tests/exif016.phpt Tue Jul  8 15:34:23 2008
@@ -14,7 +14,7 @@
   [uFileName]=
   unicode(13) image016.tiff
   [uFileDateTime]=
-  int(1215471677)
+  int(%d)
   [uFileSize]=
   int(1874)
   [uFileType]=
http://cvs.php.net/viewvc.cgi/php-src/ext/exif/tests/exif017.phpt?r1=1.1r2=1.2diff_format=u
Index: php-src/ext/exif/tests/exif017.phpt
diff -u php-src/ext/exif/tests/exif017.phpt:1.1 
php-src/ext/exif/tests/exif017.phpt:1.2
--- php-src/ext/exif/tests/exif017.phpt:1.1 Mon Jul  7 23:30:29 2008
+++ php-src/ext/exif/tests/exif017.phpt Tue Jul  8 15:34:23 2008
@@ -14,7 +14,7 @@
   [uFileName]=
   unicode(13) image017.tiff
   [uFileDateTime]=
-  int(1215471677)
+  int(%d)
   [uFileSize]=
   int(1874)
   [uFileType]=
http://cvs.php.net/viewvc.cgi/php-src/ext/exif/tests/exif018.phpt?r1=1.1r2=1.2diff_format=u
Index: php-src/ext/exif/tests/exif018.phpt
diff -u php-src/ext/exif/tests/exif018.phpt:1.1 

[PHP-CVS] cvs: php-src /ext/date php_date.c /ext/date/tests 015.phpt dateinterval_errors.phpt

2008-07-08 Thread Derick Rethans
derick  Tue Jul  8 17:40:35 2008 UTC

  Added files: 
/php-src/ext/date/tests 015.phpt dateinterval_errors.phpt 

  Modified files:  
/php-src/ext/date   php_date.c 
  Log:
  - Fixed memory leaks and segfaults, patch by Joe Orton.
  - Fixed bug #45038 (Crash when using DateTimeZone object returned by
Date::getTimezone).
  
  
http://cvs.php.net/viewvc.cgi/php-src/ext/date/php_date.c?r1=1.189r2=1.190diff_format=u
Index: php-src/ext/date/php_date.c
diff -u php-src/ext/date/php_date.c:1.189 php-src/ext/date/php_date.c:1.190
--- php-src/ext/date/php_date.c:1.189   Sat Jun  7 22:41:02 2008
+++ php-src/ext/date/php_date.c Tue Jul  8 17:40:34 2008
@@ -16,7 +16,7 @@
+--+
  */
 
-/* $Id: php_date.c,v 1.189 2008/06/07 22:41:02 tony2001 Exp $ */
+/* $Id: php_date.c,v 1.190 2008/07/08 17:40:34 derick Exp $ */
 
 #include php.h
 #include php_streams.h
@@ -1341,14 +1341,6 @@
timelib_update_ts(t, tzi);
ts = timelib_date_to_int(t, error2);
 
-   /* if tz_info is not a copy, avoid double free */
-   if (now-tz_info != tzi  now-tz_info) {
-   timelib_tzinfo_dtor(now-tz_info);
-   }
-   if (t-tz_info != tzi) {
-   timelib_tzinfo_dtor(t-tz_info);
-   }
-
timelib_time_dtor(now);
timelib_time_dtor(t);
 
@@ -1779,7 +1771,7 @@
newdateobj-time-tz_abbr = strdup(it_time-tz_abbr);
}
if (it_time-tz_info) {
-   newdateobj-time-tz_info = 
timelib_tzinfo_clone(it_time-tz_info);
+   newdateobj-time-tz_info = it_time-tz_info;
}

*data = iterator-current;
@@ -1966,7 +1958,7 @@
new_obj-time-tz_abbr = strdup(old_obj-time-tz_abbr);
}
if (old_obj-time-tz_info) {
-   new_obj-time-tz_info = 
timelib_tzinfo_clone(old_obj-time-tz_info);
+   new_obj-time-tz_info = old_obj-time-tz_info;
}

return new_ov;
@@ -2185,9 +2177,6 @@
php_date_obj *intern = (php_date_obj *)object;
 
if (intern-time) {
-   if (intern-time-tz_info) {
-   timelib_tzinfo_dtor(intern-time-tz_info);
-   }
timelib_time_dtor(intern-time);
}
 
@@ -2220,16 +2209,10 @@
php_period_obj *intern = (php_period_obj *)object;
 
if (intern-start) {
-   if (intern-start-tz_info) {
-   timelib_tzinfo_dtor(intern-start-tz_info);
-   }
timelib_time_dtor(intern-start);
}
 
if (intern-end) {
-   if (intern-end-tz_info) {
-   timelib_tzinfo_dtor(intern-end-tz_info);
-   }
timelib_time_dtor(intern-end);
}
 
@@ -2268,14 +2251,11 @@
timelib_time   *now;
timelib_tzinfo *tzi;
timelib_error_container *err = NULL;
-   int free_tzi = 0, type = TIMELIB_ZONETYPE_ID, new_dst;
+   int type = TIMELIB_ZONETYPE_ID, new_dst;
char *new_abbr;
timelib_sll new_offset;

if (dateobj-time) {
-   if (dateobj-time-tz_info) {
-   timelib_tzinfo_dtor(dateobj-time-tz_info);
-   }
timelib_time_dtor(dateobj-time);
}
if (format) {
@@ -2303,8 +2283,7 @@
tzobj = (php_timezone_obj *) 
zend_object_store_get_object(timezone_object TSRMLS_CC);
switch (tzobj-type) {
case TIMELIB_ZONETYPE_ID:
-   tzi = timelib_tzinfo_clone(tzobj-tzi.tz);
-   free_tzi = 1;
+   tzi = tzobj-tzi.tz;
break;
case TIMELIB_ZONETYPE_OFFSET:
new_offset = tzobj-tzi.utc_offset;
@@ -2317,8 +2296,7 @@
}
type = tzobj-type;
} else if (dateobj-time-tz_info) {
-   tzi = timelib_tzinfo_clone(dateobj-time-tz_info);
-   free_tzi = 1;
+   tzi = dateobj-time-tz_info;
} else {
tzi = get_timezone_info(TSRMLS_C);
}
@@ -2345,12 +2323,6 @@
 
dateobj-time-have_relative = 0;
 
-   if (type == TIMELIB_ZONETYPE_ID  now-tz_info != tzi) {
-   timelib_tzinfo_dtor(now-tz_info);
-   }
-   if (free_tzi) {
-   timelib_tzinfo_dtor(tzi);
-   }
timelib_time_dtor(now);
 
return 1;
@@ -2860,10 +2832,7 @@
if (tzobj-type != TIMELIB_ZONETYPE_ID) {
php_error_docref(NULL TSRMLS_CC, E_WARNING, Can only do this 
for zones with ID for now);
}
-   if (dateobj-time-tz_info) {
-   timelib_tzinfo_dtor(dateobj-time-tz_info);
-   }
-   timelib_set_timezone(dateobj-time, 
timelib_tzinfo_clone(tzobj-tzi.tz));
+   

[PHP-CVS] cvs: php-src(PHP_5_3) / NEWS /ext/date php_date.c /ext/date/tests 015.phpt dateinterval_errors.phpt

2008-07-08 Thread Derick Rethans
derick  Tue Jul  8 17:41:51 2008 UTC

  Added files: (Branch: PHP_5_3)
/php-src/ext/date/tests 015.phpt dateinterval_errors.phpt 

  Modified files:  
/php-src/ext/date   php_date.c 
/php-srcNEWS 
  Log:
  - MFH: Fixed memory leaks and segfaults, patch by Joe Orton.
  - MFH: Fixed bug #45038 (Crash when using DateTimeZone object returned by
Date::getTimezone).
  
  
http://cvs.php.net/viewvc.cgi/php-src/ext/date/php_date.c?r1=1.43.2.45.2.51.2.38r2=1.43.2.45.2.51.2.39diff_format=u
Index: php-src/ext/date/php_date.c
diff -u php-src/ext/date/php_date.c:1.43.2.45.2.51.2.38 
php-src/ext/date/php_date.c:1.43.2.45.2.51.2.39
--- php-src/ext/date/php_date.c:1.43.2.45.2.51.2.38 Wed May  7 23:45:28 2008
+++ php-src/ext/date/php_date.c Tue Jul  8 17:41:51 2008
@@ -16,7 +16,7 @@
+--+
  */
 
-/* $Id: php_date.c,v 1.43.2.45.2.51.2.38 2008/05/07 23:45:28 iliaa Exp $ */
+/* $Id: php_date.c,v 1.43.2.45.2.51.2.39 2008/07/08 17:41:51 derick Exp $ */
 
 #include php.h
 #include php_streams.h
@@ -1221,14 +1221,6 @@
timelib_update_ts(t, tzi);
ts = timelib_date_to_int(t, error2);
 
-   /* if tz_info is not a copy, avoid double free */
-   if (now-tz_info != tzi  now-tz_info) {
-   timelib_tzinfo_dtor(now-tz_info);
-   }
-   if (t-tz_info != tzi) {
-   timelib_tzinfo_dtor(t-tz_info);
-   }
-
timelib_time_dtor(now);
timelib_time_dtor(t);
 
@@ -1653,7 +1645,7 @@
newdateobj-time-tz_abbr = strdup(it_time-tz_abbr);
}
if (it_time-tz_info) {
-   newdateobj-time-tz_info = 
timelib_tzinfo_clone(it_time-tz_info);
+   newdateobj-time-tz_info = it_time-tz_info;
}

*data = iterator-current;
@@ -1840,7 +1832,7 @@
new_obj-time-tz_abbr = strdup(old_obj-time-tz_abbr);
}
if (old_obj-time-tz_info) {
-   new_obj-time-tz_info = 
timelib_tzinfo_clone(old_obj-time-tz_info);
+   new_obj-time-tz_info = old_obj-time-tz_info;
}

return new_ov;
@@ -2053,9 +2045,6 @@
php_date_obj *intern = (php_date_obj *)object;
 
if (intern-time) {
-   if (intern-time-tz_info) {
-   timelib_tzinfo_dtor(intern-time-tz_info);
-   }
timelib_time_dtor(intern-time);
}
 
@@ -2088,16 +2077,10 @@
php_period_obj *intern = (php_period_obj *)object;
 
if (intern-start) {
-   if (intern-start-tz_info) {
-   timelib_tzinfo_dtor(intern-start-tz_info);
-   }
timelib_time_dtor(intern-start);
}
 
if (intern-end) {
-   if (intern-end-tz_info) {
-   timelib_tzinfo_dtor(intern-end-tz_info);
-   }
timelib_time_dtor(intern-end);
}
 
@@ -2136,14 +2119,11 @@
timelib_time   *now;
timelib_tzinfo *tzi;
timelib_error_container *err = NULL;
-   int free_tzi = 0, type = TIMELIB_ZONETYPE_ID, new_dst;
+   int type = TIMELIB_ZONETYPE_ID, new_dst;
char *new_abbr;
timelib_sll new_offset;

if (dateobj-time) {
-   if (dateobj-time-tz_info) {
-   timelib_tzinfo_dtor(dateobj-time-tz_info);
-   }
timelib_time_dtor(dateobj-time);
}
if (format) {
@@ -2171,8 +2151,7 @@
tzobj = (php_timezone_obj *) 
zend_object_store_get_object(timezone_object TSRMLS_CC);
switch (tzobj-type) {
case TIMELIB_ZONETYPE_ID:
-   tzi = timelib_tzinfo_clone(tzobj-tzi.tz);
-   free_tzi = 1;
+   tzi = tzobj-tzi.tz;
break;
case TIMELIB_ZONETYPE_OFFSET:
new_offset = tzobj-tzi.utc_offset;
@@ -2185,8 +2164,7 @@
}
type = tzobj-type;
} else if (dateobj-time-tz_info) {
-   tzi = timelib_tzinfo_clone(dateobj-time-tz_info);
-   free_tzi = 1;
+   tzi = dateobj-time-tz_info;
} else {
tzi = get_timezone_info(TSRMLS_C);
}
@@ -2213,12 +2191,6 @@
 
dateobj-time-have_relative = 0;
 
-   if (type == TIMELIB_ZONETYPE_ID  now-tz_info != tzi) {
-   timelib_tzinfo_dtor(now-tz_info);
-   }
-   if (free_tzi) {
-   timelib_tzinfo_dtor(tzi);
-   }
timelib_time_dtor(now);
 
return 1;
@@ -2699,10 +2671,7 @@
if (tzobj-type != TIMELIB_ZONETYPE_ID) {
php_error_docref(NULL TSRMLS_CC, E_WARNING, Can only do this 
for zones with ID for now);
}
-   if (dateobj-time-tz_info) {
-   

[PHP-CVS] cvs: php-src(PHP_5_3) /ext/date php_date.c /ext/date/lib parse_date.c parse_date.re parse_iso_intervals.c tm2unixtime.c

2008-07-08 Thread Derick Rethans
derick  Tue Jul  8 17:56:14 2008 UTC

  Modified files:  (Branch: PHP_5_3)
/php-src/ext/date   php_date.c 
/php-src/ext/date/lib   parse_date.c parse_date.re 
parse_iso_intervals.c tm2unixtime.c 
  Log:
  - Replaced // by /* .. */ comments.
  
  http://cvs.php.net/viewvc.cgi/php-src/ext/date/php_date.c?r1=1.43.2.45.2.51.2.39r2=1.43.2.45.2.51.2.40diff_format=u
Index: php-src/ext/date/php_date.c
diff -u php-src/ext/date/php_date.c:1.43.2.45.2.51.2.39 
php-src/ext/date/php_date.c:1.43.2.45.2.51.2.40
--- php-src/ext/date/php_date.c:1.43.2.45.2.51.2.39 Tue Jul  8 17:41:51 2008
+++ php-src/ext/date/php_date.c Tue Jul  8 17:55:40 2008
@@ -16,7 +16,7 @@
+--+
  */
 
-/* $Id: php_date.c,v 1.43.2.45.2.51.2.39 2008/07/08 17:41:51 derick Exp $ */
+/* $Id: php_date.c,v 1.43.2.45.2.51.2.40 2008/07/08 17:55:40 derick Exp $ */
 
 #include php.h
 #include php_streams.h
@@ -308,9 +308,9 @@
int initialized;
int type;
union {
-   timelib_tzinfo *tz; // TIMELIB_ZONETYPE_ID;
-   timelib_sll utc_offset; // TIMELIB_ZONETYPE_OFFSET
-   struct  // TIMELIB_ZONETYPE_ABBR
+   timelib_tzinfo *tz; /* TIMELIB_ZONETYPE_ID; */
+   timelib_sll utc_offset; /* TIMELIB_ZONETYPE_OFFSET */
+   struct  /* TIMELIB_ZONETYPE_ABBR */
{
timelib_sll  utc_offset;
char*abbr;
@@ -1874,12 +1874,12 @@
return props;
}
 
-   // first we add the date and time in ISO format
+   /* first we add the date and time in ISO format */
MAKE_STD_ZVAL(zv);
ZVAL_STRING(zv, date_format(Y-m-d H:i:s, 12, dateobj-time, 1), 0);
zend_hash_update(props, date, 5, zv, sizeof(zval), NULL);
 
-   // then we add the timezone name (or similar)
+   /* then we add the timezone name (or similar) */
if (dateobj-time-is_localtime) {
MAKE_STD_ZVAL(zv);
ZVAL_LONG(zv, dateobj-time-zone_type);
@@ -2132,7 +2132,7 @@
dateobj-time = timelib_strtotime(time_str_len ? time_str : 
now, time_str_len ? time_str_len : sizeof(now) -1, err, DATE_TIMEZONEDB);
}
 
-   // update last errors and warnings
+   /* update last errors and warnings */
update_errors_warnings(err TSRMLS_CC);
 
 
http://cvs.php.net/viewvc.cgi/php-src/ext/date/lib/parse_date.c?r1=1.29.2.30.2.14.2.15r2=1.29.2.30.2.14.2.16diff_format=u
Index: php-src/ext/date/lib/parse_date.c
diff -u php-src/ext/date/lib/parse_date.c:1.29.2.30.2.14.2.15 
php-src/ext/date/lib/parse_date.c:1.29.2.30.2.14.2.16
--- php-src/ext/date/lib/parse_date.c:1.29.2.30.2.14.2.15   Sun May  4 
20:52:37 2008
+++ php-src/ext/date/lib/parse_date.c   Tue Jul  8 17:55:40 2008
@@ -1,4 +1,4 @@
-/* Generated by re2c 0.13.4 on Sun May  4 22:48:22 2008 */
+/* Generated by re2c 0.13.4 on Tue Jul  8 19:53:07 2008 */
 #line 1 ext/date/lib/parse_date.re
 /*
+--+
@@ -18,7 +18,7 @@
+--+
  */
 
-/* $Id: parse_date.c,v 1.29.2.30.2.14.2.15 2008/05/04 20:52:37 derick Exp $ */
+/* $Id: parse_date.c,v 1.29.2.30.2.14.2.16 2008/07/08 17:55:40 derick Exp $ */
 
 #include timelib.h
 
@@ -19051,7 +19051,7 @@
TIMELIB_INIT;
TIMELIB_HAVE_RELATIVE();
 
-   // skip last day of or first day of
+   /* skip last day of or first day of */
if (*ptr == 'l') {
s-time-relative.first_last_day_of = 2;
} else {
@@ -23398,17 +23398,17 @@
while (*fptr  *ptr) {
begin = ptr;
switch (*fptr) {
-   case 'd': // two digit day, with leading zero
-   case 'j': // two digit day, without leading zero
+   case 'd': /* two digit day, with leading zero */
+   case 'j': /* two digit day, without leading zero */
TIMELIB_CHECK_NUMBER;
if ((s-time-d = timelib_get_nr((char **) 
ptr, 2)) == TIMELIB_UNSET) {
add_pbf_error(s, A two digit day could 
not be found, string, begin);
}
break;
-   case 'S': // day suffix, ignored, nor checked
+   case 'S': /* day suffix, ignored, nor checked */
timelib_skip_day_suffix((char **) ptr);
break;
-   case 'z': // day of year - resets month (0 based)
+   case 'z': /* day of year - resets month (0 based) */

[PHP-CVS] cvs: php-src /ext/date php_date.c /ext/date/lib parse_date.c parse_date.re parse_iso_intervals.c tm2unixtime.c

2008-07-08 Thread Derick Rethans
derick  Tue Jul  8 17:56:36 2008 UTC

  Modified files:  
/php-src/ext/date   php_date.c 
/php-src/ext/date/lib   parse_date.c parse_date.re 
parse_iso_intervals.c tm2unixtime.c 
  Log:
  - Replaced // by /* .. */ comments.
  
  http://cvs.php.net/viewvc.cgi/php-src/ext/date/php_date.c?r1=1.190r2=1.191diff_format=u
Index: php-src/ext/date/php_date.c
diff -u php-src/ext/date/php_date.c:1.190 php-src/ext/date/php_date.c:1.191
--- php-src/ext/date/php_date.c:1.190   Tue Jul  8 17:40:34 2008
+++ php-src/ext/date/php_date.c Tue Jul  8 17:56:35 2008
@@ -16,7 +16,7 @@
+--+
  */
 
-/* $Id: php_date.c,v 1.190 2008/07/08 17:40:34 derick Exp $ */
+/* $Id: php_date.c,v 1.191 2008/07/08 17:56:35 derick Exp $ */
 
 #include php.h
 #include php_streams.h
@@ -310,9 +310,9 @@
int initialized;
int type;
union {
-   timelib_tzinfo *tz; // TIMELIB_ZONETYPE_ID;
-   timelib_sll utc_offset; // TIMELIB_ZONETYPE_OFFSET
-   struct  // TIMELIB_ZONETYPE_ABBR
+   timelib_tzinfo *tz; /* TIMELIB_ZONETYPE_ID; */
+   timelib_sll utc_offset; /* TIMELIB_ZONETYPE_OFFSET */
+   struct  /* TIMELIB_ZONETYPE_ABBR */
{
timelib_sll  utc_offset;
char*abbr;
@@ -2001,7 +2001,7 @@
return props;
}
 
-   // first we add the date and time in ISO format
+   /* first we add the date and time in ISO format */
str = date_format(Y-m-d H:i:s, 12, return_len, dateobj-time, 1, 0 
TSRMLS_CC);
MAKE_STD_ZVAL(zv);
if (UG(unicode)) {
@@ -2011,7 +2011,7 @@
}
zend_hash_update(props, date, 5, zv, sizeof(zval), NULL);
 
-   // then we add the timezone name (or similar)
+   /* then we add the timezone name (or similar) */
if (dateobj-time-is_localtime) {
MAKE_STD_ZVAL(zv);
ZVAL_LONG(zv, dateobj-time-zone_type);
@@ -2264,7 +2264,7 @@
dateobj-time = timelib_strtotime(time_str_len ? time_str : 
now, time_str_len ? time_str_len : sizeof(now) -1, err, DATE_TIMEZONEDB);
}
 
-   // update last errors and warnings
+   /* update last errors and warnings */
update_errors_warnings(err TSRMLS_CC);
 
 
http://cvs.php.net/viewvc.cgi/php-src/ext/date/lib/parse_date.c?r1=1.88r2=1.89diff_format=u
Index: php-src/ext/date/lib/parse_date.c
diff -u php-src/ext/date/lib/parse_date.c:1.88 
php-src/ext/date/lib/parse_date.c:1.89
--- php-src/ext/date/lib/parse_date.c:1.88  Sun May  4 20:50:46 2008
+++ php-src/ext/date/lib/parse_date.c   Tue Jul  8 17:56:35 2008
@@ -1,4 +1,4 @@
-/* Generated by re2c 0.13.4 on Sun May  4 22:48:05 2008 */
+/* Generated by re2c 0.13.4 on Tue Jul  8 19:51:01 2008 */
 #line 1 ext/date/lib/parse_date.re
 /*
+--+
@@ -18,7 +18,7 @@
+--+
  */
 
-/* $Id: parse_date.c,v 1.88 2008/05/04 20:50:46 derick Exp $ */
+/* $Id: parse_date.c,v 1.89 2008/07/08 17:56:35 derick Exp $ */
 
 #include timelib.h
 
@@ -19051,7 +19051,7 @@
TIMELIB_INIT;
TIMELIB_HAVE_RELATIVE();
 
-   // skip last day of or first day of
+   /* skip last day of or first day of */
if (*ptr == 'l') {
s-time-relative.first_last_day_of = 2;
} else {
@@ -23398,17 +23398,17 @@
while (*fptr  *ptr) {
begin = ptr;
switch (*fptr) {
-   case 'd': // two digit day, with leading zero
-   case 'j': // two digit day, without leading zero
+   case 'd': /* two digit day, with leading zero */
+   case 'j': /* two digit day, without leading zero */
TIMELIB_CHECK_NUMBER;
if ((s-time-d = timelib_get_nr((char **) 
ptr, 2)) == TIMELIB_UNSET) {
add_pbf_error(s, A two digit day could 
not be found, string, begin);
}
break;
-   case 'S': // day suffix, ignored, nor checked
+   case 'S': /* day suffix, ignored, nor checked */
timelib_skip_day_suffix((char **) ptr);
break;
-   case 'z': // day of year - resets month (0 based)
+   case 'z': /* day of year - resets month (0 based) */
TIMELIB_CHECK_NUMBER;
if ((tmp = timelib_get_nr((char **) ptr, 3)) 
== TIMELIB_UNSET) {

[PHP-CVS] cvs: php-src /ext/date php_date.c

2008-07-08 Thread Derick Rethans
derick  Tue Jul  8 19:29:07 2008 UTC

  Modified files:  
/php-src/ext/date   php_date.c 
  Log:
  - Fixed a memleak (Original patch by Hannes Magnusson).
  
  
http://cvs.php.net/viewvc.cgi/php-src/ext/date/php_date.c?r1=1.191r2=1.192diff_format=u
Index: php-src/ext/date/php_date.c
diff -u php-src/ext/date/php_date.c:1.191 php-src/ext/date/php_date.c:1.192
--- php-src/ext/date/php_date.c:1.191   Tue Jul  8 17:56:35 2008
+++ php-src/ext/date/php_date.c Tue Jul  8 19:29:06 2008
@@ -16,7 +16,7 @@
+--+
  */
 
-/* $Id: php_date.c,v 1.191 2008/07/08 17:56:35 derick Exp $ */
+/* $Id: php_date.c,v 1.192 2008/07/08 19:29:06 derick Exp $ */
 
 #include php.h
 #include php_streams.h
@@ -3317,11 +3317,13 @@
GET_VALUE_FROM_STRUCT(invert, invert);
GET_VALUE_FROM_STRUCT(days, days);
 
+   ALLOC_INIT_ZVAL(retval);
+   Z_SET_REFCOUNT_P(retval, 0);
+
if (value == -1) {
php_error_docref(NULL TSRMLS_CC, E_ERROR, Unknown property 
(%s), Z_STRVAL_P(member));
}
 
-   ALLOC_INIT_ZVAL(retval);
ZVAL_LONG(retval, value);
 
if (member == tmp_member) {
@@ -3337,6 +3339,7 @@
 {
php_interval_obj *obj;
zval tmp_member, tmp_value;
+   int found = 0;
 
if (member-type != IS_STRING) {
tmp_member = *member;
@@ -3354,6 +3357,7 @@
convert_to_long(tmp_value);  \
value = tmp_value;   \
} \
+   found = 1;\
obj-diff-n = Z_LVAL_P(value); \
if (value == tmp_value) { \
zval_dtor(value);  \
@@ -3368,7 +3372,7 @@
SET_VALUE_FROM_STRUCT(s, s);
SET_VALUE_FROM_STRUCT(invert, invert);
 
-   if (value == -1) {
+   if (!found) {
php_error_docref(NULL TSRMLS_CC, E_ERROR, Unknown property 
(%s), Z_STRVAL_P(member));
}
 



-- 
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/date php_date.c

2008-07-08 Thread Derick Rethans
derick  Tue Jul  8 19:29:19 2008 UTC

  Modified files:  (Branch: PHP_5_3)
/php-src/ext/date   php_date.c 
  Log:
  - MFH: Fixed a memleak (Original patch by Hannes Magnusson).
  
  
http://cvs.php.net/viewvc.cgi/php-src/ext/date/php_date.c?r1=1.43.2.45.2.51.2.40r2=1.43.2.45.2.51.2.41diff_format=u
Index: php-src/ext/date/php_date.c
diff -u php-src/ext/date/php_date.c:1.43.2.45.2.51.2.40 
php-src/ext/date/php_date.c:1.43.2.45.2.51.2.41
--- php-src/ext/date/php_date.c:1.43.2.45.2.51.2.40 Tue Jul  8 17:55:40 2008
+++ php-src/ext/date/php_date.c Tue Jul  8 19:29:18 2008
@@ -16,7 +16,7 @@
+--+
  */
 
-/* $Id: php_date.c,v 1.43.2.45.2.51.2.40 2008/07/08 17:55:40 derick Exp $ */
+/* $Id: php_date.c,v 1.43.2.45.2.51.2.41 2008/07/08 19:29:18 derick Exp $ */
 
 #include php.h
 #include php_streams.h
@@ -3148,11 +3148,13 @@
GET_VALUE_FROM_STRUCT(invert, invert);
GET_VALUE_FROM_STRUCT(days, days);
 
+   ALLOC_INIT_ZVAL(retval);
+   Z_SET_REFCOUNT_P(retval, 0);
+
if (value == -1) {
php_error_docref(NULL TSRMLS_CC, E_ERROR, Unknown property 
(%s), Z_STRVAL_P(member));
}
 
-   ALLOC_INIT_ZVAL(retval);
ZVAL_LONG(retval, value);
 
if (member == tmp_member) {
@@ -3168,6 +3170,7 @@
 {
php_interval_obj *obj;
zval tmp_member, tmp_value;
+   int found = 0;
 
if (member-type != IS_STRING) {
tmp_member = *member;
@@ -3185,6 +3188,7 @@
convert_to_long(tmp_value);  \
value = tmp_value;   \
} \
+   found = 1;\
obj-diff-n = Z_LVAL_P(value); \
if (value == tmp_value) { \
zval_dtor(value);  \
@@ -3199,7 +3203,7 @@
SET_VALUE_FROM_STRUCT(s, s);
SET_VALUE_FROM_STRUCT(invert, invert);
 
-   if (value == -1) {
+   if (!found) {
php_error_docref(NULL TSRMLS_CC, E_ERROR, Unknown property 
(%s), Z_STRVAL_P(member));
}
 



-- 
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP-CVS] cvs: php-src /ext/gd config.w32

2008-07-08 Thread Pierre-Alain Joye
pajoye  Tue Jul  8 19:07:53 2008 UTC

  Modified files:  
/php-src/ext/gd config.w32 
  Log:
  - use _a for static lib
  - fix logic for shared zlib
  
http://cvs.php.net/viewvc.cgi/php-src/ext/gd/config.w32?r1=1.27r2=1.28diff_format=u
Index: php-src/ext/gd/config.w32
diff -u php-src/ext/gd/config.w32:1.27 php-src/ext/gd/config.w32:1.28
--- php-src/ext/gd/config.w32:1.27  Mon Jul  7 08:40:04 2008
+++ php-src/ext/gd/config.w32   Tue Jul  8 19:07:53 2008
@@ -1,4 +1,4 @@
-// $Id: config.w32,v 1.27 2008/07/07 08:40:04 pajoye Exp $
+// $Id: config.w32,v 1.28 2008/07/08 19:07:53 pajoye Exp $
 // vim:ft=javascript
 
 ARG_WITH(gd, Bundled GD support, yes,shared);
@@ -6,14 +6,14 @@
 
 if (PHP_GD != no) {
if (CHECK_LIB(libjpeg.lib, gd, PHP_GD) 
-   (CHECK_LIB(freetype.lib, gd, PHP_GD) || 
CHECK_LIB(freetype2.lib, gd, PHP_GD) ) 
+   (CHECK_LIB(freetype_a.lib, gd, PHP_GD) || 
CHECK_LIB(freetype2.lib, gd, PHP_GD) ) 
(CHECK_LIB(libpng_a.lib, gd, PHP_GD) || 
CHECK_LIB(libpng.lib, gd, PHP_GD) ) 
(CHECK_LIB(libiconv_a.lib, gd, PHP_GD) || 
CHECK_LIB(libiconv.lib, gd, PHP_GD) ) 
CHECK_HEADER_ADD_INCLUDE(gd.h, CFLAGS_GD, PHP_GD + 
;ext\\gd\\libgd) 
(CHECK_LIB(libiconv_a.lib, iconv, PHP_ICONV) || 
CHECK_LIB(libiconv.lib, iconv, PHP_ICONV) ||
 CHECK_LIB(iconv_a.lib, iconv, PHP_ICONV) || 
CHECK_LIB(iconv.lib, iconv, PHP_ICONV)) 
CHECK_HEADER_ADD_INCLUDE(iconv.h, CFLAGS_ICONV, PHP_ICONV) 

-   ((!PHP_ZLIB_SHARED) || CHECK_LIB(zlib_a.lib, gd, PHP_GD) || 
 CHECK_LIB(zlib.lib, gd, PHP_GD))
+   ((!PHP_ZLIB_SHARED)  (CHECK_LIB(zlib_a.lib, gd, PHP_GD) 
||  CHECK_LIB(zlib.lib, gd, PHP_GD)))
) {
if (PHP_T1LIB != no) {
if (CHECK_LIB(T1_StaticMD.lib, gd, PHP_GD) 
@@ -24,11 +24,6 @@
WARNING(t1lib not enabled; libraries and 
headers not found);
}
}
-
-   if (PHP_ZLIB == no || PHP_ZLIB_SHARED) {
-   CHECK_LIB(zlib.lib, gd, PHP_GD);
-   }
-
CHECK_LIB(User32.lib, gd, PHP_GD);
CHECK_LIB(Gdi32.lib, gd, PHP_GD);
 



-- 
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/gd config.w32

2008-07-08 Thread Pierre-Alain Joye
pajoye  Tue Jul  8 19:09:11 2008 UTC

  Modified files:  (Branch: PHP_5_3)
/php-src/ext/gd config.w32 
  Log:
  MFH:
   - use _a for static lib
   - fix logic for shared zlib
  
http://cvs.php.net/viewvc.cgi/php-src/ext/gd/config.w32?r1=1.10.4.4.2.2r2=1.10.4.4.2.3diff_format=u
Index: php-src/ext/gd/config.w32
diff -u php-src/ext/gd/config.w32:1.10.4.4.2.2 
php-src/ext/gd/config.w32:1.10.4.4.2.3
--- php-src/ext/gd/config.w32:1.10.4.4.2.2  Mon Jul  7 08:41:10 2008
+++ php-src/ext/gd/config.w32   Tue Jul  8 19:09:11 2008
@@ -1,4 +1,4 @@
-// $Id: config.w32,v 1.10.4.4.2.2 2008/07/07 08:41:10 pajoye Exp $
+// $Id: config.w32,v 1.10.4.4.2.3 2008/07/08 19:09:11 pajoye Exp $
 // vim:ft=javascript
 
 ARG_WITH(gd, Bundled GD support, yes,shared);
@@ -6,14 +6,14 @@
 
 if (PHP_GD != no) {
if (CHECK_LIB(libjpeg.lib, gd, PHP_GD) 
-   (CHECK_LIB(freetype.lib, gd, PHP_GD) || 
CHECK_LIB(freetype2.lib, gd, PHP_GD) ) 
+   (CHECK_LIB(freetype_a.lib, gd, PHP_GD) || 
CHECK_LIB(freetype2.lib, gd, PHP_GD) ) 
(CHECK_LIB(libpng_a.lib, gd, PHP_GD) || 
CHECK_LIB(libpng.lib, gd, PHP_GD) ) 
(CHECK_LIB(libiconv_a.lib, gd, PHP_GD) || 
CHECK_LIB(libiconv.lib, gd, PHP_GD) ) 
CHECK_HEADER_ADD_INCLUDE(gd.h, CFLAGS_GD, PHP_GD + 
;ext\\gd\\libgd) 
(CHECK_LIB(libiconv_a.lib, iconv, PHP_ICONV) || 
CHECK_LIB(libiconv.lib, iconv, PHP_ICONV) ||
 CHECK_LIB(iconv_a.lib, iconv, PHP_ICONV) || 
CHECK_LIB(iconv.lib, iconv, PHP_ICONV)) 
CHECK_HEADER_ADD_INCLUDE(iconv.h, CFLAGS_ICONV, PHP_ICONV) 

-   ((!PHP_ZLIB_SHARED) || CHECK_LIB(zlib_a.lib, gd, PHP_GD) || 
 CHECK_LIB(zlib.lib, gd, PHP_GD))
+   ((!PHP_ZLIB_SHARED)  (CHECK_LIB(zlib_a.lib, gd, PHP_GD) 
||  CHECK_LIB(zlib.lib, gd, PHP_GD)))
) {
if (PHP_T1LIB != no) {
if (CHECK_LIB(T1_StaticMD.lib, gd, PHP_GD) 



-- 
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP-CVS] cvs: php-src /ext/date/lib parse_date.c parse_date.re /ext/date/tests test-parse-from-format.phpt

2008-07-08 Thread Derick Rethans
derick  Tue Jul  8 20:23:39 2008 UTC

  Added files: 
/php-src/ext/date/tests test-parse-from-format.phpt 

  Modified files:  
/php-src/ext/date/lib   parse_date.c parse_date.re 
  Log:
  - Fixed bug #45459 (date_create_from_format() fails on DATE_RFC3339) by
allowing a few more format specifiers in date_create_from_format() /
date_parse_from_format().
  
  
http://cvs.php.net/viewvc.cgi/php-src/ext/date/lib/parse_date.c?r1=1.90r2=1.91diff_format=u
Index: php-src/ext/date/lib/parse_date.c
diff -u php-src/ext/date/lib/parse_date.c:1.90 
php-src/ext/date/lib/parse_date.c:1.91
--- php-src/ext/date/lib/parse_date.c:1.90  Tue Jul  8 18:27:06 2008
+++ php-src/ext/date/lib/parse_date.c   Tue Jul  8 20:23:38 2008
@@ -1,4 +1,4 @@
-/* Generated by re2c 0.13.4 on Tue Jul  8 20:26:31 2008 */
+/* Generated by re2c 0.13.5 on Tue Jul  8 22:21:57 2008 */
 #line 1 ext/date/lib/parse_date.re
 /*
+--+
@@ -18,7 +18,7 @@
+--+
  */
 
-/* $Id: parse_date.c,v 1.90 2008/07/08 18:27:06 derick Exp $ */
+/* $Id: parse_date.c,v 1.91 2008/07/08 20:23:38 derick Exp $ */
 
 #include timelib.h
 
@@ -637,7 +637,7 @@
char *begin = *ptr, *end;
const timelib_relunit *tp, *value = NULL;
 
-   while (**ptr != '\0'  **ptr != ' '  **ptr != '\t') {
+   while (**ptr != '\0'  **ptr != ' '  **ptr != ','  **ptr != '\t') {
++*ptr;
}
end = *ptr;
@@ -23408,6 +23408,15 @@
while (*fptr  *ptr) {
begin = ptr;
switch (*fptr) {
+   case 'D': /* three letter day */
+   case 'l': /* full day */
+   tmp = timelib_lookup_relunit((char **) ptr);
+   if (!tmp) {
+   add_pbf_error(s, A textual day could 
not be found, string, begin);
+   } else {
+   s-time-m = tmp;
+   }
+   break;
case 'd': /* two digit day, with leading zero */
case 'j': /* two digit day, without leading zero */
TIMELIB_CHECK_NUMBER;
@@ -23521,6 +23530,9 @@
break;
 
case 'e': /* timezone */
+   case 'P': /* timezone */
+   case 'T': /* timezone */
+   case 'O': /* timezone */
{
int tz_not_found;
s-time-z = timelib_get_zone((char **) 
ptr, s-time-dst, s-time, tz_not_found, s-tzdb);
@@ -23575,6 +23587,15 @@
++ptr;
break;
 
+   case '\\': /* escaped char */
+   *fptr++;
+   if (*ptr == *fptr) {
+   ++ptr;
+   } else {
+   add_pbf_error(s, The escaped character 
could not be found, string, begin);
+   }
+   break;
+
case '*': /* random chars until a separator or number 
([ \t.,:;/-0123456789]) */
timelib_eat_until_separator((char **) ptr);
break;
http://cvs.php.net/viewvc.cgi/php-src/ext/date/lib/parse_date.re?r1=1.81r2=1.82diff_format=u
Index: php-src/ext/date/lib/parse_date.re
diff -u php-src/ext/date/lib/parse_date.re:1.81 
php-src/ext/date/lib/parse_date.re:1.82
--- php-src/ext/date/lib/parse_date.re:1.81 Tue Jul  8 18:27:07 2008
+++ php-src/ext/date/lib/parse_date.re  Tue Jul  8 20:23:38 2008
@@ -16,7 +16,7 @@
+--+
  */
 
-/* $Id: parse_date.re,v 1.81 2008/07/08 18:27:07 derick Exp $ */
+/* $Id: parse_date.re,v 1.82 2008/07/08 20:23:38 derick Exp $ */
 
 #include timelib.h
 
@@ -635,7 +635,7 @@
char *begin = *ptr, *end;
const timelib_relunit *tp, *value = NULL;
 
-   while (**ptr != '\0'  **ptr != ' '  **ptr != '\t') {
+   while (**ptr != '\0'  **ptr != ' '  **ptr != ','  **ptr != '\t') {
++*ptr;
}
end = *ptr;
@@ -1818,6 +1818,15 @@
while (*fptr  *ptr) {
begin = ptr;
switch (*fptr) {
+   case 'D': /* three letter day */
+   case 'l': /* full day */
+   tmp = timelib_lookup_relunit((char **) ptr);
+   if (!tmp) {
+   add_pbf_error(s, A textual day could 
not be found, 

[PHP-CVS] cvs: php-src(PHP_5_3) /ext/date/lib parse_date.c parse_date.re /ext/date/tests test-parse-from-format.phpt

2008-07-08 Thread Derick Rethans
derick  Tue Jul  8 20:25:42 2008 UTC

  Added files: (Branch: PHP_5_3)
/php-src/ext/date/tests test-parse-from-format.phpt 

  Modified files:  
/php-src/ext/date/lib   parse_date.c parse_date.re 
  Log:
  - MFH: Fixed bug #45459 (date_create_from_format() fails on DATE_RFC3339) by
allowing a few more format specifiers in date_create_from_format() /
date_parse_from_format().
  
  
http://cvs.php.net/viewvc.cgi/php-src/ext/date/lib/parse_date.c?r1=1.29.2.30.2.14.2.17r2=1.29.2.30.2.14.2.18diff_format=u
Index: php-src/ext/date/lib/parse_date.c
diff -u php-src/ext/date/lib/parse_date.c:1.29.2.30.2.14.2.17 
php-src/ext/date/lib/parse_date.c:1.29.2.30.2.14.2.18
--- php-src/ext/date/lib/parse_date.c:1.29.2.30.2.14.2.17   Tue Jul  8 
18:28:29 2008
+++ php-src/ext/date/lib/parse_date.c   Tue Jul  8 20:25:09 2008
@@ -1,4 +1,4 @@
-/* Generated by re2c 0.13.4 on Tue Jul  8 20:14:39 2008 */
+/* Generated by re2c 0.13.5 on Tue Jul  8 22:24:37 2008 */
 #line 1 ext/date/lib/parse_date.re
 /*
+--+
@@ -18,7 +18,7 @@
+--+
  */
 
-/* $Id: parse_date.c,v 1.29.2.30.2.14.2.17 2008/07/08 18:28:29 derick Exp $ */
+/* $Id: parse_date.c,v 1.29.2.30.2.14.2.18 2008/07/08 20:25:09 derick Exp $ */
 
 #include timelib.h
 
@@ -637,7 +637,7 @@
char *begin = *ptr, *end;
const timelib_relunit *tp, *value = NULL;
 
-   while (**ptr != '\0'  **ptr != ' '  **ptr != '\t') {
+   while (**ptr != '\0'  **ptr != ' '  **ptr != ','  **ptr != '\t') {
++*ptr;
}
end = *ptr;
@@ -23408,6 +23408,15 @@
while (*fptr  *ptr) {
begin = ptr;
switch (*fptr) {
+   case 'D': /* three letter day */
+   case 'l': /* full day */
+   tmp = timelib_lookup_relunit((char **) ptr);
+   if (!tmp) {
+   add_pbf_error(s, A textual day could 
not be found, string, begin);
+   } else {
+   s-time-m = tmp;
+   }
+   break;
case 'd': /* two digit day, with leading zero */
case 'j': /* two digit day, without leading zero */
TIMELIB_CHECK_NUMBER;
@@ -23521,6 +23530,9 @@
break;
 
case 'e': /* timezone */
+   case 'P': /* timezone */
+   case 'T': /* timezone */
+   case 'O': /* timezone */
{
int tz_not_found;
s-time-z = timelib_get_zone((char **) 
ptr, s-time-dst, s-time, tz_not_found, s-tzdb);
@@ -23575,6 +23587,15 @@
++ptr;
break;
 
+   case '\\': /* escaped char */
+   *fptr++;
+   if (*ptr == *fptr) {
+   ++ptr;
+   } else {
+   add_pbf_error(s, The escaped character 
could not be found, string, begin);
+   }
+   break;
+
case '*': /* random chars until a separator or number 
([ \t.,:;/-0123456789]) */
timelib_eat_until_separator((char **) ptr);
break;
http://cvs.php.net/viewvc.cgi/php-src/ext/date/lib/parse_date.re?r1=1.26.2.27.2.12.2.15r2=1.26.2.27.2.12.2.16diff_format=u
Index: php-src/ext/date/lib/parse_date.re
diff -u php-src/ext/date/lib/parse_date.re:1.26.2.27.2.12.2.15 
php-src/ext/date/lib/parse_date.re:1.26.2.27.2.12.2.16
--- php-src/ext/date/lib/parse_date.re:1.26.2.27.2.12.2.15  Tue Jul  8 
18:28:49 2008
+++ php-src/ext/date/lib/parse_date.re  Tue Jul  8 20:25:28 2008
@@ -16,7 +16,7 @@
+--+
  */
 
-/* $Id: parse_date.re,v 1.26.2.27.2.12.2.15 2008/07/08 18:28:49 derick Exp $ */
+/* $Id: parse_date.re,v 1.26.2.27.2.12.2.16 2008/07/08 20:25:28 derick Exp $ */
 
 #include timelib.h
 
@@ -635,7 +635,7 @@
char *begin = *ptr, *end;
const timelib_relunit *tp, *value = NULL;
 
-   while (**ptr != '\0'  **ptr != ' '  **ptr != '\t') {
+   while (**ptr != '\0'  **ptr != ' '  **ptr != ','  **ptr != '\t') {
++*ptr;
}
end = *ptr;
@@ -1818,6 +1818,15 @@
while (*fptr  *ptr) {
begin = ptr;
switch (*fptr) {
+   case 'D': /* three letter day */
+   case 

[PHP-CVS] cvs: php-src /ext/spl spl_directory.c /ext/spl/tests dit_001.phpt fileobject_003.phpt fileobject_004.phpt fileobject_getfileinfo_basic.phpt

2008-07-08 Thread Etienne Kneuss
colder  Tue Jul  8 22:40:30 2008 UTC

  Modified files:  
/php-src/ext/splspl_directory.c 
/php-src/ext/spl/tests  dit_001.phpt fileobject_003.phpt 
fileobject_004.phpt 
fileobject_getfileinfo_basic.phpt 
  Log:
  - Fix filename in debug_info
  - Fix #45345 (getPathInfo on the file instead of the dir)
  - Remove trailing / on input
  http://cvs.php.net/viewvc.cgi/php-src/ext/spl/spl_directory.c?r1=1.157r2=1.158diff_format=u
Index: php-src/ext/spl/spl_directory.c
diff -u php-src/ext/spl/spl_directory.c:1.157 
php-src/ext/spl/spl_directory.c:1.158
--- php-src/ext/spl/spl_directory.c:1.157   Wed Jul  2 10:46:52 2008
+++ php-src/ext/spl/spl_directory.c Tue Jul  8 22:40:29 2008
@@ -16,7 +16,7 @@
+--+
  */
 
-/* $Id: spl_directory.c,v 1.157 2008/07/02 10:46:52 tony2001 Exp $ */
+/* $Id: spl_directory.c,v 1.158 2008/07/08 22:40:29 colder Exp $ */
 
 #ifdef HAVE_CONFIG_H
 # include config.h
@@ -374,29 +374,47 @@
intern-file_name = use_copy ? ezstrndup(type, path, len) : path;
intern-file_name_len = len;
 
-   if (type == IS_UNICODE) {
-   p1.u = u_strrchr(path.u, '/');
-   } else {
-   p1.s = strrchr(path.s, '/');
-   }
+   while (1) {
+   if (type == IS_UNICODE) {
+   p1.u = u_strrchr(intern-file_name.u, '/');
+   } else {
+   p1.s = strrchr(intern-file_name.s, '/');
+   }
 #if defined(PHP_WIN32) || defined(NETWARE)
-   if (type == IS_UNICODE) {
-   p2.u = u_strrchr(path.u, '\\');
-   } else {
-   p2.s = strrchr(path.s, '\\');
-   }
+   if (type == IS_UNICODE) {
+   p2.u = u_strrchr(intern-file_name.u, '\\');
+   } else {
+   p2.s = strrchr(intern-file_name.s, '\\');
+   }
 #else
-   p2.v = 0;
+   p2.v = 0;
 #endif
-   if (p1.v || p2.v) {
-   if (type == IS_UNICODE) {
-   intern-_path_len = (p1.u  p2.u ? p1.u : p2.u) - 
path.u;
+   if (p1.v || p2.v) {
+   zstr slash_pos;
+   
+   if (type == IS_UNICODE) {
+   slash_pos.u = (p1.u  p2.u ? p1.u : p2.u);
+   if (IS_SLASH_AT(type, intern-file_name, 
intern-file_name_len)) {
+   intern-file_name_len = slash_pos.u - 
intern-file_name.u;
+   
intern-file_name.u[intern-file_name_len] = 0;
+   continue;
+   }
+   intern-_path_len = slash_pos.u - 
intern-file_name.u;
+   } else {
+   slash_pos.s = (p1.s  p2.s ? p1.s : p2.s);
+   if (IS_SLASH_AT(type, intern-file_name, 
intern-file_name_len)) {
+   intern-file_name_len = slash_pos.s - 
intern-file_name.s;
+   
intern-file_name.s[intern-file_name_len] = 0;
+   continue;
+   }
+   intern-_path_len = slash_pos.s - 
intern-file_name.s;
+   }
} else {
-   intern-_path_len = (p1.s  p2.s ? p1.s : p2.s) - 
path.s;
+   intern-_path_len = 0;
}
-   } else {
-   intern-_path_len = 0;
+   break;
}
+
intern-_path_type = type;
intern-_path = ezstrndup(type, path, intern-_path_len);
 } /* }}} */
@@ -542,6 +560,27 @@
 }
 /* }}} */
 
+static zstr spl_filesystem_object_get_pathname(spl_filesystem_object *intern, 
int *len, zend_uchar *type  TSRMLS_DC) { /* {{{ */
+   switch (intern-type) {
+   case SPL_FS_INFO:
+   case SPL_FS_FILE:
+   *len = intern-file_name_len;
+   *type = intern-file_name_type;
+   return intern-file_name;
+   case SPL_FS_DIR:
+   if (intern-u.dir.entry.d_name[0]) {
+   spl_filesystem_object_get_file_name(intern TSRMLS_CC);
+   *len = intern-file_name_len;
+   *type = intern-file_name_type;
+   return intern-file_name;
+   }
+   }
+   *len  = 0;
+   *type = IS_STRING;
+   return intern-file_name; /* dummy */
+}
+/* }}} */
+
 static HashTable* spl_filesystem_object_get_debug_info(zval *obj, int *is_temp 
TSRMLS_DC) /*  */
 {
spl_filesystem_object *intern = 
(spl_filesystem_object*)zend_object_store_get_object(obj TSRMLS_CC);
@@ -564,13 +603,23 @@
 
zend_hash_copy(rv, intern-std.properties, 

[PHP-CVS] cvs: php-src(PHP_5_3) /ext/spl spl_directory.c /ext/spl/tests dit_001.phpt fileobject_003.phpt fileobject_getfileinfo_basic.phpt

2008-07-08 Thread Etienne Kneuss
colder  Tue Jul  8 22:40:49 2008 UTC

  Modified files:  (Branch: PHP_5_3)
/php-src/ext/splspl_directory.c 
/php-src/ext/spl/tests  dit_001.phpt fileobject_003.phpt 
fileobject_getfileinfo_basic.phpt 
  Log:
  MFH: - Fix filename in debug_info
  - Fix #45345 (getPathInfo on the file instead of the dir)
  - Remove trailing / on input
  http://cvs.php.net/viewvc.cgi/php-src/ext/spl/spl_directory.c?r1=1.45.2.27.2.23.2.23r2=1.45.2.27.2.23.2.24diff_format=u
Index: php-src/ext/spl/spl_directory.c
diff -u php-src/ext/spl/spl_directory.c:1.45.2.27.2.23.2.23 
php-src/ext/spl/spl_directory.c:1.45.2.27.2.23.2.24
--- php-src/ext/spl/spl_directory.c:1.45.2.27.2.23.2.23 Wed Jul  2 10:47:11 2008
+++ php-src/ext/spl/spl_directory.c Tue Jul  8 22:40:48 2008
@@ -16,7 +16,7 @@
+--+
  */
 
-/* $Id: spl_directory.c,v 1.45.2.27.2.23.2.23 2008/07/02 10:47:11 tony2001 Exp 
$ */
+/* $Id: spl_directory.c,v 1.45.2.27.2.23.2.24 2008/07/08 22:40:48 colder Exp $ 
*/
 
 #ifdef HAVE_CONFIG_H
 # include config.h
@@ -347,17 +347,23 @@
intern-file_name = use_copy ? estrndup(path, len) : path;
intern-file_name_len = len;
 
-   p1 = strrchr(path, '/');
+   while(IS_SLASH_AT(intern-file_name, intern-file_name_len-1)) {
+   intern-file_name[intern-file_name_len-1] = 0;
+   intern-file_name_len--;
+   }
+
+   p1 = strrchr(intern-file_name, '/');
 #if defined(PHP_WIN32) || defined(NETWARE)
-   p2 = strrchr(path, '\\');
+   p2 = strrchr(intern-file_name, '\\');
 #else
p2 = 0;
 #endif
if (p1 || p2) {
-   intern-_path_len = (p1  p2 ? p1 : p2) - path;
+   intern-_path_len = (p1  p2 ? p1 : p2) - intern-file_name;
} else {
intern-_path_len = 0;
}
+
intern-_path = estrndup(path, intern-_path_len);
 } /* }}} */
 
@@ -499,7 +505,25 @@
 }
 /* }}} */
 
-static HashTable* spl_filesystem_object_get_debug_info(zval *obj, int *is_temp 
TSRMLS_DC) /*  */
+static char *spl_filesystem_object_get_pathname(spl_filesystem_object *intern, 
int *len TSRMLS_DC) { /* {{{ */
+   switch (intern-type) {
+   case SPL_FS_INFO:
+   case SPL_FS_FILE:
+   *len = intern-file_name_len;
+   return intern-file_name;
+   case SPL_FS_DIR:
+   if (intern-u.dir.entry.d_name[0]) {
+   spl_filesystem_object_get_file_name(intern TSRMLS_CC);
+   *len = intern-file_name_len;
+   return intern-file_name;
+   }
+   }
+   *len = 0;
+   return NULL;
+}
+/* }}} */
+
+static HashTable* spl_filesystem_object_get_debug_info(zval *obj, int *is_temp 
TSRMLS_DC) /* {{{ */
 {
spl_filesystem_object *intern = 
(spl_filesystem_object*)zend_object_store_get_object(obj TSRMLS_CC);
HashTable *rv;
@@ -518,13 +542,20 @@
 
zend_hash_copy(rv, intern-std.properties, (copy_ctor_func_t) 
zval_add_ref, (void *) tmp, sizeof(zval *));
 
-   path = spl_filesystem_object_get_path(intern, path_len TSRMLS_CC);
pnstr = spl_gen_private_prop_name(spl_ce_SplFileInfo, pathName, 
sizeof(pathName)-1, pnlen TSRMLS_CC);
+   path = spl_filesystem_object_get_pathname(intern, path_len TSRMLS_CC);
add_assoc_stringl_ex(zrv, pnstr, pnlen+1, path, path_len, 1);
efree(pnstr);
+
if (intern-file_name) {
pnstr = spl_gen_private_prop_name(spl_ce_SplFileInfo, 
fileName, sizeof(fileName)-1, pnlen TSRMLS_CC);
-   add_assoc_stringl_ex(zrv, pnstr, pnlen+1, intern-file_name, 
intern-file_name_len, 1);
+   spl_filesystem_object_get_path(intern, path_len TSRMLS_CC);
+   
+   if (path_len  path_len  intern-file_name_len) {
+   add_assoc_stringl_ex(zrv, pnstr, pnlen+1, 
intern-file_name + path_len + 1, intern-file_name_len - (path_len + 1), 1);
+   } else {
+   add_assoc_stringl_ex(zrv, pnstr, pnlen+1, 
intern-file_name, intern-file_name_len, 1);
+   }
efree(pnstr);
}
if (intern-type == SPL_FS_DIR) {
@@ -560,7 +591,7 @@
 
return rv;
 }
-/*  */
+/* }}} */
 
 #define DIT_CTOR_FLAGS  0x0001
 #define DIT_CTOR_GLOB   0x0002
@@ -775,18 +806,14 @@
 SPL_METHOD(SplFileInfo, getPathname)
 {
spl_filesystem_object *intern = 
(spl_filesystem_object*)zend_object_store_get_object(getThis() TSRMLS_CC);
-
-   switch (intern-type) {
-   case SPL_FS_INFO:
-   case SPL_FS_FILE:
-   RETURN_STRINGL(intern-file_name, intern-file_name_len, 1);
-   case SPL_FS_DIR:
-   if (intern-u.dir.entry.d_name[0]) {
-   spl_filesystem_object_get_file_name(intern TSRMLS_CC);
-   RETURN_STRINGL(intern-file_name, 
intern-file_name_len, 1);
-  

[PHP-CVS] cvs: php-src /ext/spl spl_directory.c /ext/spl/tests fileobject_003.phpt

2008-07-08 Thread Etienne Kneuss
colder  Tue Jul  8 22:49:35 2008 UTC

  Modified files:  
/php-src/ext/splspl_directory.c 
/php-src/ext/spl/tests  fileobject_003.phpt 
  Log:
  Woopsy
  
http://cvs.php.net/viewvc.cgi/php-src/ext/spl/spl_directory.c?r1=1.158r2=1.159diff_format=u
Index: php-src/ext/spl/spl_directory.c
diff -u php-src/ext/spl/spl_directory.c:1.158 
php-src/ext/spl/spl_directory.c:1.159
--- php-src/ext/spl/spl_directory.c:1.158   Tue Jul  8 22:40:29 2008
+++ php-src/ext/spl/spl_directory.c Tue Jul  8 22:49:35 2008
@@ -16,7 +16,7 @@
+--+
  */
 
-/* $Id: spl_directory.c,v 1.158 2008/07/08 22:40:29 colder Exp $ */
+/* $Id: spl_directory.c,v 1.159 2008/07/08 22:49:35 colder Exp $ */
 
 #ifdef HAVE_CONFIG_H
 # include config.h
@@ -394,7 +394,7 @@

if (type == IS_UNICODE) {
slash_pos.u = (p1.u  p2.u ? p1.u : p2.u);
-   if (IS_SLASH_AT(type, intern-file_name, 
intern-file_name_len)) {
+   if (IS_SLASH_AT(type, intern-file_name, 
intern-file_name_len-1)) {
intern-file_name_len = slash_pos.u - 
intern-file_name.u;

intern-file_name.u[intern-file_name_len] = 0;
continue;
@@ -402,7 +402,7 @@
intern-_path_len = slash_pos.u - 
intern-file_name.u;
} else {
slash_pos.s = (p1.s  p2.s ? p1.s : p2.s);
-   if (IS_SLASH_AT(type, intern-file_name, 
intern-file_name_len)) {
+   if (IS_SLASH_AT(type, intern-file_name, 
intern-file_name_len-1)) {
intern-file_name_len = slash_pos.s - 
intern-file_name.s;

intern-file_name.s[intern-file_name_len] = 0;
continue;
http://cvs.php.net/viewvc.cgi/php-src/ext/spl/tests/fileobject_003.phpt?r1=1.9r2=1.10diff_format=u
Index: php-src/ext/spl/tests/fileobject_003.phpt
diff -u php-src/ext/spl/tests/fileobject_003.phpt:1.9 
php-src/ext/spl/tests/fileobject_003.phpt:1.10
--- php-src/ext/spl/tests/fileobject_003.phpt:1.9   Tue Jul  8 22:40:30 2008
+++ php-src/ext/spl/tests/fileobject_003.phpt   Tue Jul  8 22:49:35 2008
@@ -71,15 +71,15 @@
 ===1===
 object(SplFileInfo)#%d (2) {
   [upathName:uSplFileInfo:private]=
-  unicode(%d) %s
+  unicode(%d) %s%etests
   [ufileName:uSplFileInfo:private]=
-  unicode(%d) 
+  unicode(%d) tests
 }
 object(SplFileInfo)#%d (2) {
   [upathName:uSplFileInfo:private]=
   unicode(%d) %s
   [ufileName:uSplFileInfo:private]=
-  unicode(%d) 
+  unicode(%d) tests
 }
 bool(false)
 bool(true)
@@ -92,8 +92,8 @@
 string(%d) %sspl
 bool(true)
 unicode(%d) %stests
-unicode(%d) %stests
-unicode(%d) %stests
+unicode(%d) tests
+unicode(%d) %s%espl
 ===2===
 object(SplFileInfo)#%d (2) {
   [upathName:uSplFileInfo:private]=
@@ -103,7 +103,7 @@
 }
 object(SplFileInfo)#%d (2) {
   [upathName:uSplFileInfo:private]=
-  unicode(%d) %s
+  unicode(%d) %s%etests
   [ufileName:uSplFileInfo:private]=
   unicode(%d) %s
 }



-- 
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) / NEWS

2008-07-08 Thread Scott MacVicar
scottmacTue Jul  8 12:15:40 2008 UTC

  Modified files:  (Branch: PHP_5_3)
/php-srcNEWS 
  Log:
  Typo, missing items and clarify what sqlite was updated.
  
http://cvs.php.net/viewvc.cgi/php-src/NEWS?r1=1.2027.2.547.2.965.2.195r2=1.2027.2.547.2.965.2.196diff_format=u
Index: php-src/NEWS
diff -u php-src/NEWS:1.2027.2.547.2.965.2.195 
php-src/NEWS:1.2027.2.547.2.965.2.196
--- php-src/NEWS:1.2027.2.547.2.965.2.195   Tue Jul  8 10:28:52 2008
+++ php-src/NEWSTue Jul  8 12:15:39 2008
@@ -2,7 +2,7 @@
 |||
 ?? ??? 20??, PHP 5.3.0
 - Upgraded bundled PCRE to version 7.7 (Nuno)
-- Upgraded bundled sqlite to version 3.5.6. (Scott)
+- Upgraded bundled PDO sqlite to version 3.5.6. (Scott)
 
 - Moved extensions to PECL (Pierre):
   . ext/fdpf
@@ -12,9 +12,9 @@
 - Removed the experimental RPL (master/slave) functions from mysqli. (Andrey)
 - Removed zend.ze1_compatibility_mode. (Dmitry)
 
-- Changed PCRE extension to be enabled always. (Marcus)
+- Changed PCRE, SPL and reflection extensions to always be enabled. (Marcus)
 - Changed md5() to use improved implementation. (Solar Designer, Dmitry)
-- Changed mhash to be a wrapper layer around the hash extesion. (Scott)
+- Changed mhash to be a wrapper layer around the hash extension. (Scott)
 
 - Improved PHP syntax and semantics:
   . Added jump label operator (limited goto). (Dmitry, Sara)
@@ -194,7 +194,7 @@
   to different characters with cp1251 and cp866. (Scott)
 - Fixed an issue in date() where a : was printed for the O modifier after a P
   modifier was used. (Derick)
-- Fixed an issue where exec() on Windows would eat the first and last double 
quotes
+- Fixed an issue where exec() on Windows would eat the first and last double 
quotes.
   (Scott)
 
 - Fixed PECL bug #12431 (OCI8 ping functionality is broken). (Oracle Corp.)



-- 
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php