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

2008-12-02 Thread changelog
changelog   Wed Dec  3 01:32:32 2008 UTC

  Modified files:  
/php-srcChangeLog 
  Log:
  ChangeLog update
  http://cvs.php.net/viewvc.cgi/php-src/ChangeLog?r1=1.3246r2=1.3247diff_format=u
Index: php-src/ChangeLog
diff -u php-src/ChangeLog:1.3246 php-src/ChangeLog:1.3247
--- php-src/ChangeLog:1.3246Tue Dec  2 01:32:21 2008
+++ php-src/ChangeLog   Wed Dec  3 01:32:31 2008
@@ -1,3 +1,861 @@
+2008-12-02  Felipe Pena  [EMAIL PROTECTED]
+
+* (PHP_5_2)
+  ext/pdo_sqlite/tests/pdo_sqlite_createaggregate.phpt
+  ext/pdo_sqlite/tests/pdo_sqlite_createfunction.phpt
+  ext/pdo_sqlite/tests/pdo_sqlite_lastinsertid.phpt:
+  - Fixed tests
+
+2008-12-02  Christian Seiler  [EMAIL PROTECTED]
+
+* (PHP_5_3)
+  ZendEngine2/acinclude.m4:
+  - MFH: Fixed autoconf 2.13 issues with FP checks.
+
+* ZendEngine2/acinclude.m4:
+  - Fixed autoconf 2.13 issues with FP checks.
+
+2008-12-02  Felipe Pena  [EMAIL PROTECTED]
+
+* (PHP_5_2)
+  ext/pdo_sqlite/sqlite_driver.c
+  ext/pdo_sqlite/sqlite_driver.c
+  ext/pdo_sqlite/tests/pdo_sqlite_createaggregate.phpt
+  ext/pdo_sqlite/tests/pdo_sqlite_createaggregate.phpt
+  ext/pdo_sqlite/tests/pdo_sqlite_createfunction.phpt
+  ext/pdo_sqlite/tests/pdo_sqlite_createfunction.phpt
+  ext/pdo_sqlite/tests/pdo_sqlite_lastinsertid.phpt
+  ext/pdo_sqlite/tests/pdo_sqlite_lastinsertid.phpt
+  ext/pdo_sqlite/tests/pdo_sqlite_transaction.phpt
+  ext/pdo_sqlite/tests/pdo_sqlite_transaction.phpt:
+  MFH:
+  - Fixed memory leaks
+  - Added new tests (Coverage++)
+
+* ext/pdo_sqlite/sqlite_driver.c
+  ext/pdo_sqlite/tests/pdo_sqlite_createaggregate.phpt
+  ext/pdo_sqlite/tests/pdo_sqlite_createaggregate.phpt
+  ext/pdo_sqlite/tests/pdo_sqlite_createaggregate.phpt
+  ext/pdo_sqlite/tests/pdo_sqlite_createfunction.phpt
+  ext/pdo_sqlite/tests/pdo_sqlite_createfunction.phpt
+  ext/pdo_sqlite/tests/pdo_sqlite_createfunction.phpt
+  ext/pdo_sqlite/tests/pdo_sqlite_lastinsertid.phpt
+  ext/pdo_sqlite/tests/pdo_sqlite_lastinsertid.phpt
+  ext/pdo_sqlite/tests/pdo_sqlite_lastinsertid.phpt
+  ext/pdo_sqlite/tests/pdo_sqlite_transaction.phpt
+  ext/pdo_sqlite/tests/pdo_sqlite_transaction.phpt
+  ext/pdo_sqlite/tests/pdo_sqlite_transaction.phpt:
+  - Fixed memory leaks
+  - Added new tests (Coverage++)
+
+2008-12-02  Derick Rethans  [EMAIL PROTECTED]
+
+* (PHP_5_2)
+  NEWS
+  ext/date/php_date.c
+  ext/date/php_date.c
+  ext/date/tests/mktime-3-64bit.phpt
+  ext/date/tests/mktime-3-64bit.phpt:
+  - MFH: Fixed bug #46732 (mktime.year description is wrong).
+
+* ext/date/php_date.c
+  ext/date/tests/mktime-3-64bit.phpt:
+  - Fixed bug #46732 (mktime.year description is wrong).
+
+2008-12-02  Christian Seiler  [EMAIL PROTECTED]
+
+* (PHP_5_3)
+  NEWS:
+  
+
+* (PHP_5_3)
+  ext/standard/basic_functions.c
+  ext/standard/config.m4
+  ext/standard/math.c
+  ext/standard/php_math.h
+  ext/standard/tests/math/round_large_exp.phpt
+  ext/standard/tests/math/round_modes.phpt
+  ext/standard/tests/math/round_prerounding.phpt:
+  - MFH: Implemented http://wiki.php.net/rfc/rounding
+
+* ext/standard/basic_functions.c
+  ext/standard/config.m4
+  ext/standard/math.c
+  ext/standard/php_math.h
+  ext/standard/tests/math/round_large_exp.phpt
+  ext/standard/tests/math/round_large_exp.phpt
+  ext/standard/tests/math/round_modes.phpt
+  ext/standard/tests/math/round_modes.phpt
+  ext/standard/tests/math/round_prerounding.phpt
+  ext/standard/tests/math/round_prerounding.phpt:
+  - Implemented http://wiki.php.net/rfc/rounding
+
+* (PHP_5_3)
+  ZendEngine2/Zend.m4
+  ZendEngine2/acinclude.m4
+  ZendEngine2/zend_float.h
+  ZendEngine2/zend_operators.c
+  ZendEngine2/zend_strtod.c
+  ZendEngine2/tests/float_prec_001.phpt:
+  - MFH: Changed floating point behaviour to consistently use double
+  precision
+on all platforms and with all compilers.
+
+* ZendEngine2/acinclude.m4
+  ZendEngine2/zend_float.h
+  ZendEngine2/zend_float.h:
+  - Fixed comment style.
+
+* ZendEngine2/Zend.m4
+  ZendEngine2/acinclude.m4
+  ZendEngine2/zend_float.h
+  ZendEngine2/zend_operators.c
+  ZendEngine2/zend_strtod.c
+  ZendEngine2/tests/float_prec_001.phpt
+  ZendEngine2/tests/float_prec_001.phpt:
+  - Changed floating point behaviour to consistently use double precision 
on
+all platforms and with all compilers.
+
+2008-12-02  Matt Wilmas  [EMAIL PROTECTED]
+
+* ext/json/JSON_parser.c:
+  Changed logic for LONG_MIN
+
+2008-12-02  Ant Phillips  [EMAIL PROTECTED]
+
+* (PHP_5_2)
+  ext/standard/tests/array/array_count_values_error.phpt
+  ext/standard/tests/array/array_count_values_error.phpt
+  

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

2008-12-02 Thread changelog
changelog   Wed Dec  3 01:32:38 2008 UTC

  Modified files:  
/ZendEngine2ChangeLog 
  Log:
  ChangeLog update
  
http://cvs.php.net/viewvc.cgi/ZendEngine2/ChangeLog?r1=1.1407r2=1.1408diff_format=u
Index: ZendEngine2/ChangeLog
diff -u ZendEngine2/ChangeLog:1.1407 ZendEngine2/ChangeLog:1.1408
--- ZendEngine2/ChangeLog:1.1407Fri Nov 28 01:32:28 2008
+++ ZendEngine2/ChangeLog   Wed Dec  3 01:32:38 2008
@@ -1,3 +1,38 @@
+2008-12-02  Christian Seiler  [EMAIL PROTECTED]
+
+* (PHP_5_3)
+  acinclude.m4:
+  - MFH: Fixed autoconf 2.13 issues with FP checks.
+
+* acinclude.m4:
+  - Fixed autoconf 2.13 issues with FP checks.
+
+* (PHP_5_3)
+  Zend.m4
+  acinclude.m4
+  zend_float.h
+  zend_operators.c
+  zend_strtod.c
+  tests/float_prec_001.phpt:
+  - MFH: Changed floating point behaviour to consistently use double
+  precision
+on all platforms and with all compilers.
+
+* acinclude.m4
+  zend_float.h
+  zend_float.h:
+  - Fixed comment style.
+
+* Zend.m4
+  acinclude.m4
+  zend_float.h
+  zend_operators.c
+  zend_strtod.c
+  tests/float_prec_001.phpt
+  tests/float_prec_001.phpt:
+  - Changed floating point behaviour to consistently use double precision 
on
+all platforms and with all compilers.
+
 2008-11-27  Dmitry Stogov  [EMAIL PROTECTED]
 
 * zend_API.c
@@ -26794,7 +26829,7 @@
 2003-06-10  Jani Taskinen  [EMAIL PROTECTED]
 
 * zend_multiply.h:
-  - Missing $Id: ChangeLog,v 1.1407 2008/11/28 01:32:28 changelog Exp $ tag
+  - Missing $Id: ChangeLog,v 1.1408 2008/12/03 01:32:38 changelog Exp $ tag
 
 2003-06-10  James Cox  [EMAIL PROTECTED]
 
@@ -28518,7 +28553,7 @@
   zend_types.h
   zend_variables.c
   zend_variables.h:
-  - Added some missing CVS $Id: ChangeLog,v 1.1407 2008/11/28 01:32:28 
changelog Exp $ tags, headers and footers.
+  - Added some missing CVS $Id: ChangeLog,v 1.1408 2008/12/03 01:32:38 
changelog Exp $ tags, headers and footers.
 
 2003-01-30  Ilia Alshanetsky  [EMAIL PROTECTED]
 




[PHP-CVS] cvs: php-src /main php_scandir.c php_scandir.h

2008-12-02 Thread Pierre-Alain Joye
pajoye  Tue Dec  2 10:15:41 2008 UTC

  Modified files:  
/php-src/main   php_scandir.c php_scandir.h 
  Log:
  - MFB: export php_scandir and php_alphasort correctly (used by APC for 
example)
  
http://cvs.php.net/viewvc.cgi/php-src/main/php_scandir.c?r1=1.19r2=1.20diff_format=u
Index: php-src/main/php_scandir.c
diff -u php-src/main/php_scandir.c:1.19 php-src/main/php_scandir.c:1.20
--- php-src/main/php_scandir.c:1.19 Mon Dec 31 07:12:18 2007
+++ php-src/main/php_scandir.c  Tue Dec  2 10:15:41 2008
@@ -17,7 +17,7 @@
+--+
  */
 
-/* $Id: php_scandir.c,v 1.19 2007/12/31 07:12:18 sebastian Exp $ */
+/* $Id: php_scandir.c,v 1.20 2008/12/02 10:15:41 pajoye Exp $ */
 
 #include php.h
 #include php_scandir.h
@@ -50,14 +50,14 @@
 #include string.h
 #endif
 
-int php_alphasort(const struct dirent **a, const struct dirent **b)
+PHPAPI int php_alphasort(const struct dirent **a, const struct dirent **b)
 {
return strcoll((*a)-d_name,(*b)-d_name);
 }
 #endif /* HAVE_ALPHASORT */
 
 #ifndef HAVE_SCANDIR
-int php_scandir(const char *dirname, struct dirent **namelist[], int 
(*selector) (const struct dirent *entry), int (*compare) (const struct dirent 
**a, const struct dirent **b))
+PHPAPI int php_scandir(const char *dirname, struct dirent **namelist[], int 
(*selector) (const struct dirent *entry), int (*compare) (const struct dirent 
**a, const struct dirent **b))
 {
DIR *dirp = NULL;
struct dirent **vector = NULL;
http://cvs.php.net/viewvc.cgi/php-src/main/php_scandir.h?r1=1.15r2=1.16diff_format=u
Index: php-src/main/php_scandir.h
diff -u php-src/main/php_scandir.h:1.15 php-src/main/php_scandir.h:1.16
--- php-src/main/php_scandir.h:1.15 Mon Dec 31 07:12:18 2007
+++ php-src/main/php_scandir.h  Tue Dec  2 10:15:41 2008
@@ -17,7 +17,7 @@
+--+
 */
 
-/* $Id: php_scandir.h,v 1.15 2007/12/31 07:12:18 sebastian Exp $ */
+/* $Id: php_scandir.h,v 1.16 2008/12/02 10:15:41 pajoye Exp $ */
 
 #ifndef PHP_SCANDIR_H
 #define PHP_SCANDIR_H
@@ -42,13 +42,13 @@
 #ifdef HAVE_SCANDIR
 #define php_scandirscandir
 #else
-int php_scandir(const char *dirname, struct dirent **namelist[], int 
(*selector) (const struct dirent *entry), int (*compare) (const struct dirent 
**a, const struct dirent **b));
+PHPAPI int php_scandir(const char *dirname, struct dirent **namelist[], int 
(*selector) (const struct dirent *entry), int (*compare) (const struct dirent 
**a, const struct dirent **b));
 #endif
 
 #ifdef HAVE_ALPHASORT
 #define php_alphasort  alphasort
 #else
-int php_alphasort(const struct dirent **a, const struct dirent **b);
+PHPAPI int php_alphasort(const struct dirent **a, const struct dirent **b);
 #endif
 
 #endif /* PHP_SCANDIR_H */



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



[PHP-CVS] cvs: php-src /ext/json JSON_parser.c

2008-12-02 Thread Matt Wilmas
mattwil Tue Dec  2 14:50:01 2008 UTC

  Modified files:  
/php-src/ext/json   JSON_parser.c 
  Log:
  Changed logic for LONG_MIN
  
http://cvs.php.net/viewvc.cgi/php-src/ext/json/JSON_parser.c?r1=1.18r2=1.19diff_format=u
Index: php-src/ext/json/JSON_parser.c
diff -u php-src/ext/json/JSON_parser.c:1.18 php-src/ext/json/JSON_parser.c:1.19
--- php-src/ext/json/JSON_parser.c:1.18 Wed Jul 30 13:57:47 2008
+++ php-src/ext/json/JSON_parser.c  Tue Dec  2 14:50:01 2008
@@ -278,7 +278,7 @@
 
if (type == IS_LONG) {
double d = zend_strtod(buf-c, NULL);
-   if (d  LONG_MAX || d  -LONG_MAX) {
+   if (d  LONG_MAX || d  LONG_MIN) {
ZVAL_DOUBLE(*z, d);
} else {
ZVAL_LONG(*z, (long)d);



-- 
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/json JSON_parser.c

2008-12-02 Thread Matt Wilmas
mattwil Tue Dec  2 14:50:22 2008 UTC

  Modified files:  (Branch: PHP_5_3)
/php-src/ext/json   JSON_parser.c 
  Log:
  MFH: Changed logic for LONG_MIN
  
http://cvs.php.net/viewvc.cgi/php-src/ext/json/JSON_parser.c?r1=1.1.2.12.2.2r2=1.1.2.12.2.3diff_format=u
Index: php-src/ext/json/JSON_parser.c
diff -u php-src/ext/json/JSON_parser.c:1.1.2.12.2.2 
php-src/ext/json/JSON_parser.c:1.1.2.12.2.3
--- php-src/ext/json/JSON_parser.c:1.1.2.12.2.2 Wed Jul 30 13:52:59 2008
+++ php-src/ext/json/JSON_parser.c  Tue Dec  2 14:50:22 2008
@@ -285,7 +285,7 @@
 if (type == IS_LONG)
 {
double d = zend_strtod(buf-c, NULL);
-   if (d  LONG_MAX || d  -LONG_MAX) {
+   if (d  LONG_MAX || d  LONG_MIN) {
ZVAL_DOUBLE(*z, d);
} else {
ZVAL_LONG(*z, (long)d);



-- 
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/json JSON_parser.c

2008-12-02 Thread Matt Wilmas
mattwil Tue Dec  2 14:50:37 2008 UTC

  Modified files:  (Branch: PHP_5_2)
/php-src/ext/json   JSON_parser.c 
  Log:
  MFH: Changed logic for LONG_MIN
  
http://cvs.php.net/viewvc.cgi/php-src/ext/json/JSON_parser.c?r1=1.1.2.13r2=1.1.2.14diff_format=u
Index: php-src/ext/json/JSON_parser.c
diff -u php-src/ext/json/JSON_parser.c:1.1.2.13 
php-src/ext/json/JSON_parser.c:1.1.2.14
--- php-src/ext/json/JSON_parser.c:1.1.2.13 Wed Jul 30 13:55:27 2008
+++ php-src/ext/json/JSON_parser.c  Tue Dec  2 14:50:37 2008
@@ -285,7 +285,7 @@
 if (type == IS_LONG)
 {
double d = zend_strtod(buf-c, NULL);
-   if (d  LONG_MAX || d  -LONG_MAX) {
+   if (d  LONG_MAX || d  LONG_MIN) {
ZVAL_DOUBLE(*z, d);
} else {
ZVAL_LONG(*z, (long)d);



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



[PHP-CVS] cvs: CVSROOT / avail

2008-12-02 Thread Derick Rethans
derick  Tue Dec  2 14:53:55 2008 UTC

  Modified files:  
/CVSROOTavail 
  Log:
  - Give Mike ssh2 karma, he's taking over.
  
  
http://cvs.php.net/viewvc.cgi/CVSROOT/avail?r1=1.1472r2=1.1473diff_format=u
Index: CVSROOT/avail
diff -u CVSROOT/avail:1.1472 CVSROOT/avail:1.1473
--- CVSROOT/avail:1.1472Mon Dec  1 22:27:49 2008
+++ CVSROOT/avail   Tue Dec  2 14:53:54 2008
@@ -301,6 +301,7 @@
 avail|jawed|pecl/oauth
 avail|sean|pecl/parsekit
 avail|magicaltux|php-src/ext/wddx
+avail|mikesul|pecl/ssh2
 
 
 # Objective-C bridge



-- 
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) /main php_scandir.c php_scandir.h

2008-12-02 Thread Pierre-Alain Joye
pajoye  Tue Dec  2 10:15:08 2008 UTC

  Modified files:  (Branch: PHP_5_3)
/php-src/main   php_scandir.c php_scandir.h 
  Log:
  - export php_scandir and php_alphasort correctly (used by APC for example)
  
http://cvs.php.net/viewvc.cgi/php-src/main/php_scandir.c?r1=1.12.2.1.2.5.2.1r2=1.12.2.1.2.5.2.2diff_format=u
Index: php-src/main/php_scandir.c
diff -u php-src/main/php_scandir.c:1.12.2.1.2.5.2.1 
php-src/main/php_scandir.c:1.12.2.1.2.5.2.2
--- php-src/main/php_scandir.c:1.12.2.1.2.5.2.1 Mon Dec 31 07:17:17 2007
+++ php-src/main/php_scandir.c  Tue Dec  2 10:15:08 2008
@@ -17,7 +17,7 @@
+--+
  */
 
-/* $Id: php_scandir.c,v 1.12.2.1.2.5.2.1 2007/12/31 07:17:17 sebastian Exp $ */
+/* $Id: php_scandir.c,v 1.12.2.1.2.5.2.2 2008/12/02 10:15:08 pajoye Exp $ */
 
 #include php.h
 #include php_scandir.h
@@ -50,14 +50,14 @@
 #include string.h
 #endif
 
-int php_alphasort(const struct dirent **a, const struct dirent **b)
+PHPAPI int php_alphasort(const struct dirent **a, const struct dirent **b)
 {
return strcoll((*a)-d_name,(*b)-d_name);
 }
 #endif /* HAVE_ALPHASORT */
 
 #ifndef HAVE_SCANDIR
-int php_scandir(const char *dirname, struct dirent **namelist[], int 
(*selector) (const struct dirent *entry), int (*compare) (const struct dirent 
**a, const struct dirent **b))
+PHPAPI int php_scandir(const char *dirname, struct dirent **namelist[], int 
(*selector) (const struct dirent *entry), int (*compare) (const struct dirent 
**a, const struct dirent **b))
 {
DIR *dirp = NULL;
struct dirent **vector = NULL;
http://cvs.php.net/viewvc.cgi/php-src/main/php_scandir.h?r1=1.12.2.1.2.1.2.1r2=1.12.2.1.2.1.2.2diff_format=u
Index: php-src/main/php_scandir.h
diff -u php-src/main/php_scandir.h:1.12.2.1.2.1.2.1 
php-src/main/php_scandir.h:1.12.2.1.2.1.2.2
--- php-src/main/php_scandir.h:1.12.2.1.2.1.2.1 Mon Dec 31 07:17:17 2007
+++ php-src/main/php_scandir.h  Tue Dec  2 10:15:08 2008
@@ -17,7 +17,7 @@
+--+
 */
 
-/* $Id: php_scandir.h,v 1.12.2.1.2.1.2.1 2007/12/31 07:17:17 sebastian Exp $ */
+/* $Id: php_scandir.h,v 1.12.2.1.2.1.2.2 2008/12/02 10:15:08 pajoye Exp $ */
 
 #ifndef PHP_SCANDIR_H
 #define PHP_SCANDIR_H
@@ -42,13 +42,13 @@
 #ifdef HAVE_SCANDIR
 #define php_scandirscandir
 #else
-int php_scandir(const char *dirname, struct dirent **namelist[], int 
(*selector) (const struct dirent *entry), int (*compare) (const struct dirent 
**a, const struct dirent **b));
+PHPAPI int php_scandir(const char *dirname, struct dirent **namelist[], int 
(*selector) (const struct dirent *entry), int (*compare) (const struct dirent 
**a, const struct dirent **b));
 #endif
 
 #ifdef HAVE_ALPHASORT
 #define php_alphasort  alphasort
 #else
-int php_alphasort(const struct dirent **a, const struct dirent **b);
+PHPAPI int php_alphasort(const struct dirent **a, const struct dirent **b);
 #endif
 
 #endif /* PHP_SCANDIR_H */



-- 
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/session/tests session_name_error.phpt session_save_path_error.phpt

2008-12-02 Thread Ant Phillips
ant Tue Dec  2 10:20:56 2008 UTC

  Modified files:  (Branch: PHP_5_3)
/php-src/ext/session/tests  session_save_path_error.phpt 
session_name_error.phpt 
  Log:
  Fix broken tests (thanks to Johannes for spotting these).
  
http://cvs.php.net/viewvc.cgi/php-src/ext/session/tests/session_save_path_error.phpt?r1=1.1.4.5r2=1.1.4.6diff_format=u
Index: php-src/ext/session/tests/session_save_path_error.phpt
diff -u php-src/ext/session/tests/session_save_path_error.phpt:1.1.4.5 
php-src/ext/session/tests/session_save_path_error.phpt:1.1.4.6
--- php-src/ext/session/tests/session_save_path_error.phpt:1.1.4.5  Thu Nov 
27 13:50:28 2008
+++ php-src/ext/session/tests/session_save_path_error.phpt  Tue Dec  2 
10:20:56 2008
@@ -171,6 +171,8 @@
 string(0) 
 
 -- Iteration 24 --
-string(0) 
+
+Warning: session_save_path() expects parameter 1 to be string, resource given 
in %s on line %d
+NULL
 Done
 
http://cvs.php.net/viewvc.cgi/php-src/ext/session/tests/session_name_error.phpt?r1=1.1.4.6r2=1.1.4.7diff_format=u
Index: php-src/ext/session/tests/session_name_error.phpt
diff -u php-src/ext/session/tests/session_name_error.phpt:1.1.4.6 
php-src/ext/session/tests/session_name_error.phpt:1.1.4.7
--- php-src/ext/session/tests/session_name_error.phpt:1.1.4.6   Thu Nov 27 
13:50:28 2008
+++ php-src/ext/session/tests/session_name_error.phpt   Tue Dec  2 10:20:56 2008
@@ -167,6 +167,8 @@
 string(0) 
 
 -- Iteration 24 --
-string(0) 
+
+Warning: session_name() expects parameter 1 to be string, resource given in %s 
on line %d
+NULL
 Done
 



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



[PHP-CVS] cvs: php-src /ext/standard basic_functions.c config.m4 math.c php_math.h /ext/standard/tests/math round_large_exp.phpt round_modes.phpt round_prerounding.phpt

2008-12-02 Thread Christian Seiler
cseiler Tue Dec  2 16:25:06 2008 UTC

  Added files: 
/php-src/ext/standard/tests/mathround_large_exp.phpt 
round_modes.phpt 
round_prerounding.phpt 

  Modified files:  
/php-src/ext/standard   basic_functions.c config.m4 math.c php_math.h 
  Log:
  - Implemented http://wiki.php.net/rfc/rounding
  
  http://cvs.php.net/viewvc.cgi/php-src/ext/standard/basic_functions.c?r1=1.942r2=1.943diff_format=u
Index: php-src/ext/standard/basic_functions.c
diff -u php-src/ext/standard/basic_functions.c:1.942 
php-src/ext/standard/basic_functions.c:1.943
--- php-src/ext/standard/basic_functions.c:1.942Sat Nov 29 00:47:51 2008
+++ php-src/ext/standard/basic_functions.c  Tue Dec  2 16:25:06 2008
@@ -17,7 +17,7 @@
+--+
  */
 
-/* $Id: basic_functions.c,v 1.942 2008/11/29 00:47:51 stas Exp $ */
+/* $Id: basic_functions.c,v 1.943 2008/12/02 16:25:06 cseiler Exp $ */
 
 #include php.h
 #include php_streams.h
@@ -1619,6 +1619,7 @@
 ZEND_BEGIN_ARG_INFO_EX(arginfo_round, 0, 0, 1)
ZEND_ARG_INFO(0, number)
ZEND_ARG_INFO(0, precision)
+   ZEND_ARG_INFO(0, mode)
 ZEND_END_ARG_INFO()
 
 ZEND_BEGIN_ARG_INFO(arginfo_sin, 0)
@@ -3553,6 +3554,11 @@
REGISTER_DOUBLE_CONSTANT(INF, php_get_inf(), CONST_CS | 
CONST_PERSISTENT);
REGISTER_DOUBLE_CONSTANT(NAN, php_get_nan(), CONST_CS | 
CONST_PERSISTENT);
 
+   REGISTER_LONG_CONSTANT(PHP_ROUND_HALF_UP, PHP_ROUND_HALF_UP, CONST_CS 
| CONST_PERSISTENT);
+   REGISTER_LONG_CONSTANT(PHP_ROUND_HALF_DOWN, PHP_ROUND_HALF_DOWN, 
CONST_CS | CONST_PERSISTENT);
+   REGISTER_LONG_CONSTANT(PHP_ROUND_HALF_EVEN, PHP_ROUND_HALF_EVEN, 
CONST_CS | CONST_PERSISTENT);
+   REGISTER_LONG_CONSTANT(PHP_ROUND_HALF_ODD, PHP_ROUND_HALF_ODD, 
CONST_CS | CONST_PERSISTENT);
+
 #if ENABLE_TEST_CLASS
test_class_startup();
 #endif
http://cvs.php.net/viewvc.cgi/php-src/ext/standard/config.m4?r1=1.92r2=1.93diff_format=u
Index: php-src/ext/standard/config.m4
diff -u php-src/ext/standard/config.m4:1.92 php-src/ext/standard/config.m4:1.93
--- php-src/ext/standard/config.m4:1.92 Mon Aug 25 13:42:46 2008
+++ php-src/ext/standard/config.m4  Tue Dec  2 16:25:06 2008
@@ -1,4 +1,4 @@
-dnl $Id: config.m4,v 1.92 2008/08/25 13:42:46 jani Exp $ -*- autoconf -*-
+dnl $Id: config.m4,v 1.93 2008/12/02 16:25:06 cseiler Exp $ -*- autoconf -*-
 
 divert(3)dnl
 
@@ -223,31 +223,6 @@
 divert(5)dnl
 
 dnl
-dnl round fuzz
-dnl
-AC_MSG_CHECKING([whether rounding works as expected])
-AC_TRY_RUN([
-#include math.h
-  /* keep this out-of-line to prevent use of gcc inline floor() */
-  double somefn(double n) {
-return floor(n*pow(10,2) + 0.5);
-  }
-  int main() {
-return somefn(0.045)/10.0 != 0.5;
-  }
-],[
-  PHP_ROUND_FUZZ=0.5
-  AC_MSG_RESULT(yes)
-],[
-  PHP_ROUND_FUZZ=0.501
-  AC_MSG_RESULT(no)
-],[
-  PHP_ROUND_FUZZ=0.501
-  AC_MSG_RESULT(cross compile)
-])
-AC_DEFINE_UNQUOTED(PHP_ROUND_FUZZ, $PHP_ROUND_FUZZ, [ see #24142 ])
-
-dnl
 dnl Check if there is a support means of creating a new process
 dnl and defining which handles it receives
 dnl
http://cvs.php.net/viewvc.cgi/php-src/ext/standard/math.c?r1=1.149r2=1.150diff_format=u
Index: php-src/ext/standard/math.c
diff -u php-src/ext/standard/math.c:1.149 php-src/ext/standard/math.c:1.150
--- php-src/ext/standard/math.c:1.149   Wed Oct 29 21:43:30 2008
+++ php-src/ext/standard/math.c Tue Dec  2 16:25:06 2008
@@ -19,69 +19,186 @@
+--+
 */
 
-/* $Id: math.c,v 1.149 2008/10/29 21:43:30 felixdv Exp $ */
+/* $Id: math.c,v 1.150 2008/12/02 16:25:06 cseiler Exp $ */
 
 #include php.h
 #include php_math.h
 #include zend_multiply.h
+#include zend_float.h
 
 #include math.h
 #include float.h
 #include stdlib.h
 
+/* {{{ php_intlog10abs
+   Returns floor(log10(fabs(val))), uses fast binary search */
+static inline int php_intlog10abs(double value) {
+   int result;
+   value = fabs(value);
+
+   if (value  1e-8 || value  1e23) {
+   result = (int)floor(log10(value));
+   } else {
+   static const double values[] = {
+   1e-8, 1e-7, 1e-6, 1e-5, 1e-4, 1e-3, 1e-2, 1e-1,
+   1e0,  1e1,  1e2,  1e3,  1e4,  1e5,  1e6,  1e7,
+   1e8,  1e9,  1e10, 1e11, 1e12, 1e13, 1e14, 1e15,
+   1e16, 1e17, 1e18, 1e19, 1e20, 1e21, 1e22};
+   /* Do a binary search with 5 steps */
+   result = 16;
+   if (value  values[result]) {
+   result -= 8;
+   } else {
+   result += 8;
+   }
+   if (value  values[result]) {
+   result -= 4;
+   } else {
+   result += 4;
+   }
+  

[PHP-CVS] cvs: php-src(PHP_5_3) /ext/standard basic_functions.c config.m4 math.c php_math.h /ext/standard/tests/math round_large_exp.phpt round_modes.phpt round_prerounding.phpt

2008-12-02 Thread Christian Seiler
cseiler Tue Dec  2 16:27:15 2008 UTC

  Added files: (Branch: PHP_5_3)
/php-src/ext/standard/tests/mathround_large_exp.phpt 
round_modes.phpt 
round_prerounding.phpt 

  Modified files:  
/php-src/ext/standard   basic_functions.c config.m4 math.c php_math.h 
  Log:
  - MFH: Implemented http://wiki.php.net/rfc/rounding
  
  http://cvs.php.net/viewvc.cgi/php-src/ext/standard/basic_functions.c?r1=1.725.2.31.2.64.2.77r2=1.725.2.31.2.64.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.64.2.77 
php-src/ext/standard/basic_functions.c:1.725.2.31.2.64.2.78
--- php-src/ext/standard/basic_functions.c:1.725.2.31.2.64.2.77 Sat Nov 29 
00:44:33 2008
+++ php-src/ext/standard/basic_functions.c  Tue Dec  2 16:27:14 2008
@@ -18,7 +18,7 @@
+--+
  */
 
-/* $Id: basic_functions.c,v 1.725.2.31.2.64.2.77 2008/11/29 00:44:33 stas Exp 
$ */
+/* $Id: basic_functions.c,v 1.725.2.31.2.64.2.78 2008/12/02 16:27:14 cseiler 
Exp $ */
 
 #include php.h
 #include php_streams.h
@@ -1632,6 +1632,7 @@
 ZEND_BEGIN_ARG_INFO_EX(arginfo_round, 0, 0, 1)
ZEND_ARG_INFO(0, number)
ZEND_ARG_INFO(0, precision)
+   ZEND_ARG_INFO(0, mode)
 ZEND_END_ARG_INFO()
 
 ZEND_BEGIN_ARG_INFO(arginfo_sin, 0)
@@ -3571,6 +3572,11 @@
REGISTER_DOUBLE_CONSTANT(INF, php_get_inf(), CONST_CS | 
CONST_PERSISTENT);
REGISTER_DOUBLE_CONSTANT(NAN, php_get_nan(), CONST_CS | 
CONST_PERSISTENT);
 
+   REGISTER_LONG_CONSTANT(PHP_ROUND_HALF_UP, PHP_ROUND_HALF_UP, CONST_CS 
| CONST_PERSISTENT);
+   REGISTER_LONG_CONSTANT(PHP_ROUND_HALF_DOWN, PHP_ROUND_HALF_DOWN, 
CONST_CS | CONST_PERSISTENT);
+   REGISTER_LONG_CONSTANT(PHP_ROUND_HALF_EVEN, PHP_ROUND_HALF_EVEN, 
CONST_CS | CONST_PERSISTENT);
+   REGISTER_LONG_CONSTANT(PHP_ROUND_HALF_ODD, PHP_ROUND_HALF_ODD, 
CONST_CS | CONST_PERSISTENT);
+
 #if ENABLE_TEST_CLASS
test_class_startup();
 #endif
http://cvs.php.net/viewvc.cgi/php-src/ext/standard/config.m4?r1=1.80.2.3.2.3.2.6r2=1.80.2.3.2.3.2.7diff_format=u
Index: php-src/ext/standard/config.m4
diff -u php-src/ext/standard/config.m4:1.80.2.3.2.3.2.6 
php-src/ext/standard/config.m4:1.80.2.3.2.3.2.7
--- php-src/ext/standard/config.m4:1.80.2.3.2.3.2.6 Mon Aug 25 13:42:54 2008
+++ php-src/ext/standard/config.m4  Tue Dec  2 16:27:15 2008
@@ -1,4 +1,4 @@
-dnl $Id: config.m4,v 1.80.2.3.2.3.2.6 2008/08/25 13:42:54 jani Exp $ -*- 
autoconf -*-
+dnl $Id: config.m4,v 1.80.2.3.2.3.2.7 2008/12/02 16:27:15 cseiler Exp $ -*- 
autoconf -*-
 
 divert(3)dnl
 
@@ -223,31 +223,6 @@
 divert(5)dnl
 
 dnl
-dnl round fuzz
-dnl
-AC_MSG_CHECKING([whether rounding works as expected])
-AC_TRY_RUN([
-#include math.h
-  /* keep this out-of-line to prevent use of gcc inline floor() */
-  double somefn(double n) {
-return floor(n*pow(10,2) + 0.5);
-  }
-  int main() {
-return somefn(0.045)/10.0 != 0.5;
-  }
-],[
-  PHP_ROUND_FUZZ=0.5
-  AC_MSG_RESULT(yes)
-],[
-  PHP_ROUND_FUZZ=0.501
-  AC_MSG_RESULT(no)
-],[
-  PHP_ROUND_FUZZ=0.501
-  AC_MSG_RESULT(cross compile)
-])
-AC_DEFINE_UNQUOTED(PHP_ROUND_FUZZ, $PHP_ROUND_FUZZ, [ see #24142 ])
-
-dnl
 dnl Check if there is a support means of creating a new process
 dnl and defining which handles it receives
 dnl
http://cvs.php.net/viewvc.cgi/php-src/ext/standard/math.c?r1=1.131.2.2.2.6.2.10r2=1.131.2.2.2.6.2.11diff_format=u
Index: php-src/ext/standard/math.c
diff -u php-src/ext/standard/math.c:1.131.2.2.2.6.2.10 
php-src/ext/standard/math.c:1.131.2.2.2.6.2.11
--- php-src/ext/standard/math.c:1.131.2.2.2.6.2.10  Wed Oct 29 20:03:34 2008
+++ php-src/ext/standard/math.c Tue Dec  2 16:27:15 2008
@@ -19,70 +19,186 @@
+--+
 */
 
-/* $Id: math.c,v 1.131.2.2.2.6.2.10 2008/10/29 20:03:34 iliaa Exp $ */
+/* $Id: math.c,v 1.131.2.2.2.6.2.11 2008/12/02 16:27:15 cseiler Exp $ */
 
 #include php.h
 #include php_math.h
 #include zend_multiply.h
+#include zend_float.h
 
 #include math.h
 #include float.h
 #include stdlib.h
 
+/* {{{ php_intlog10abs
+   Returns floor(log10(fabs(val))), uses fast binary search */
+static inline int php_intlog10abs(double value) {
+   int result;
+   value = fabs(value);
 
+   if (value  1e-8 || value  1e23) {
+   result = (int)floor(log10(value));
+   } else {
+   static const double values[] = {
+   1e-8, 1e-7, 1e-6, 1e-5, 1e-4, 1e-3, 1e-2, 1e-1,
+   1e0,  1e1,  1e2,  1e3,  1e4,  1e5,  1e6,  1e7,
+   1e8,  1e9,  1e10, 1e11, 1e12, 1e13, 1e14, 1e15,
+   1e16, 1e17, 1e18, 1e19, 1e20, 1e21, 1e22};
+   /* Do a binary search with 5 steps */
+   result = 16;
+   if (value  

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

2008-12-02 Thread Christian Seiler
cseiler Tue Dec  2 16:28:24 2008 UTC

  Modified files:  (Branch: PHP_5_3)
/php-srcNEWS 
  Log:
  #- Updated NEWS file
  
  
http://cvs.php.net/viewvc.cgi/php-src/NEWS?r1=1.2027.2.547.2.965.2.397r2=1.2027.2.547.2.965.2.398diff_format=u
Index: php-src/NEWS
diff -u php-src/NEWS:1.2027.2.547.2.965.2.397 
php-src/NEWS:1.2027.2.547.2.965.2.398
--- php-src/NEWS:1.2027.2.547.2.965.2.397   Mon Dec  1 23:30:21 2008
+++ php-src/NEWSTue Dec  2 16:28:24 2008
@@ -9,6 +9,10 @@
 - Changed error level E_ERROR into E_WARNING in Soap extension methods
   parameter validation. (Felipe)
 - Changed openssl info to show the shared library version number. (Scott)
+- Changed floating point behaviour to consistently use double precision on all
+  platforms and with all compilers. (Christian Seiler)
+- Changed round() to act more intuitively when rounding to a certain precision
+  and to correctly round very large and very small exponents. (Christian 
Seiler)
 
 - Added support for namespaces with brackets. (Greg)
 - Added stream_cast() and stream_set_options() to user-space stream wrappers,



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



[PHP-CVS] cvs: php-src /ext/date php_date.c /ext/date/tests mktime-3-64bit.phpt

2008-12-02 Thread Derick Rethans
derick  Tue Dec  2 18:01:07 2008 UTC

  Modified files:  
/php-src/ext/date   php_date.c 
/php-src/ext/date/tests mktime-3-64bit.phpt 
  Log:
  - Fixed bug #46732 (mktime.year description is wrong).
  
  
http://cvs.php.net/viewvc.cgi/php-src/ext/date/php_date.c?r1=1.212r2=1.213diff_format=u
Index: php-src/ext/date/php_date.c
diff -u php-src/ext/date/php_date.c:1.212 php-src/ext/date/php_date.c:1.213
--- php-src/ext/date/php_date.c:1.212   Wed Nov 19 01:59:07 2008
+++ php-src/ext/date/php_date.c Tue Dec  2 18:01:07 2008
@@ -16,7 +16,7 @@
+--+
  */
 
-/* $Id: php_date.c,v 1.212 2008/11/19 01:59:07 colder Exp $ */
+/* $Id: php_date.c,v 1.213 2008/12/02 18:01:07 derick Exp $ */
 
 #include php.h
 #include php_streams.h
@@ -1558,7 +1558,7 @@
case 6:
if (yea = 0  yea  70) {
yea += 2000;
-   } else if (yea = 70  yea = 110) {
+   } else if (yea = 70  yea = 100) {
yea += 1900;
}
now-y = yea;
http://cvs.php.net/viewvc.cgi/php-src/ext/date/tests/mktime-3-64bit.phpt?r1=1.1r2=1.2diff_format=u
Index: php-src/ext/date/tests/mktime-3-64bit.phpt
diff -u php-src/ext/date/tests/mktime-3-64bit.phpt:1.1 
php-src/ext/date/tests/mktime-3-64bit.phpt:1.2
--- php-src/ext/date/tests/mktime-3-64bit.phpt:1.1  Mon Feb 25 22:32:26 2008
+++ php-src/ext/date/tests/mktime-3-64bit.phpt  Tue Dec  2 18:01:07 2008
@@ -7,7 +7,7 @@
 --FILE--
 ?php
 $tzs = array(America/Toronto, Europe/Oslo);
-$years = array(0, 69, 70, 71, 99, 100, 105, 1900, 1901, 1902, 1999, 2000, 
2001);
+$years = array(0, 69, 70, 71, 99, 100, 101, 105, 110, 1900, 1901, 1902, 1999, 
2000, 2001);
 
 foreach ($tzs as $tz) {
echo $tz, \n;
@@ -32,7 +32,9 @@
 Y:   71 - January 1971-01-01T01:01:01-0500
 Y:   99 - January 1999-01-01T01:01:01-0500
 Y:  100 - January 2000-01-01T01:01:01-0500
-Y:  105 - January 2005-01-01T01:01:01-0500
+Y:  101 - January 0101-01-01T01:01:01-0500
+Y:  105 - January 0105-01-01T01:01:01-0500
+Y:  110 - January 0110-01-01T01:01:01-0500
 Y: 1900 - January 1900-01-01T01:01:01-0500
 Y: 1901 - January 1901-01-01T01:01:01-0500
 Y: 1902 - January 1902-01-01T01:01:01-0500
@@ -47,7 +49,9 @@
 Y:   71 - January 1971-01-01T01:01:01+0100
 Y:   99 - January 1999-01-01T01:01:01+0100
 Y:  100 - January 2000-01-01T01:01:01+0100
-Y:  105 - January 2005-01-01T01:01:01+0100
+Y:  101 - January 0101-01-01T01:01:01+0100
+Y:  105 - January 0105-01-01T01:01:01+0100
+Y:  110 - January 0110-01-01T01:01:01+0100
 Y: 1900 - January 1900-01-01T01:01:01+0100
 Y: 1901 - January 1901-01-01T01:01:01+0100
 Y: 1902 - January 1902-01-01T01:01:01+0100



-- 
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/date php_date.c /ext/date/tests mktime-3-64bit.phpt

2008-12-02 Thread Derick Rethans
derick  Tue Dec  2 18:01:58 2008 UTC

  Modified files:  (Branch: PHP_5_2)
/php-srcNEWS 
/php-src/ext/date   php_date.c 
/php-src/ext/date/tests mktime-3-64bit.phpt 
  Log:
  - MFH: Fixed bug #46732 (mktime.year description is wrong).
  
  
http://cvs.php.net/viewvc.cgi/php-src/NEWS?r1=1.2027.2.547.2.1343r2=1.2027.2.547.2.1344diff_format=u
Index: php-src/NEWS
diff -u php-src/NEWS:1.2027.2.547.2.1343 php-src/NEWS:1.2027.2.547.2.1344
--- php-src/NEWS:1.2027.2.547.2.1343Mon Dec  1 20:57:11 2008
+++ php-src/NEWSTue Dec  2 18:01:57 2008
@@ -5,6 +5,7 @@
   reported by Maksymilian Arciemowicz. (Stas)
 
 - Fixed bug #46366 (bad cwd with / as pathinfo). (Dmitry)
+- Fixed bug #46732 (mktime.year description is wrong). (Derick)
 
 27 Nov 2008, PHP 5.2.7RC5
 - Upgraded PCRE to version 7.8 (Fixes CVE-2008-2371) (Ilia)
http://cvs.php.net/viewvc.cgi/php-src/ext/date/php_date.c?r1=1.43.2.45.2.61r2=1.43.2.45.2.62diff_format=u
Index: php-src/ext/date/php_date.c
diff -u php-src/ext/date/php_date.c:1.43.2.45.2.61 
php-src/ext/date/php_date.c:1.43.2.45.2.62
--- php-src/ext/date/php_date.c:1.43.2.45.2.61  Sun Oct 26 11:27:06 2008
+++ php-src/ext/date/php_date.c Tue Dec  2 18:01:57 2008
@@ -16,7 +16,7 @@
+--+
  */
 
-/* $Id: php_date.c,v 1.43.2.45.2.61 2008/10/26 11:27:06 derick Exp $ */
+/* $Id: php_date.c,v 1.43.2.45.2.62 2008/12/02 18:01:57 derick Exp $ */
 
 #include php.h
 #include php_streams.h
@@ -1188,7 +1188,7 @@
case 6:
if (yea = 0  yea  70) {
yea += 2000;
-   } else if (yea = 70  yea = 110) {
+   } else if (yea = 70  yea = 100) {
yea += 1900;
}
now-y = yea;
http://cvs.php.net/viewvc.cgi/php-src/ext/date/tests/mktime-3-64bit.phpt?r1=1.1.4.2r2=1.1.4.3diff_format=u
Index: php-src/ext/date/tests/mktime-3-64bit.phpt
diff -u php-src/ext/date/tests/mktime-3-64bit.phpt:1.1.4.2 
php-src/ext/date/tests/mktime-3-64bit.phpt:1.1.4.3
--- php-src/ext/date/tests/mktime-3-64bit.phpt:1.1.4.2  Mon Feb 25 22:34:11 2008
+++ php-src/ext/date/tests/mktime-3-64bit.phpt  Tue Dec  2 18:01:58 2008
@@ -7,7 +7,7 @@
 --FILE--
 ?php
 $tzs = array(America/Toronto, Europe/Oslo);
-$years = array(0, 69, 70, 71, 99, 100, 105, 1900, 1901, 1902, 1999, 2000, 
2001);
+$years = array(0, 69, 70, 71, 99, 100, 101, 105, 110, 1900, 1901, 1902, 1999, 
2000, 2001);
 
 foreach ($tzs as $tz) {
echo $tz, \n;
@@ -32,7 +32,9 @@
 Y:   71 - January 1971-01-01T01:01:01-0500
 Y:   99 - January 1999-01-01T01:01:01-0500
 Y:  100 - January 2000-01-01T01:01:01-0500
-Y:  105 - January 2005-01-01T01:01:01-0500
+Y:  101 - January 0101-01-01T01:01:01-0500
+Y:  105 - January 0105-01-01T01:01:01-0500
+Y:  110 - January 0110-01-01T01:01:01-0500
 Y: 1900 - January 1900-01-01T01:01:01-0500
 Y: 1901 - January 1901-01-01T01:01:01-0500
 Y: 1902 - January 1902-01-01T01:01:01-0500
@@ -47,7 +49,9 @@
 Y:   71 - January 1971-01-01T01:01:01+0100
 Y:   99 - January 1999-01-01T01:01:01+0100
 Y:  100 - January 2000-01-01T01:01:01+0100
-Y:  105 - January 2005-01-01T01:01:01+0100
+Y:  101 - January 0101-01-01T01:01:01+0100
+Y:  105 - January 0105-01-01T01:01:01+0100
+Y:  110 - January 0110-01-01T01:01:01+0100
 Y: 1900 - January 1900-01-01T01:01:01+0100
 Y: 1901 - January 1901-01-01T01:01:01+0100
 Y: 1902 - January 1902-01-01T01:01:01+0100



-- 
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 /ext/date/tests mktime-3-64bit.phpt

2008-12-02 Thread Derick Rethans
derick  Tue Dec  2 18:02:16 2008 UTC

  Modified files:  (Branch: PHP_5_3)
/php-src/ext/date   php_date.c 
/php-src/ext/date/tests mktime-3-64bit.phpt 
  Log:
  - MFH: Fixed bug #46732 (mktime.year description is wrong).
  
  
http://cvs.php.net/viewvc.cgi/php-src/ext/date/php_date.c?r1=1.43.2.45.2.51.2.60r2=1.43.2.45.2.51.2.61diff_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.60 
php-src/ext/date/php_date.c:1.43.2.45.2.51.2.61
--- php-src/ext/date/php_date.c:1.43.2.45.2.51.2.60 Wed Nov 19 02:00:53 2008
+++ php-src/ext/date/php_date.c Tue Dec  2 18:02:16 2008
@@ -16,7 +16,7 @@
+--+
  */
 
-/* $Id: php_date.c,v 1.43.2.45.2.51.2.60 2008/11/19 02:00:53 colder Exp $ */
+/* $Id: php_date.c,v 1.43.2.45.2.51.2.61 2008/12/02 18:02:16 derick Exp $ */
 
 #include php.h
 #include php_streams.h
@@ -1433,7 +1433,7 @@
case 6:
if (yea = 0  yea  70) {
yea += 2000;
-   } else if (yea = 70  yea = 110) {
+   } else if (yea = 70  yea = 100) {
yea += 1900;
}
now-y = yea;
http://cvs.php.net/viewvc.cgi/php-src/ext/date/tests/mktime-3-64bit.phpt?r1=1.1.2.2r2=1.1.2.3diff_format=u
Index: php-src/ext/date/tests/mktime-3-64bit.phpt
diff -u php-src/ext/date/tests/mktime-3-64bit.phpt:1.1.2.2 
php-src/ext/date/tests/mktime-3-64bit.phpt:1.1.2.3
--- php-src/ext/date/tests/mktime-3-64bit.phpt:1.1.2.2  Mon Feb 25 22:32:59 2008
+++ php-src/ext/date/tests/mktime-3-64bit.phpt  Tue Dec  2 18:02:16 2008
@@ -7,7 +7,7 @@
 --FILE--
 ?php
 $tzs = array(America/Toronto, Europe/Oslo);
-$years = array(0, 69, 70, 71, 99, 100, 105, 1900, 1901, 1902, 1999, 2000, 
2001);
+$years = array(0, 69, 70, 71, 99, 100, 101, 105, 110, 1900, 1901, 1902, 1999, 
2000, 2001);
 
 foreach ($tzs as $tz) {
echo $tz, \n;
@@ -32,7 +32,9 @@
 Y:   71 - January 1971-01-01T01:01:01-0500
 Y:   99 - January 1999-01-01T01:01:01-0500
 Y:  100 - January 2000-01-01T01:01:01-0500
-Y:  105 - January 2005-01-01T01:01:01-0500
+Y:  101 - January 0101-01-01T01:01:01-0500
+Y:  105 - January 0105-01-01T01:01:01-0500
+Y:  110 - January 0110-01-01T01:01:01-0500
 Y: 1900 - January 1900-01-01T01:01:01-0500
 Y: 1901 - January 1901-01-01T01:01:01-0500
 Y: 1902 - January 1902-01-01T01:01:01-0500
@@ -47,7 +49,9 @@
 Y:   71 - January 1971-01-01T01:01:01+0100
 Y:   99 - January 1999-01-01T01:01:01+0100
 Y:  100 - January 2000-01-01T01:01:01+0100
-Y:  105 - January 2005-01-01T01:01:01+0100
+Y:  101 - January 0101-01-01T01:01:01+0100
+Y:  105 - January 0105-01-01T01:01:01+0100
+Y:  110 - January 0110-01-01T01:01:01+0100
 Y: 1900 - January 1900-01-01T01:01:01+0100
 Y: 1901 - January 1901-01-01T01:01:01+0100
 Y: 1902 - January 1902-01-01T01:01:01+0100



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



[PHP-CVS] cvs: php-src /ext/pdo_sqlite sqlite_driver.c /ext/pdo_sqlite/tests pdo_sqlite_createaggregate.phpt pdo_sqlite_createfunction.phpt pdo_sqlite_lastinsertid.phpt pdo_sqlite_transaction.phpt

2008-12-02 Thread Felipe Pena
felipe  Tue Dec  2 21:00:23 2008 UTC

  Added files: 
/php-src/ext/pdo_sqlite/tests   pdo_sqlite_createaggregate.phpt 
pdo_sqlite_createfunction.phpt 
pdo_sqlite_lastinsertid.phpt 
pdo_sqlite_transaction.phpt 

  Modified files:  
/php-src/ext/pdo_sqlite sqlite_driver.c 
  Log:
  - Fixed memory leaks
  - Added new tests (Coverage++)
  
  
http://cvs.php.net/viewvc.cgi/php-src/ext/pdo_sqlite/sqlite_driver.c?r1=1.37r2=1.38diff_format=u
Index: php-src/ext/pdo_sqlite/sqlite_driver.c
diff -u php-src/ext/pdo_sqlite/sqlite_driver.c:1.37 
php-src/ext/pdo_sqlite/sqlite_driver.c:1.38
--- php-src/ext/pdo_sqlite/sqlite_driver.c:1.37 Thu Nov 27 19:02:45 2008
+++ php-src/ext/pdo_sqlite/sqlite_driver.c  Tue Dec  2 21:00:23 2008
@@ -16,7 +16,7 @@
   +--+
 */
 
-/* $Id: sqlite_driver.c,v 1.37 2008/11/27 19:02:45 dmitry Exp $ */
+/* $Id: sqlite_driver.c,v 1.38 2008/12/02 21:00:23 felipe Exp $ */
 
 #ifdef HAVE_CONFIG_H
 #include config.h
@@ -392,8 +392,8 @@
}
 
/* clean up the params */
-   if (argc) {
-   for (i = is_agg; i  argc; i++) {
+   if (zargs) {
+   for (i = is_agg; i  fake_argc; i++) {
zval_ptr_dtor(zargs[i]);
efree(zargs[i]);
}
@@ -519,6 +519,7 @@
MAKE_STD_ZVAL(func-func);
*(func-func) = *callback;
zval_copy_ctor(func-func);
+   INIT_PZVAL(func-func);

func-argc = argc;
 
@@ -592,10 +593,12 @@
MAKE_STD_ZVAL(func-step);
*(func-step) = *step_callback;
zval_copy_ctor(func-step);
+   INIT_PZVAL(func-step);
 
MAKE_STD_ZVAL(func-fini);
*(func-fini) = *fini_callback;
zval_copy_ctor(func-fini);
+   INIT_PZVAL(func-fini);

func-argc = argc;
 

http://cvs.php.net/viewvc.cgi/php-src/ext/pdo_sqlite/tests/pdo_sqlite_createaggregate.phpt?view=markuprev=1.1
Index: php-src/ext/pdo_sqlite/tests/pdo_sqlite_createaggregate.phpt
+++ php-src/ext/pdo_sqlite/tests/pdo_sqlite_createaggregate.phpt
--TEST--
PDO_sqlite: Testing sqliteCreateAggregate()
--FILE--
?php

$db = new pdo('sqlite:memory');

$db-query('CREATE TABLE IF NOT EXISTS foobar (id INT AUTO INCREMENT, name 
TEXT)');

$db-query('INSERT INTO foobar VALUES (NULL, PHP)');
$db-query('INSERT INTO foobar VALUES (NULL, PHP6)');

$db-sqliteCreateAggregate('testing', function($a, $b) { $a .= $b; return $a; 
}, function($v) { return $v; });


foreach ($db-query('SELECT testing(name) FROM foobar') as $row) {
var_dump($row);
}

$db-query('DROP TABLE foobar');

?
--EXPECTF--
array(2) {
  [testing(name)]=
  %string|unicode%(2) 12
  [0]=
  %string|unicode%(2) 12
}

http://cvs.php.net/viewvc.cgi/php-src/ext/pdo_sqlite/tests/pdo_sqlite_createfunction.phpt?view=markuprev=1.1
Index: php-src/ext/pdo_sqlite/tests/pdo_sqlite_createfunction.phpt
+++ php-src/ext/pdo_sqlite/tests/pdo_sqlite_createfunction.phpt
--TEST--
PDO_sqlite: Testing sqliteCreateFunction()
--FILE--
?php

$db = new pdo('sqlite:memory');

$db-query('CREATE TABLE IF NOT EXISTS foobar (id INT AUTO INCREMENT, name 
TEXT)');

$db-query('INSERT INTO foobar VALUES (NULL, PHP)');
$db-query('INSERT INTO foobar VALUES (NULL, PHP6)');


$db-sqliteCreateFunction('testing', function($v) { return strtolower($v); });


foreach ($db-query('SELECT testing(name) FROM foobar') as $row) {
var_dump($row);
}

$db-query('DROP TABLE foobar');

?
--EXPECTF--
array(2) {
  [testing(name)]=
  %string|unicode%(3) php
  [0]=
  %string|unicode%(3) php
}
array(2) {
  [testing(name)]=
  %string|unicode%(4) php6
  [0]=
  %string|unicode%(4) php6
}

http://cvs.php.net/viewvc.cgi/php-src/ext/pdo_sqlite/tests/pdo_sqlite_lastinsertid.phpt?view=markuprev=1.1
Index: php-src/ext/pdo_sqlite/tests/pdo_sqlite_lastinsertid.phpt
+++ php-src/ext/pdo_sqlite/tests/pdo_sqlite_lastinsertid.phpt
--TEST--
PDO_sqlite: Testing lastInsertId()
--FILE--
?php

$db = new pdo('sqlite:memory');
$db-query('CREATE TABLE IF NOT EXISTS foo (id INT AUTO INCREMENT, name TEXT)');
$db-query('INSERT INTO foo VALUES (NULL, PHP)');
$db-query('INSERT INTO foo VALUES (NULL, PHP6)');
var_dump($db-query('SELECT * FROM foo'));
var_dump($db-errorInfo());
var_dump($db-lastInsertId());

$db-query('DROP TABLE foo');

?
--EXPECTF--
object(PDOStatement)#2 (1) {
  [queryString]=
  %string|unicode%(17) SELECT * FROM foo
}
array(3) {
  [0]=
  %string|unicode%(5) 0
  [1]=
  NULL
  [2]=
  NULL
}
%string|unicode%(1) 2

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

[PHP-CVS] cvs: php-src(PHP_5_3) /ext/pdo_sqlite sqlite_driver.c /ext/pdo_sqlite/tests pdo_sqlite_createaggregate.phpt pdo_sqlite_createfunction.phpt pdo_sqlite_lastinsertid.phpt pdo_sqlite_transactio

2008-12-02 Thread Felipe Pena
felipe  Tue Dec  2 21:01:37 2008 UTC

  Added files: (Branch: PHP_5_3)
/php-src/ext/pdo_sqlite/tests   pdo_sqlite_createaggregate.phpt 
pdo_sqlite_createfunction.phpt 
pdo_sqlite_lastinsertid.phpt 
pdo_sqlite_transaction.phpt 

  Modified files:  
/php-src/ext/pdo_sqlite sqlite_driver.c 
  Log:
  MFH:
  - Fixed memory leaks
  - Added new tests (Coverage++)
  
  
http://cvs.php.net/viewvc.cgi/php-src/ext/pdo_sqlite/sqlite_driver.c?r1=1.20.2.5.2.2.2.4r2=1.20.2.5.2.2.2.5diff_format=u
Index: php-src/ext/pdo_sqlite/sqlite_driver.c
diff -u php-src/ext/pdo_sqlite/sqlite_driver.c:1.20.2.5.2.2.2.4 
php-src/ext/pdo_sqlite/sqlite_driver.c:1.20.2.5.2.2.2.5
--- php-src/ext/pdo_sqlite/sqlite_driver.c:1.20.2.5.2.2.2.4 Thu Nov 27 
19:01:22 2008
+++ php-src/ext/pdo_sqlite/sqlite_driver.c  Tue Dec  2 21:01:37 2008
@@ -16,7 +16,7 @@
   +--+
 */
 
-/* $Id: sqlite_driver.c,v 1.20.2.5.2.2.2.4 2008/11/27 19:01:22 dmitry Exp $ */
+/* $Id: sqlite_driver.c,v 1.20.2.5.2.2.2.5 2008/12/02 21:01:37 felipe Exp $ */
 
 #ifdef HAVE_CONFIG_H
 #include config.h
@@ -368,8 +368,8 @@
}
 
/* clean up the params */
-   if (argc) {
-   for (i = is_agg; i  argc; i++) {
+   if (zargs) {
+   for (i = is_agg; i  fake_argc; i++) {
zval_ptr_dtor(zargs[i]);
efree(zargs[i]);
}
@@ -498,6 +498,7 @@
MAKE_STD_ZVAL(func-func);
*(func-func) = *callback;
zval_copy_ctor(func-func);
+   INIT_PZVAL(func-func);

func-argc = argc;
 
@@ -576,10 +577,12 @@
MAKE_STD_ZVAL(func-step);
*(func-step) = *step_callback;
zval_copy_ctor(func-step);
+   INIT_PZVAL(func-step);
 
MAKE_STD_ZVAL(func-fini);
*(func-fini) = *fini_callback;
zval_copy_ctor(func-fini);
+   INIT_PZVAL(func-fini);

func-argc = argc;
 

http://cvs.php.net/viewvc.cgi/php-src/ext/pdo_sqlite/tests/pdo_sqlite_createaggregate.phpt?view=markuprev=1.1
Index: php-src/ext/pdo_sqlite/tests/pdo_sqlite_createaggregate.phpt
+++ php-src/ext/pdo_sqlite/tests/pdo_sqlite_createaggregate.phpt
--TEST--
PDO_sqlite: Testing sqliteCreateAggregate()
--FILE--
?php

$db = new pdo('sqlite:memory');

$db-query('CREATE TABLE IF NOT EXISTS foobar (id INT AUTO INCREMENT, name 
TEXT)');

$db-query('INSERT INTO foobar VALUES (NULL, PHP)');
$db-query('INSERT INTO foobar VALUES (NULL, PHP6)');

$db-sqliteCreateAggregate('testing', function($a, $b) { $a .= $b; return $a; 
}, function($v) { return $v; });


foreach ($db-query('SELECT testing(name) FROM foobar') as $row) {
var_dump($row);
}

$db-query('DROP TABLE foobar');

?
--EXPECTF--
array(2) {
  [testing(name)]=
  %string|unicode%(2) 12
  [0]=
  %string|unicode%(2) 12
}

http://cvs.php.net/viewvc.cgi/php-src/ext/pdo_sqlite/tests/pdo_sqlite_createfunction.phpt?view=markuprev=1.1
Index: php-src/ext/pdo_sqlite/tests/pdo_sqlite_createfunction.phpt
+++ php-src/ext/pdo_sqlite/tests/pdo_sqlite_createfunction.phpt
--TEST--
PDO_sqlite: Testing sqliteCreateFunction()
--FILE--
?php

$db = new pdo('sqlite:memory');

$db-query('CREATE TABLE IF NOT EXISTS foobar (id INT AUTO INCREMENT, name 
TEXT)');

$db-query('INSERT INTO foobar VALUES (NULL, PHP)');
$db-query('INSERT INTO foobar VALUES (NULL, PHP6)');


$db-sqliteCreateFunction('testing', function($v) { return strtolower($v); });


foreach ($db-query('SELECT testing(name) FROM foobar') as $row) {
var_dump($row);
}

$db-query('DROP TABLE foobar');

?
--EXPECTF--
array(2) {
  [testing(name)]=
  %string|unicode%(3) php
  [0]=
  %string|unicode%(3) php
}
array(2) {
  [testing(name)]=
  %string|unicode%(4) php6
  [0]=
  %string|unicode%(4) php6
}

http://cvs.php.net/viewvc.cgi/php-src/ext/pdo_sqlite/tests/pdo_sqlite_lastinsertid.phpt?view=markuprev=1.1
Index: php-src/ext/pdo_sqlite/tests/pdo_sqlite_lastinsertid.phpt
+++ php-src/ext/pdo_sqlite/tests/pdo_sqlite_lastinsertid.phpt
--TEST--
PDO_sqlite: Testing lastInsertId()
--FILE--
?php

$db = new pdo('sqlite:memory');
$db-query('CREATE TABLE IF NOT EXISTS foo (id INT AUTO INCREMENT, name TEXT)');
$db-query('INSERT INTO foo VALUES (NULL, PHP)');
$db-query('INSERT INTO foo VALUES (NULL, PHP6)');
var_dump($db-query('SELECT * FROM foo'));
var_dump($db-errorInfo());
var_dump($db-lastInsertId());

$db-query('DROP TABLE foo');

?
--EXPECTF--
object(PDOStatement)#2 (1) {
  [queryString]=
  %string|unicode%(17) SELECT * FROM foo
}
array(3) {
  [0]=
  %string|unicode%(5) 0
  [1]=
  NULL
  [2]=
  NULL
}
%string|unicode%(1) 2


[PHP-CVS] cvs: php-src(PHP_5_2) /ext/pdo_sqlite sqlite_driver.c /ext/pdo_sqlite/tests pdo_sqlite_createaggregate.phpt pdo_sqlite_createfunction.phpt pdo_sqlite_lastinsertid.phpt pdo_sqlite_transactio

2008-12-02 Thread Felipe Pena
felipe  Tue Dec  2 21:02:44 2008 UTC

  Added files: (Branch: PHP_5_2)
/php-src/ext/pdo_sqlite/tests   pdo_sqlite_createaggregate.phpt 
pdo_sqlite_createfunction.phpt 
pdo_sqlite_lastinsertid.phpt 
pdo_sqlite_transaction.phpt 

  Modified files:  
/php-src/ext/pdo_sqlite sqlite_driver.c 
  Log:
  MFH:
  - Fixed memory leaks
  - Added new tests (Coverage++)
  
  
http://cvs.php.net/viewvc.cgi/php-src/ext/pdo_sqlite/sqlite_driver.c?r1=1.20.2.5.2.3r2=1.20.2.5.2.4diff_format=u
Index: php-src/ext/pdo_sqlite/sqlite_driver.c
diff -u php-src/ext/pdo_sqlite/sqlite_driver.c:1.20.2.5.2.3 
php-src/ext/pdo_sqlite/sqlite_driver.c:1.20.2.5.2.4
--- php-src/ext/pdo_sqlite/sqlite_driver.c:1.20.2.5.2.3 Mon Dec 31 07:20:10 2007
+++ php-src/ext/pdo_sqlite/sqlite_driver.c  Tue Dec  2 21:02:44 2008
@@ -16,7 +16,7 @@
   +--+
 */
 
-/* $Id: sqlite_driver.c,v 1.20.2.5.2.3 2007/12/31 07:20:10 sebastian Exp $ */
+/* $Id: sqlite_driver.c,v 1.20.2.5.2.4 2008/12/02 21:02:44 felipe Exp $ */
 
 #ifdef HAVE_CONFIG_H
 #include config.h
@@ -368,8 +368,8 @@
}
 
/* clean up the params */
-   if (argc) {
-   for (i = is_agg; i  argc; i++) {
+   if (zargs) {
+   for (i = is_agg; i  fake_argc; i++) {
zval_ptr_dtor(zargs[i]);
efree(zargs[i]);
}
@@ -498,6 +498,7 @@
MAKE_STD_ZVAL(func-func);
*(func-func) = *callback;
zval_copy_ctor(func-func);
+   INIT_PZVAL(func-func);

func-argc = argc;
 
@@ -576,10 +577,12 @@
MAKE_STD_ZVAL(func-step);
*(func-step) = *step_callback;
zval_copy_ctor(func-step);
+   INIT_PZVAL(func-step);
 
MAKE_STD_ZVAL(func-fini);
*(func-fini) = *fini_callback;
zval_copy_ctor(func-fini);
+   INIT_PZVAL(func-fini);

func-argc = argc;
 

http://cvs.php.net/viewvc.cgi/php-src/ext/pdo_sqlite/tests/pdo_sqlite_createaggregate.phpt?view=markuprev=1.1
Index: php-src/ext/pdo_sqlite/tests/pdo_sqlite_createaggregate.phpt
+++ php-src/ext/pdo_sqlite/tests/pdo_sqlite_createaggregate.phpt
--TEST--
PDO_sqlite: Testing sqliteCreateAggregate()
--FILE--
?php

$db = new pdo('sqlite:memory');

$db-query('CREATE TABLE IF NOT EXISTS foobar (id INT AUTO INCREMENT, name 
TEXT)');

$db-query('INSERT INTO foobar VALUES (NULL, PHP)');
$db-query('INSERT INTO foobar VALUES (NULL, PHP6)');

$db-sqliteCreateAggregate('testing', function($a, $b) { $a .= $b; return $a; 
}, function($v) { return $v; });


foreach ($db-query('SELECT testing(name) FROM foobar') as $row) {
var_dump($row);
}

$db-query('DROP TABLE foobar');

?
--EXPECTF--
array(2) {
  [testing(name)]=
  %string|unicode%(2) 12
  [0]=
  %string|unicode%(2) 12
}

http://cvs.php.net/viewvc.cgi/php-src/ext/pdo_sqlite/tests/pdo_sqlite_createfunction.phpt?view=markuprev=1.1
Index: php-src/ext/pdo_sqlite/tests/pdo_sqlite_createfunction.phpt
+++ php-src/ext/pdo_sqlite/tests/pdo_sqlite_createfunction.phpt
--TEST--
PDO_sqlite: Testing sqliteCreateFunction()
--FILE--
?php

$db = new pdo('sqlite:memory');

$db-query('CREATE TABLE IF NOT EXISTS foobar (id INT AUTO INCREMENT, name 
TEXT)');

$db-query('INSERT INTO foobar VALUES (NULL, PHP)');
$db-query('INSERT INTO foobar VALUES (NULL, PHP6)');


$db-sqliteCreateFunction('testing', function($v) { return strtolower($v); });


foreach ($db-query('SELECT testing(name) FROM foobar') as $row) {
var_dump($row);
}

$db-query('DROP TABLE foobar');

?
--EXPECTF--
array(2) {
  [testing(name)]=
  %string|unicode%(3) php
  [0]=
  %string|unicode%(3) php
}
array(2) {
  [testing(name)]=
  %string|unicode%(4) php6
  [0]=
  %string|unicode%(4) php6
}

http://cvs.php.net/viewvc.cgi/php-src/ext/pdo_sqlite/tests/pdo_sqlite_lastinsertid.phpt?view=markuprev=1.1
Index: php-src/ext/pdo_sqlite/tests/pdo_sqlite_lastinsertid.phpt
+++ php-src/ext/pdo_sqlite/tests/pdo_sqlite_lastinsertid.phpt
--TEST--
PDO_sqlite: Testing lastInsertId()
--FILE--
?php

$db = new pdo('sqlite:memory');
$db-query('CREATE TABLE IF NOT EXISTS foo (id INT AUTO INCREMENT, name TEXT)');
$db-query('INSERT INTO foo VALUES (NULL, PHP)');
$db-query('INSERT INTO foo VALUES (NULL, PHP6)');
var_dump($db-query('SELECT * FROM foo'));
var_dump($db-errorInfo());
var_dump($db-lastInsertId());

$db-query('DROP TABLE foo');

?
--EXPECTF--
object(PDOStatement)#2 (1) {
  [queryString]=
  %string|unicode%(17) SELECT * FROM foo
}
array(3) {
  [0]=
  %string|unicode%(5) 0
  [1]=
  NULL
  [2]=
  NULL
}
%string|unicode%(1) 2

http://cvs.php.net/viewvc.cgi/php-src/ext/pdo_sqlite/tests/pdo_sqlite_transaction.phpt?view=markuprev=1.1

[PHP-CVS] cvs: php-src(PHP_5_2) /ext/pdo_sqlite/tests pdo_sqlite_createaggregate.phpt pdo_sqlite_createfunction.phpt pdo_sqlite_lastinsertid.phpt

2008-12-02 Thread Felipe Pena
felipe  Tue Dec  2 23:06:52 2008 UTC

  Modified files:  (Branch: PHP_5_2)
/php-src/ext/pdo_sqlite/tests   pdo_sqlite_createaggregate.phpt 
pdo_sqlite_createfunction.phpt 
pdo_sqlite_lastinsertid.phpt 
  Log:
  - Fixed tests
  
http://cvs.php.net/viewvc.cgi/php-src/ext/pdo_sqlite/tests/pdo_sqlite_createaggregate.phpt?r1=1.1.4.2r2=1.1.4.3diff_format=u
Index: php-src/ext/pdo_sqlite/tests/pdo_sqlite_createaggregate.phpt
diff -u php-src/ext/pdo_sqlite/tests/pdo_sqlite_createaggregate.phpt:1.1.4.2 
php-src/ext/pdo_sqlite/tests/pdo_sqlite_createaggregate.phpt:1.1.4.3
--- php-src/ext/pdo_sqlite/tests/pdo_sqlite_createaggregate.phpt:1.1.4.2
Tue Dec  2 21:02:44 2008
+++ php-src/ext/pdo_sqlite/tests/pdo_sqlite_createaggregate.phptTue Dec 
 2 23:06:52 2008
@@ -10,7 +10,9 @@
 $db-query('INSERT INTO foobar VALUES (NULL, PHP)');
 $db-query('INSERT INTO foobar VALUES (NULL, PHP6)');
 
-$db-sqliteCreateAggregate('testing', function($a, $b) { $a .= $b; return $a; 
}, function($v) { return $v; });
+function test_a($a, $b) { $a .= $b; return $a; }
+function test_b($a) { return $a; }
+$db-sqliteCreateAggregate('testing', 'test_a', 'test_b');
 
 
 foreach ($db-query('SELECT testing(name) FROM foobar') as $row) {
http://cvs.php.net/viewvc.cgi/php-src/ext/pdo_sqlite/tests/pdo_sqlite_createfunction.phpt?r1=1.1.4.2r2=1.1.4.3diff_format=u
Index: php-src/ext/pdo_sqlite/tests/pdo_sqlite_createfunction.phpt
diff -u php-src/ext/pdo_sqlite/tests/pdo_sqlite_createfunction.phpt:1.1.4.2 
php-src/ext/pdo_sqlite/tests/pdo_sqlite_createfunction.phpt:1.1.4.3
--- php-src/ext/pdo_sqlite/tests/pdo_sqlite_createfunction.phpt:1.1.4.2 Tue Dec 
 2 21:02:44 2008
+++ php-src/ext/pdo_sqlite/tests/pdo_sqlite_createfunction.phpt Tue Dec  2 
23:06:52 2008
@@ -11,7 +11,8 @@
 $db-query('INSERT INTO foobar VALUES (NULL, PHP6)');
 
 
-$db-sqliteCreateFunction('testing', function($v) { return strtolower($v); });
+function test($v) { return strtolower($v); }
+$db-sqliteCreateFunction('testing', 'test');
 
 
 foreach ($db-query('SELECT testing(name) FROM foobar') as $row) {
http://cvs.php.net/viewvc.cgi/php-src/ext/pdo_sqlite/tests/pdo_sqlite_lastinsertid.phpt?r1=1.1.4.2r2=1.1.4.3diff_format=u
Index: php-src/ext/pdo_sqlite/tests/pdo_sqlite_lastinsertid.phpt
diff -u php-src/ext/pdo_sqlite/tests/pdo_sqlite_lastinsertid.phpt:1.1.4.2 
php-src/ext/pdo_sqlite/tests/pdo_sqlite_lastinsertid.phpt:1.1.4.3
--- php-src/ext/pdo_sqlite/tests/pdo_sqlite_lastinsertid.phpt:1.1.4.2   Tue Dec 
 2 21:02:44 2008
+++ php-src/ext/pdo_sqlite/tests/pdo_sqlite_lastinsertid.phpt   Tue Dec  2 
23:06:52 2008
@@ -19,12 +19,8 @@
   [queryString]=
   %string|unicode%(17) SELECT * FROM foo
 }
-array(3) {
+array(1) {
   [0]=
   %string|unicode%(5) 0
-  [1]=
-  NULL
-  [2]=
-  NULL
 }
 %string|unicode%(1) 2



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



[PHP-CVS] cvs: php-src /ext/pdo pdo_dbh.c

2008-12-02 Thread Matt Wilmas
mattwil Wed Dec  3 00:08:38 2008 UTC

  Modified files:  
/php-src/ext/pdopdo_dbh.c 
  Log:
  MFB (1.82.2.31.2.17.2.10): Added a warning message on pdo::exec() failure in 
the event of an empty query
  
http://cvs.php.net/viewvc.cgi/php-src/ext/pdo/pdo_dbh.c?r1=1.157r2=1.158diff_format=u
Index: php-src/ext/pdo/pdo_dbh.c
diff -u php-src/ext/pdo/pdo_dbh.c:1.157 php-src/ext/pdo/pdo_dbh.c:1.158
--- php-src/ext/pdo/pdo_dbh.c:1.157 Thu Nov 27 19:02:44 2008
+++ php-src/ext/pdo/pdo_dbh.c   Wed Dec  3 00:08:37 2008
@@ -18,7 +18,7 @@
   +--+
 */
 
-/* $Id: pdo_dbh.c,v 1.157 2008/11/27 19:02:44 dmitry Exp $ */
+/* $Id: pdo_dbh.c,v 1.158 2008/12/03 00:08:37 mattwil Exp $ */
 
 /* The PDO Database Handle Class */
 
@@ -930,6 +930,7 @@
}
 
if (!statement_len) {
+   pdo_raise_impl_error(dbh, NULL, HY000,  trying to execute an 
empty query TSRMLS_CC);
RETURN_FALSE;
}
PDO_DBH_CLEAR_ERR();



-- 
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/pdo pdo_dbh.c

2008-12-02 Thread Matt Wilmas
mattwil Wed Dec  3 00:10:17 2008 UTC

  Modified files:  (Branch: PHP_5_3)
/php-src/ext/pdopdo_dbh.c 
  Log:
  Fixed error message typo
  
http://cvs.php.net/viewvc.cgi/php-src/ext/pdo/pdo_dbh.c?r1=1.82.2.31.2.17.2.17r2=1.82.2.31.2.17.2.18diff_format=u
Index: php-src/ext/pdo/pdo_dbh.c
diff -u php-src/ext/pdo/pdo_dbh.c:1.82.2.31.2.17.2.17 
php-src/ext/pdo/pdo_dbh.c:1.82.2.31.2.17.2.18
--- php-src/ext/pdo/pdo_dbh.c:1.82.2.31.2.17.2.17   Thu Nov 27 19:01:22 2008
+++ php-src/ext/pdo/pdo_dbh.c   Wed Dec  3 00:10:17 2008
@@ -18,7 +18,7 @@
   +--+
 */
 
-/* $Id: pdo_dbh.c,v 1.82.2.31.2.17.2.17 2008/11/27 19:01:22 dmitry Exp $ */
+/* $Id: pdo_dbh.c,v 1.82.2.31.2.17.2.18 2008/12/03 00:10:17 mattwil Exp $ */
 
 /* The PDO Database Handle Class */
 
@@ -923,7 +923,7 @@
}
 
if (!statement_len) {
-   pdo_raise_impl_error(dbh, NULL, HY000,  trying to execute 
and empty query TSRMLS_CC);
+   pdo_raise_impl_error(dbh, NULL, HY000,  trying to execute an 
empty query TSRMLS_CC);
RETURN_FALSE;
}
PDO_DBH_CLEAR_ERR();



-- 
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 /ext/imap php_imap.c

2008-12-02 Thread Ilia Alshanetsky
iliaa   Wed Dec  3 01:04:13 2008 UTC

  Modified files:  (Branch: PHP_5_3)
/php-src/ext/imap   php_imap.c 
/php-srcNEWS 
  Log:
  
  Fixed bug #46731 (Missing validation for the options parameter of the 
  imap_fetch_overview() function).
  
  
http://cvs.php.net/viewvc.cgi/php-src/ext/imap/php_imap.c?r1=1.208.2.7.2.26.2.23r2=1.208.2.7.2.26.2.24diff_format=u
Index: php-src/ext/imap/php_imap.c
diff -u php-src/ext/imap/php_imap.c:1.208.2.7.2.26.2.23 
php-src/ext/imap/php_imap.c:1.208.2.7.2.26.2.24
--- php-src/ext/imap/php_imap.c:1.208.2.7.2.26.2.23 Mon Nov 17 11:27:55 2008
+++ php-src/ext/imap/php_imap.c Wed Dec  3 01:04:13 2008
@@ -26,7 +26,7 @@
| PHP 4.0 updates:  Zeev Suraski [EMAIL PROTECTED]   |
+--+
  */
-/* $Id: php_imap.c,v 1.208.2.7.2.26.2.23 2008/11/17 11:27:55 felipe Exp $ */
+/* $Id: php_imap.c,v 1.208.2.7.2.26.2.24 2008/12/03 01:04:13 iliaa Exp $ */
 
 #define IMAP41
 
@@ -3174,11 +3174,16 @@
return;
}
 
+   if (flags  !(flags  FT_UID)) {
+   php_error_docref(NULL TSRMLS_CC, E_WARNING, invalid value for 
the options parameter);
+   RETURN_FALSE;
+   }
+
ZEND_FETCH_RESOURCE(imap_le_struct, pils *, streamind, -1, imap, 
le_imap);
 
array_init(return_value);
-   
-   status = (flags  FT_UID) 
+
+   status = (flags  FT_UID)
? mail_uid_sequence(imap_le_struct-imap_stream, sequence)
: mail_sequence(imap_le_struct-imap_stream, sequence);

http://cvs.php.net/viewvc.cgi/php-src/NEWS?r1=1.2027.2.547.2.965.2.398r2=1.2027.2.547.2.965.2.399diff_format=u
Index: php-src/NEWS
diff -u php-src/NEWS:1.2027.2.547.2.965.2.398 
php-src/NEWS:1.2027.2.547.2.965.2.399
--- php-src/NEWS:1.2027.2.547.2.965.2.398   Tue Dec  2 16:28:24 2008
+++ php-src/NEWSWed Dec  3 01:04:13 2008
@@ -42,6 +42,8 @@
 - Fixed check in recode extension to allow builing of recode and mysql
   extensions when using a recent libmysql. (Johannes)
 
+- Fixed bug #46731 (Missing validation for the options parameter of the
+  imap_fetch_overview() function). (Ilia)
 - Fixed bug #46711 (cURL curl_setopt leaks memory in foreach loops).
   (magicaltux [at] php [dot] net)
 - Fixed bug #46578 (strip_tags() does not honor end-of-comment when it 



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



[PHP-CVS] cvs: php-src /ext/imap php_imap.c

2008-12-02 Thread Ilia Alshanetsky
iliaa   Wed Dec  3 01:04:34 2008 UTC

  Modified files:  
/php-src/ext/imap   php_imap.c 
  Log:
  
  MFB: Fixed bug #46731 (Missing validation for the options parameter of the
 
imap_fetch_overview() function).
  
http://cvs.php.net/viewvc.cgi/php-src/ext/imap/php_imap.c?r1=1.263r2=1.264diff_format=u
Index: php-src/ext/imap/php_imap.c
diff -u php-src/ext/imap/php_imap.c:1.263 php-src/ext/imap/php_imap.c:1.264
--- php-src/ext/imap/php_imap.c:1.263   Mon Nov 17 11:26:21 2008
+++ php-src/ext/imap/php_imap.c Wed Dec  3 01:04:33 2008
@@ -26,7 +26,7 @@
| PHP 4.0 updates:  Zeev Suraski [EMAIL PROTECTED]   |
+--+
  */
-/* $Id: php_imap.c,v 1.263 2008/11/17 11:26:21 felipe Exp $ */
+/* $Id: php_imap.c,v 1.264 2008/12/03 01:04:33 iliaa Exp $ */
 
 #define IMAP41
 
@@ -3159,11 +3159,16 @@
return;
}
 
+   if (flags  !(flags  FT_UID)) {
+   php_error_docref(NULL TSRMLS_CC, E_WARNING, invalid value for 
the options parameter);
+   RETURN_FALSE;
+   }
+
ZEND_FETCH_RESOURCE(imap_le_struct, pils *, streamind, -1, imap, 
le_imap);
 
array_init(return_value);
-   
-   status = (flags  FT_UID) 
+
+   status = (flags  FT_UID)
? mail_uid_sequence(imap_le_struct-imap_stream, sequence)
: mail_sequence(imap_le_struct-imap_stream, sequence);




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