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

2004-03-28 Thread changelog
changelog   Sun Mar 28 20:32:05 2004 EDT

  Modified files:  
/ZendEngine2ChangeLog 
  Log:
  ChangeLog update
  
http://cvs.php.net/diff.php/ZendEngine2/ChangeLog?r1=1.437r2=1.438ty=u
Index: ZendEngine2/ChangeLog
diff -u ZendEngine2/ChangeLog:1.437 ZendEngine2/ChangeLog:1.438
--- ZendEngine2/ChangeLog:1.437 Sat Mar 27 20:33:56 2004
+++ ZendEngine2/ChangeLog   Sun Mar 28 20:32:05 2004
@@ -1,3 +1,51 @@
+2004-03-28  Marcus Boerger  [EMAIL PROTECTED]
+
+* zend_API.c:
+  Use lowercasing here
+
+* zend.c:
+  Initialize the complete struct
+
+2004-03-28  Stanislav Malyshev  [EMAIL PROTECTED]
+
+* zend_language_parser.y:
+  check writability on = too
+
+* zend_execute.c:
+  - call set handler if assigning to object having this handler
+  - cleanup: use macros to access object internal vars
+
+* zend_interfaces.c:
+  preserve ZEND_API in definition
+
+* zend_interfaces.h:
+  declare as extern
+
+2004-03-28  Marcus Boerger  [EMAIL PROTECTED]
+
+* zend_reflection_api.c:
+  Fix memleak found by Timm
+
+2004-03-28  Stanislav Malyshev  [EMAIL PROTECTED]
+
+* zend_operators.c:
+  centralize object-to-scalar conversion, make it work with get handler
+
+* zend.c:
+  try get handler on printable conversion
+
+* zend_object_handlers.h:
+  some more clear comments
+
+* zend_operators.c:
+  Use macros for object parts access
+
+2004-03-28  Dmitry Stogov  [EMAIL PROTECTED]
+
+* zend_execute_API.c:
+  fix of fix related to __autoload. (ext/standard/tests/network/bug20134.phpt
+  passes again)
+
 2004-03-27  Marcus Boerger  [EMAIL PROTECTED]
 
 * zend.c:
@@ -4210,7 +4258,7 @@
 2003-06-10  Jani Taskinen  [EMAIL PROTECTED]
 
 * zend_multiply.h:
-  - Missing $Id: ChangeLog,v 1.437 2004/03/28 01:33:56 changelog Exp $ tag
+  - Missing $Id: ChangeLog,v 1.438 2004/03/29 01:32:05 changelog Exp $ tag
 
 2003-06-10  James Cox  [EMAIL PROTECTED]
 
@@ -5934,7 +5982,7 @@
   zend_types.h
   zend_variables.c
   zend_variables.h:
-  - Added some missing CVS $Id: ChangeLog,v 1.437 2004/03/28 01:33:56 changelog 
Exp $ tags, headers and footers.
+  - Added some missing CVS $Id: ChangeLog,v 1.438 2004/03/29 01:32:05 changelog 
Exp $ tags, headers and footers.
 
 2003-01-30  Ilia Alshanetsky  [EMAIL PROTECTED]
 


[PHP-CVS] cvs: php-src / README.PHP4-TO-PHP5-THIN-CHANGES

2004-03-28 Thread Andrey Hristov
andrey  Sun Mar 28 04:30:22 2004 EDT

  Modified files:  
/php-srcREADME.PHP4-TO-PHP5-THIN-CHANGES 
  Log:
  - Fixed the explanation and example about classes must be declared before used.
  - Added new entry about get_class() (Thanks Lukas for reminding 
(toStudlyCapOrNotToStudlyCap.txt).
  
  
http://cvs.php.net/diff.php/php-src/README.PHP4-TO-PHP5-THIN-CHANGES?r1=1.15r2=1.16ty=u
Index: php-src/README.PHP4-TO-PHP5-THIN-CHANGES
diff -u php-src/README.PHP4-TO-PHP5-THIN-CHANGES:1.15 
php-src/README.PHP4-TO-PHP5-THIN-CHANGES:1.16
--- php-src/README.PHP4-TO-PHP5-THIN-CHANGES:1.15   Thu Feb 12 09:44:58 2004
+++ php-src/README.PHP4-TO-PHP5-THIN-CHANGESSun Mar 28 04:30:21 2004
@@ -1,5 +1,5 @@
-1. strrpos() and strripos() now use the entire string as a needle.
-   Be aware that the existing scripts may no longer work as you expect.
+1. strrpos() and strripos() now use the entire string as a needle.  Be aware
+   that the existing scripts may no longer work as you expect.
 
EX :
?php
@@ -53,18 +53,55 @@
variables_order setting.  As in, the CLI version will now always populate
the global $argc and $argv variables.
 
-8. Classes must be declared before used:
+8. In some cases classes must be declared before used. It only happens only
+   if some of the new features of PHP 5 are used. Otherwise the behaviour is
+   the old.
+   Example 1 (works with no errors):
?php
-   $test = new fubar();
-   $test-barfu();
+   $a = new a();
+   class a {
+   }
+   ?
+ 
+   Example 2 (throws an error):
+   ?php 
+   $a = new a();
+   interface b{
+   }
+   class a implements b {
+   } 
+   ?
+
+   Output (example 2) :
+   Fatal error: Class 'a' not found in /tmp/cl.php on line 2
 
-   class fubar {
-   function barfu() {
-   echo 'fubar';
-   }
+9. get_class() starting PHP 5 returns the name of the class as it was
+   declared which may lead to problems in older scripts that rely on
+   the previous behaviour - the class name is lowercased.
+   Example :
+   ?php
+   class FooBar {
}
+   $a = new FooBar();
+   var_dump(get_class($a));
?
-   This script is perfectly valid and works in PHP 4 but with PHP 5 there
-   will be a fatal error like :
-   Fatal error: Class 'fubar' not found in 
-   If there is defined function __autoload() it will be called.
+
+   Output (PHP 4):
+   string(6) foobar
+
+   Output (PHP 5):
+   string(6) FooBar
+   --
+   Example code that will break :
+   //
+   function someMethod($p) {
+ if (get_class($p) != 'helpingclass') {
+   return FALSE;
+ }
+ //...
+   }
+   //...
+   Possible solution is to search for get_class() in all your scripts and
+   use strtolower().
+
+   
\ No newline at end of file

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



[PHP-CVS] cvs: php-src /ext/xsl xsltprocessor.c

2004-03-28 Thread Marcus Boerger
helly   Sun Mar 28 10:35:01 2004 EDT

  Modified files:  
/php-src/ext/xslxsltprocessor.c 
  Log:
  Fix XSL (Rob/Marcus)
  
http://cvs.php.net/diff.php/php-src/ext/xsl/xsltprocessor.c?r1=1.25r2=1.26ty=u
Index: php-src/ext/xsl/xsltprocessor.c
diff -u php-src/ext/xsl/xsltprocessor.c:1.25 php-src/ext/xsl/xsltprocessor.c:1.26
--- php-src/ext/xsl/xsltprocessor.c:1.25Mon Mar  1 07:43:34 2004
+++ php-src/ext/xsl/xsltprocessor.c Sun Mar 28 10:35:01 2004
@@ -17,7 +17,7 @@
+--+
 */
 
-/* $Id: xsltprocessor.c,v 1.25 2004/03/01 12:43:34 rrichards Exp $ */
+/* $Id: xsltprocessor.c,v 1.26 2004/03/28 15:35:01 helly Exp $ */
 
 #ifdef HAVE_CONFIG_H
 #include config.h
@@ -337,7 +337,7 @@
std_hnd = zend_get_std_object_handlers();
MAKE_STD_ZVAL(member);
ZVAL_STRING(member, cloneDocument, 0);
-   cloneDocu = std_hnd-read_property(id, member, 1 TSRMLS_CC);
+   cloneDocu = std_hnd-read_property(id, member, BP_VAR_IS TSRMLS_CC);
if (Z_TYPE_P(cloneDocu) != IS_NULL) {
convert_to_long(cloneDocu);
clone_docu = Z_LVAL_P(cloneDocu);

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



Re: [PHP-CVS] cvs: php-src / README.PHP4-TO-PHP5-THIN-CHANGES

2004-03-28 Thread Derick Rethans
On Sun, 28 Mar 2004, Andrey Hristov wrote:

 andreySun Mar 28 04:30:22 2004 EDT

   Modified files:
 /php-src  README.PHP4-TO-PHP5-THIN-CHANGES
   Log:
   - Fixed the explanation and example about classes must be declared before used.
   - Added new entry about get_class() (Thanks Lukas for reminding 
 (toStudlyCapOrNotToStudlyCap.txt).

All this was merged into the manual already, so it is much better to fix
it there instead of updating this file. I'd say we kill this one.

Derick

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



[PHP-CVS] cvs: php-src(PHP_4_3) / NEWS /ext/session session.c /ext/standard datetime.c head.c /ext/standard/tests/time bug27719.phpt

2004-03-28 Thread Rasmus Lerdorf
rasmus  Sun Mar 28 09:57:32 2004 EDT

  Modified files:  (Branch: PHP_4_3)
/php-srcNEWS 
/php-src/ext/sessionsession.c 
/php-src/ext/standard   datetime.c head.c 
/php-src/ext/standard/tests/timebug27719.phpt 
  Log:
  - Merge whitespace and trivial changes from HEAD back to the branch so the 
diff between HEAD and PHP_4_3 only shows feature changes
  - Fix test case for bug #27719 (TZ=EST means no DST so the test was wrong)
  
  http://cvs.php.net/diff.php/php-src/NEWS?r1=1.1247.2.611r2=1.1247.2.612ty=u
Index: php-src/NEWS
diff -u php-src/NEWS:1.1247.2.611 php-src/NEWS:1.1247.2.612
--- php-src/NEWS:1.1247.2.611   Fri Mar 26 20:48:04 2004
+++ php-src/NEWSSun Mar 28 09:57:31 2004
@@ -1,6 +1,7 @@
 PHP 4  NEWS
 |||
 ?? ??? 2004, Version 4.3.6
+- Fixed bug #27719 (mktime issues on and around DST changeover). (Rasmus)
 - Fixed bug #27717 (Test Failures when compiled on 64-bit mode). (Ard, Derick)
 - Fixed bug #27687 (Bug Adding Default Charset to 'text/*' Content-Type 
   Header). (Marcus)
http://cvs.php.net/diff.php/php-src/ext/session/session.c?r1=1.336.2.35r2=1.336.2.36ty=u
Index: php-src/ext/session/session.c
diff -u php-src/ext/session/session.c:1.336.2.35 
php-src/ext/session/session.c:1.336.2.36
--- php-src/ext/session/session.c:1.336.2.35Tue Mar 16 13:21:02 2004
+++ php-src/ext/session/session.c   Sun Mar 28 09:57:31 2004
@@ -17,7 +17,7 @@
+--+
  */
 
-/* $Id: session.c,v 1.336.2.35 2004/03/16 18:21:02 stas Exp $ */
+/* $Id: session.c,v 1.336.2.36 2004/03/28 14:57:31 rasmus Exp $ */
 
 #ifdef HAVE_CONFIG_H
 #include config.h
@@ -863,7 +863,7 @@
t = tv.tv_sec + PS(cookie_lifetime);

if (t  0) {
-   date_fmt = php_std_date(t);
+   date_fmt = php_std_date(t TSRMLS_CC);
smart_str_appends(ncookie, COOKIE_EXPIRES);
smart_str_appends(ncookie, date_fmt);
efree(date_fmt);
http://cvs.php.net/diff.php/php-src/ext/standard/datetime.c?r1=1.96.2.13r2=1.96.2.14ty=u
Index: php-src/ext/standard/datetime.c
diff -u php-src/ext/standard/datetime.c:1.96.2.13 
php-src/ext/standard/datetime.c:1.96.2.14
--- php-src/ext/standard/datetime.c:1.96.2.13   Fri Mar 26 14:29:31 2004
+++ php-src/ext/standard/datetime.c Sun Mar 28 09:57:32 2004
@@ -2,7 +2,7 @@
+--+
| PHP Version 4|
+--+
-   | Copyright (c) 1997-2003 The PHP Group|
+   | Copyright (c) 1997-2004 The PHP Group|
+--+
| This source file is subject to version 2.02 of the PHP license,  |
| that is bundled with this package in the file LICENSE, and is|
@@ -18,9 +18,7 @@
+--+
  */
 
-
-/* $Id: datetime.c,v 1.96.2.13 2004/03/26 19:29:31 rasmus Exp $ */
-
+/* $Id: datetime.c,v 1.96.2.14 2004/03/28 14:57:32 rasmus Exp $ */
 
 #include php.h
 #include zend_operators.h
@@ -35,22 +33,21 @@
 
 #include php_parsedate.h
 
-char *mon_full_names[] =
-{
+char *mon_full_names[] = {
January, February, March, April,
May, June, July, August,
September, October, November, December
 };
-char *mon_short_names[] =
-{
+
+char *mon_short_names[] = {
Jan, Feb, Mar, Apr, May, Jun, Jul, Aug, Sep, Oct, Nov, 
Dec
 };
-char *day_full_names[] =
-{
+
+char *day_full_names[] = {
Sunday, Monday, Tuesday, Wednesday, Thursday, Friday, Saturday
 };
-char *day_short_names[] =
-{
+
+char *day_short_names[] = {
Sun, Mon, Tue, Wed, Thu, Fri, Sat
 };
 
@@ -62,13 +59,12 @@
 extern int daylight;
 #endif
 
-static int phpday_tab[2][12] =
-{
+static int phpday_tab[2][12] = {
{31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31},
{31, 29, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31}
 };
 
-#define isleap(year) (((year%4) == 0  (year%100)!=0) || (year%400)==0)
+#define isleap(year) (((year % 4) == 0  (year % 100) != 0) || (year % 400)==0)
 #define YEAR_BASE 1900
 
 /* {{{ proto int time(void)
@@ -87,7 +83,8 @@
struct tm *ta, tmbuf;
time_t t, seconds;
int i, gmadjust, arg_count = ZEND_NUM_ARGS();
-   int is_dst = -1, val, chgsecs = 0;
+   int is_dst = -1, chgsecs = 0;
+   long val;
 
if (arg_count  7 || zend_get_parameters_array_ex(arg_count, arguments) == 
FAILURE) {
WRONG_PARAM_COUNT;
@@ -192,11 +189,11 @@
/* fall-through 

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

2004-03-28 Thread Marcus Boerger
helly   Sun Mar 28 12:04:12 2004 EDT

  Modified files:  
/php-src/ext/splspl_iterators.c 
  Log:
  Add agrument type info
  
http://cvs.php.net/diff.php/php-src/ext/spl/spl_iterators.c?r1=1.28r2=1.29ty=u
Index: php-src/ext/spl/spl_iterators.c
diff -u php-src/ext/spl/spl_iterators.c:1.28 php-src/ext/spl/spl_iterators.c:1.29
--- php-src/ext/spl/spl_iterators.c:1.28Wed Mar 17 14:58:32 2004
+++ php-src/ext/spl/spl_iterators.c Sun Mar 28 12:04:11 2004
@@ -16,7 +16,7 @@
+--+
  */
 
-/* $Id: spl_iterators.c,v 1.28 2004/03/17 19:58:32 helly Exp $ */
+/* $Id: spl_iterators.c,v 1.29 2004/03/28 17:04:11 helly Exp $ */
 
 #ifdef HAVE_CONFIG_H
 # include config.h
@@ -62,7 +62,7 @@
 
 static
 ZEND_BEGIN_ARG_INFO(arginfo_recursive_it___construct, 0) 
-   ZEND_ARG_INFO(0, iterator)
+   ZEND_ARG_OBJ_INFO(0, iterator, RecursiveIterator, 0)
ZEND_ARG_INFO(0, mode)
 ZEND_END_ARG_INFO();
 
@@ -849,7 +849,7 @@
 
 static
 ZEND_BEGIN_ARG_INFO(arginfo_filter_it___construct, 0) 
-   ZEND_ARG_INFO(0, iterator)
+   ZEND_ARG_OBJ_INFO(0, iterator, Iterator, 0)
 ZEND_END_ARG_INFO();
 
 static zend_function_entry spl_funcs_FilterIterator[] = {
@@ -866,7 +866,7 @@
 
 static
 ZEND_BEGIN_ARG_INFO(arginfo_parent_it___construct, 0) 
-   ZEND_ARG_INFO(0, iterator)
+   ZEND_ARG_OBJ_INFO(0, iterator, Iterator, 0)
 ZEND_END_ARG_INFO();
 
 static zend_function_entry spl_funcs_ParentIterator[] = {
@@ -996,7 +996,7 @@
 
 static
 ZEND_BEGIN_ARG_INFO(arginfo_limit_it___construct, 0) 
-   ZEND_ARG_INFO(0, iterator)
+   ZEND_ARG_OBJ_INFO(0, iterator, Iterator, 0)
ZEND_ARG_INFO(0, offset)
ZEND_ARG_INFO(0, count)
 ZEND_END_ARG_INFO();
@@ -1166,7 +1166,7 @@
 
 static
 ZEND_BEGIN_ARG_INFO(arginfo_caching_it___construct, 0) 
-   ZEND_ARG_INFO(0, iterator)
+   ZEND_ARG_OBJ_INFO(0, iterator, Iterator, 0)
ZEND_ARG_INFO(0, getStrVal)
 ZEND_END_ARG_INFO();
 
@@ -1212,7 +1212,7 @@
 
 static
 ZEND_BEGIN_ARG_INFO_EX(arginfo_caching_rec_it___construct, 0, 
ZEND_RETURN_REFERENCE_AGNOSTIC, 2) 
-   ZEND_ARG_INFO(0, iterator)
+   ZEND_ARG_OBJ_INFO(0, iterator, Iterator, 0)
ZEND_ARG_INFO(0, getStrVal)
ZEND_ARG_INFO(0, catch_getChildren)
 ZEND_END_ARG_INFO();

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



[PHP-CVS] cvs: php-src /ext/simplexml CREDITS simplexml.c /ext/sqlite CREDITS sqlite.c /ext/standard credits_ext.h

2004-03-28 Thread Marcus Boerger
helly   Sun Mar 28 15:27:18 2004 EDT

  Modified files:  
/php-src/ext/standard   credits_ext.h 
/php-src/ext/sqlite CREDITS sqlite.c 
/php-src/ext/simplexml  CREDITS simplexml.c 
  Log:
  Fix writing of SQLite and SimpleXMl extension and add Rob to the credits
  line of the latter. Add ext/SPL.
  
  
http://cvs.php.net/diff.php/php-src/ext/standard/credits_ext.h?r1=1.23r2=1.24ty=u
Index: php-src/ext/standard/credits_ext.h
diff -u php-src/ext/standard/credits_ext.h:1.23 php-src/ext/standard/credits_ext.h:1.24
--- php-src/ext/standard/credits_ext.h:1.23 Sat Jan 17 07:59:51 2004
+++ php-src/ext/standard/credits_ext.h  Sun Mar 28 15:27:18 2004
@@ -69,10 +69,11 @@
 CREDIT_LINE(Recode, Kristian Köhntopp);
 CREDIT_LINE(Sessions, Sascha Schumann, Andrei Zmievski);
 CREDIT_LINE(Shared Memory Operations, Slava Poliakov, Ilia Alshanetsky);
-CREDIT_LINE(simplexml, Sterling Hughes, Marcus Boerger);
+CREDIT_LINE(SimpleXML, Sterling Hughes, Marcus Boerger, Rob Richards);
 CREDIT_LINE(SNMP, Rasmus Lerdorf, Harrie Hazewinkel, Mike Jackson, Steven 
Lawrance, Johann Hanne);
 CREDIT_LINE(Sockets, Chris Vandomelen, Sterling Hughes, Daniel Beulshausen, Jason 
Greene);
-CREDIT_LINE(sqlite, Wez Furlong, Tal Peer, Marcus Börger, Ilia Alshanetsky);
+CREDIT_LINE(SPL, Marcus Boerger);
+CREDIT_LINE(SQLite, Wez Furlong, Tal Peer, Marcus Börger, Ilia Alshanetsky);
 CREDIT_LINE(Sybase-CT, Zeev Suraski, Tom May, Timm Friebe);
 CREDIT_LINE(Sybase-DB, Zeev Suraski);
 CREDIT_LINE(System V Message based IPC, Wez Furlong);
http://cvs.php.net/diff.php/php-src/ext/sqlite/CREDITS?r1=1.5r2=1.6ty=u
Index: php-src/ext/sqlite/CREDITS
diff -u php-src/ext/sqlite/CREDITS:1.5 php-src/ext/sqlite/CREDITS:1.6
--- php-src/ext/sqlite/CREDITS:1.5  Sun Nov 16 15:43:57 2003
+++ php-src/ext/sqlite/CREDITS  Sun Mar 28 15:27:18 2004
@@ -1,2 +1,2 @@
-sqlite
+SQLite
 Wez Furlong, Tal Peer, Marcus Börger, Ilia Alshanetsky
http://cvs.php.net/diff.php/php-src/ext/sqlite/sqlite.c?r1=1.136r2=1.137ty=u
Index: php-src/ext/sqlite/sqlite.c
diff -u php-src/ext/sqlite/sqlite.c:1.136 php-src/ext/sqlite/sqlite.c:1.137
--- php-src/ext/sqlite/sqlite.c:1.136   Fri Mar 26 16:16:50 2004
+++ php-src/ext/sqlite/sqlite.c Sun Mar 28 15:27:18 2004
@@ -17,7 +17,7 @@
|  Marcus Boerger [EMAIL PROTECTED]  |
+--+
 
-   $Id: sqlite.c,v 1.136 2004/03/26 21:16:50 helly Exp $ 
+   $Id: sqlite.c,v 1.137 2004/03/28 20:27:18 helly Exp $ 
 */
 
 #ifdef HAVE_CONFIG_H
@@ -252,7 +252,7 @@
 #if ZEND_MODULE_API_NO = 20010901
STANDARD_MODULE_HEADER,
 #endif
-   sqlite,
+   SQLite,
sqlite_functions,
PHP_MINIT(sqlite),
NULL,
@@ -1055,7 +1055,7 @@
 {
php_info_print_table_start();
php_info_print_table_header(2, SQLite support, enabled);
-   php_info_print_table_row(2, PECL Module version, PHP_SQLITE_MODULE_VERSION  
$Id: sqlite.c,v 1.136 2004/03/26 21:16:50 helly Exp $);
+   php_info_print_table_row(2, PECL Module version, PHP_SQLITE_MODULE_VERSION  
$Id: sqlite.c,v 1.137 2004/03/28 20:27:18 helly Exp $);
php_info_print_table_row(2, SQLite Library, sqlite_libversion());
php_info_print_table_row(2, SQLite Encoding, sqlite_libencoding());
php_info_print_table_end();
http://cvs.php.net/diff.php/php-src/ext/simplexml/CREDITS?r1=1.4r2=1.5ty=u
Index: php-src/ext/simplexml/CREDITS
diff -u php-src/ext/simplexml/CREDITS:1.4 php-src/ext/simplexml/CREDITS:1.5
--- php-src/ext/simplexml/CREDITS:1.4   Sat Jan 17 14:41:31 2004
+++ php-src/ext/simplexml/CREDITS   Sun Mar 28 15:27:18 2004
@@ -1,2 +1,2 @@
-simplexml
+SimpleXML
 Sterling Hughes, Marcus Boerger, Rob Richards
http://cvs.php.net/diff.php/php-src/ext/simplexml/simplexml.c?r1=1.136r2=1.137ty=u
Index: php-src/ext/simplexml/simplexml.c
diff -u php-src/ext/simplexml/simplexml.c:1.136 php-src/ext/simplexml/simplexml.c:1.137
--- php-src/ext/simplexml/simplexml.c:1.136 Wed Mar 24 00:04:26 2004
+++ php-src/ext/simplexml/simplexml.c   Sun Mar 28 15:27:18 2004
@@ -18,7 +18,7 @@
   +--+
 */
 
-/* $Id: simplexml.c,v 1.136 2004/03/24 05:04:26 gschlossnagle Exp $ */
+/* $Id: simplexml.c,v 1.137 2004/03/28 20:27:18 helly Exp $ */
 
 #ifdef HAVE_CONFIG_H
 #include config.h
@@ -1582,7 +1582,7 @@
 
 zend_module_entry simplexml_module_entry = {
STANDARD_MODULE_HEADER,
-   simplexml,
+   SimpleXML,
simplexml_functions,
PHP_MINIT(simplexml),
PHP_MSHUTDOWN(simplexml),
@@ -1650,7 +1650,7 @@
 {
php_info_print_table_start();
php_info_print_table_header(2, Simplexml support, enabled);
-   php_info_print_table_row(2, Revision, $Revision: 1.136 $);
+   php_info_print_table_row(2, Revision, $Revision: 1.137 $);
php_info_print_table_row(2, Schema support,
 #ifdef LIBXML_SCHEMAS_ENABLED

[PHP-CVS] cvs: php-src /ext/standard basic_functions.c

2004-03-28 Thread Marcus Boerger
helly   Sun Mar 28 16:46:44 2004 EDT

  Modified files:  
/php-src/ext/standard   basic_functions.c 
  Log:
  Improve portability (idea by Ard)
  
  
http://cvs.php.net/diff.php/php-src/ext/standard/basic_functions.c?r1=1.659r2=1.660ty=u
Index: php-src/ext/standard/basic_functions.c
diff -u php-src/ext/standard/basic_functions.c:1.659 
php-src/ext/standard/basic_functions.c:1.660
--- php-src/ext/standard/basic_functions.c:1.659Fri Mar 26 19:50:39 2004
+++ php-src/ext/standard/basic_functions.c  Sun Mar 28 16:46:43 2004
@@ -17,7 +17,7 @@
+--+
  */
 
-/* $Id: basic_functions.c,v 1.659 2004/03/27 00:50:39 helly Exp $ */
+/* $Id: basic_functions.c,v 1.660 2004/03/28 21:46:43 helly Exp $ */
 
 #include php.h
 #include php_streams.h
@@ -957,9 +957,10 @@
((php_uint32*)val)[1] = PHP_DOUBLE_QUIET_NAN_HIGH;
((php_uint32*)val)[0] = 0;
return val;
-#else
-   /* hope the target platform is ISO-C compliant */
+#elif defined(HAVE_ATOF_ACCEPTS_NAN)
return atof(NAN);
+#else
+   return 0.0/0.0;
 #endif
 }
 
@@ -970,9 +971,10 @@
((php_uint32*)val)[1] = PHP_DOUBLE_INFINITY_HIGH;
((php_uint32*)val)[0] = 0;
return val;
-#else
-   /* hope the target platform is ISO-C compliant */
+#elif defined(HAVE_ATOF_ACCEPTS_INF)
return atof(INF);
+#else
+   return 1.0/0.0;
 #endif
 }
 

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



[PHP-CVS] cvs: php-src(PHP_4_3) /ext/standard basic_functions.c

2004-03-28 Thread Marcus Boerger
helly   Sun Mar 28 16:50:01 2004 EDT

  Modified files:  (Branch: PHP_4_3)
/php-src/ext/standard   basic_functions.c 
  Log:
  MFH: Improve portability (idea by Ard)
  
http://cvs.php.net/diff.php/php-src/ext/standard/basic_functions.c?r1=1.543.2.33r2=1.543.2.34ty=u
Index: php-src/ext/standard/basic_functions.c
diff -u php-src/ext/standard/basic_functions.c:1.543.2.33 
php-src/ext/standard/basic_functions.c:1.543.2.34
--- php-src/ext/standard/basic_functions.c:1.543.2.33   Fri Mar 26 20:17:06 2004
+++ php-src/ext/standard/basic_functions.c  Sun Mar 28 16:50:01 2004
@@ -17,7 +17,7 @@
+--+
  */
 
-/* $Id: basic_functions.c,v 1.543.2.33 2004/03/27 01:17:06 helly Exp $ */
+/* $Id: basic_functions.c,v 1.543.2.34 2004/03/28 21:50:01 helly Exp $ */
 
 #include php.h
 #include php_streams.h
@@ -1006,9 +1006,10 @@
((php_uint32*)val)[1] = PHP_DOUBLE_QUIET_NAN_HIGH;
((php_uint32*)val)[0] = 0;
return val;
-#else
-   /* hope the target platform is ISO-C compliant */
+#elif defined(HAVE_ATOF_ACCEPTS_NAN)
return atof(NAN);
+#else
+   return 0.0/0.0;
 #endif
 }
 
@@ -1019,9 +1020,10 @@
((php_uint32*)val)[1] = PHP_DOUBLE_INFINITY_HIGH;
((php_uint32*)val)[0] = 0;
return val;
-#else
-   /* hope the target platform is ISO-C compliant */
+#elif defined(HAVE_ATOF_ACCEPTS_INF)
return atof(INF);
+#else
+   return 1.0/0.0;
 #endif
 }
 

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



Re: [PHP-CVS] cvs: php-src /ext/standard basic_functions.c

2004-03-28 Thread Andi Gutmans
Not sure on what platforms you expect the last #else to be reached but it 
would raise a sigfloatingpoint on FreeBSD. Dividing by zero does not seem 
like a good idea.

Andi

At 09:46 PM 3/28/2004 +, Marcus Boerger wrote:
 #include php_streams.h
@@ -957,9 +957,10 @@
((php_uint32*)val)[1] = PHP_DOUBLE_QUIET_NAN_HIGH;
((php_uint32*)val)[0] = 0;
return val;
-#else
-   /* hope the target platform is ISO-C compliant */
+#elif defined(HAVE_ATOF_ACCEPTS_NAN)
return atof(NAN);
+#else
+   return 0.0/0.0;
 #endif
--
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


Re: [PHP-CVS] cvs: php-src /ext/standard basic_functions.c

2004-03-28 Thread Marcus Boerger
Hello Andi,

it's just a fall back that for example works on intel and alpha machines.
FreeBSD should use the direct setting (1st #if) on intel and the atof() way
for other cpus. The problem here is i cannot check all systems but i could
offer three solutions so far of which the first two work on most old *nix
and all new *nix as well as all win systems. The third now tries to complete
portability.

marcus

Sunday, March 28, 2004, 11:56:20 PM, you wrote:

 Not sure on what platforms you expect the last #else to be reached but it 
 would raise a sigfloatingpoint on FreeBSD. Dividing by zero does not seem 
 like a good idea.

 Andi

 At 09:46 PM 3/28/2004 +, Marcus Boerger wrote:
  #include php_streams.h
@@ -957,9 +957,10 @@
 ((php_uint32*)val)[1] = PHP_DOUBLE_QUIET_NAN_HIGH;
 ((php_uint32*)val)[0] = 0;
 return val;
-#else
-   /* hope the target platform is ISO-C compliant */
+#elif defined(HAVE_ATOF_ACCEPTS_NAN)
 return atof(NAN);
+#else
+   return 0.0/0.0;
  #endif



-- 
Best regards,
 Marcusmailto:[EMAIL PROTECTED]

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



Re: [PHP-CVS] cvs: php-src /ext/standard basic_functions.c

2004-03-28 Thread Marcus Boerger
Hello Andi,

i updated the source on a mips machine (thx Joerg) and here is the relevant
configure part:
checking for fpclass... yes
checking for isinf... no
checking for isnan... yes
checking whether atof() accepts NAN... yes
checking whether atof() accepts INF... no

that means INF will be handled by 'return 1.0/0.0`which the compiler detects
and denotes by:
  The indicated floating-point operation result is out of range.
return 1.0/0.0;
  ^

Executing the test 'php run-tests.php ext/standard/tests/math/bug27646.phpt'
reveals that the test generally works as expected which means the fallback
solution works at least for the mips cpus.

marcus

Monday, March 29, 2004, 12:33:09 AM, you wrote:

 Hello Andi,

 it's just a fall back that for example works on intel and alpha machines.
 FreeBSD should use the direct setting (1st #if) on intel and the atof() way
 for other cpus. The problem here is i cannot check all systems but i could
 offer three solutions so far of which the first two work on most old *nix
 and all new *nix as well as all win systems. The third now tries to complete
 portability.

 marcus

 Sunday, March 28, 2004, 11:56:20 PM, you wrote:

 Not sure on what platforms you expect the last #else to be reached but it
 would raise a sigfloatingpoint on FreeBSD. Dividing by zero does not seem
 like a good idea.

 Andi

 At 09:46 PM 3/28/2004 +, Marcus Boerger wrote:
  #include php_streams.h
@@ -957,9 +957,10 @@
 ((php_uint32*)val)[1] = PHP_DOUBLE_QUIET_NAN_HIGH;
 ((php_uint32*)val)[0] = 0;
 return val;
-#else
-   /* hope the target platform is ISO-C compliant */
+#elif defined(HAVE_ATOF_ACCEPTS_NAN)
 return atof(NAN);
+#else
+   return 0.0/0.0;
  #endif






-- 
Best regards,
 Marcusmailto:[EMAIL PROTECTED]

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



[PHP-CVS] cvs: php-src / run-tests.php

2004-03-28 Thread Marcus Boerger
helly   Sun Mar 28 18:04:53 2004 EDT

  Modified files:  
/php-srcrun-tests.php 
  Log:
  Add ability to pass -n to the executed php
  
http://cvs.php.net/diff.php/php-src/run-tests.php?r1=1.190r2=1.191ty=u
Index: php-src/run-tests.php
diff -u php-src/run-tests.php:1.190 php-src/run-tests.php:1.191
--- php-src/run-tests.php:1.190 Sun Mar 28 09:12:14 2004
+++ php-src/run-tests.php   Sun Mar 28 18:04:53 2004
@@ -213,6 +213,8 @@
 
 // If parameters given assume they represent selected tests to run.
 $failed_tests_file= false;
+$pass_option_n = false;
+$pass_options = '';
 if (isset($argc)  $argc  1) {
for ($i=1; $i$argc; $i++) {
if (substr($argv[$i],0,1) == '-') {   
@@ -234,6 +236,12 @@
case 'a':
$failed_tests_file = fopen($argv[++$i], 'a+t');
break;
+   case 'n':
+   if (!$pass_option_n) {
+   $pass_options .= ' -n';
+   }
+   $pass_option_n = true;
+   break;
default:
echo Illegal switch specified!\n;
case h:
@@ -255,6 +263,8 @@
 
 -a file   Same as -w but append rather then truncating file.
 
+-n  Pass -n option to the php binary.
+
 -h file   This Help.
 
 HELP;
@@ -638,7 +648,7 @@
 
 function run_test($php, $file, $test_cnt, $test_idx)
 {
-   global $log_format, $info_params, $ini_overwrites, $cwd, $PHP_FAILED_TESTS;
+   global $log_format, $info_params, $ini_overwrites, $cwd, $PHP_FAILED_TESTS, 
$pass_options;
 
if (DETAILED) echo 
 =
@@ -804,7 +814,7 @@
putenv(CONTENT_TYPE=application/x-www-form-urlencoded);
putenv(CONTENT_LENGTH=$content_length);
 
-   $cmd = $php$ini_settings -f $tmp_file 21  $tmp_post;
+   $cmd = $php$pass_options$ini_settings -f $tmp_file 21  $tmp_post;
 
} else {
 
@@ -812,7 +822,7 @@
putenv(CONTENT_TYPE=);
putenv(CONTENT_LENGTH=);
 
-   $cmd = $php$ini_settings -f $tmp_file$args 21;
+   $cmd = $php$pass_options$ini_settings -f $tmp_file$args 21;
}
 
if (DETAILED) echo 

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



[PHP-CVS] cvs: php-src(PHP_4_3) / NEWS /ext/xslt config.m4

2004-03-28 Thread Ilia Alshanetsky
iliaa   Sun Mar 28 19:09:34 2004 EDT

  Modified files:  (Branch: PHP_4_3)
/php-srcNEWS 
/php-src/ext/xslt   config.m4 
  Log:
  Fixed bug #27732 (Fixed compilation bug inside php_sab_info.h).
  
  
http://cvs.php.net/diff.php/php-src/NEWS?r1=1.1247.2.612r2=1.1247.2.613ty=u
Index: php-src/NEWS
diff -u php-src/NEWS:1.1247.2.612 php-src/NEWS:1.1247.2.613
--- php-src/NEWS:1.1247.2.612   Sun Mar 28 09:57:31 2004
+++ php-src/NEWSSun Mar 28 19:09:33 2004
@@ -1,6 +1,7 @@
 PHP 4  NEWS
 |||
 ?? ??? 2004, Version 4.3.6
+- Fixed bug #27732 (Fixed compilation bug inside php_sab_info.h). (Ilia)
 - Fixed bug #27719 (mktime issues on and around DST changeover). (Rasmus)
 - Fixed bug #27717 (Test Failures when compiled on 64-bit mode). (Ard, Derick)
 - Fixed bug #27687 (Bug Adding Default Charset to 'text/*' Content-Type 
http://cvs.php.net/diff.php/php-src/ext/xslt/config.m4?r1=1.30.2.6r2=1.30.2.7ty=u
Index: php-src/ext/xslt/config.m4
diff -u php-src/ext/xslt/config.m4:1.30.2.6 php-src/ext/xslt/config.m4:1.30.2.7
--- php-src/ext/xslt/config.m4:1.30.2.6 Fri Oct  3 01:25:43 2003
+++ php-src/ext/xslt/config.m4  Sun Mar 28 19:09:34 2004
@@ -1,5 +1,5 @@
 dnl
-dnl $Id: config.m4,v 1.30.2.6 2003/10/03 05:25:43 sniper Exp $
+dnl $Id: config.m4,v 1.30.2.7 2004/03/29 00:09:34 iliaa Exp $
 dnl
 dnl +--+
 dnl |  This is where the magic of the extension reallly is.  Depending on what |
@@ -67,7 +67,7 @@
SABINF_CFLAGS=`$XSLT_DIR/bin/sablot-config --cflags`
SABINF_LIBS=`$XSLT_DIR/bin/sablot-config --libs`
SABINF_PREFIX=`$XSLT_DIR/bin/sablot-config --prefix`
-   SABINF_ALL=\Cflags: $SABINF_CFLAGS\nLibs: $SABINF_LIBS\nPrefix: 
$SABINF_PREFIX\
+   SABINF_ALL=\Cflags: $SABINF_CFLAGS Libs: $SABINF_LIBS Prefix: 
$SABINF_PREFIX\
PHP_DEFINE(SAB_INFO, $SABINF_ALL)
 else
AC_MSG_RESULT(not found)

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



[PHP-CVS] cvs: php-src(PHP_4_3) /ext/standard datetime.h

2004-03-28 Thread Ilia Alshanetsky
iliaa   Sun Mar 28 19:27:17 2004 EDT

  Modified files:  (Branch: PHP_4_3)
/php-src/ext/standard   datetime.h 
  Log:
  Fixed build.
  
  
http://cvs.php.net/diff.php/php-src/ext/standard/datetime.h?r1=1.10.8.1r2=1.10.8.2ty=u
Index: php-src/ext/standard/datetime.h
diff -u php-src/ext/standard/datetime.h:1.10.8.1 
php-src/ext/standard/datetime.h:1.10.8.2
--- php-src/ext/standard/datetime.h:1.10.8.1Tue Dec 31 11:35:26 2002
+++ php-src/ext/standard/datetime.h Sun Mar 28 19:27:17 2004
@@ -17,7 +17,7 @@
+--+
 */
 
-/* $Id: datetime.h,v 1.10.8.1 2002/12/31 16:35:26 sebastian Exp $ */
+/* $Id: datetime.h,v 1.10.8.2 2004/03/29 00:27:17 iliaa Exp $ */
 
 #ifndef DATETIME_H
 #define DATETIME_H
@@ -36,7 +36,7 @@
 #endif
 PHP_FUNCTION(strtotime);
 
-extern char *php_std_date(time_t t);
+extern char *php_std_date(time_t t TSRMLS_DC);
 void php_mktime(INTERNAL_FUNCTION_PARAMETERS, int gm);
 #if HAVE_STRFTIME
 void _php_strftime(INTERNAL_FUNCTION_PARAMETERS, int gm);

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



[PHP-CVS] cvs: php-src /ext/xml/tests bug26614.phpt

2004-03-28 Thread Hartmut Holzgraefe
hholzgraMon Mar 29 00:56:18 2004 EDT

  Modified files:  
/php-src/ext/xml/tests  bug26614.phpt 
  Log:
  Test updated to test for additional libxml2/expat inconsistencies
  
  
http://cvs.php.net/diff.php/php-src/ext/xml/tests/bug26614.phpt?r1=1.3r2=1.4ty=u
Index: php-src/ext/xml/tests/bug26614.phpt
diff -u php-src/ext/xml/tests/bug26614.phpt:1.3 php-src/ext/xml/tests/bug26614.phpt:1.4
--- php-src/ext/xml/tests/bug26614.phpt:1.3 Mon Mar 15 10:53:28 2004
+++ php-src/ext/xml/tests/bug26614.phpt Mon Mar 29 00:56:18 2004
@@ -2,7 +2,21 @@
 Bug #26614 (CDATA sections skipped on line count)
 --FILE--
 ?php
-$xml ='?xml version=1.0?
+/*
+this test works fine with Expat but fails with libxml
+which we now use as default
+
+further investigation has shown that not only line count
+is skippet on CDATA sections but that libxml does also
+show different column numbers and byte positions depending
+on context and in opposition to what one would expect to
+see and what good old Expat reported just fine ...
+*/
+
+$xmls = array();
+
+// Case 1: CDATA Sections
+$xmls[CDATA] ='?xml version=1.0 encoding=iso-8859-1 ?
 data
 ![CDATA[
 multi
@@ -12,18 +26,63 @@
 ]]
 /data';
 
+// Case 2: replace some characters so that we get comments instead
+$xmls[Comment] ='?xml version=1.0 encoding=iso-8859-1 ?
+data
+!-- ATA[
+multi
+line 
+CDATA
+block
+--
+/data';
+
+// Case 3: replace even more characters so that only textual data is left 
+$xmls[Text] ='?xml version=1.0 encoding=iso-8859-1 ?
+data
+-!-- ATA[
+multi
+line 
+CDATA
+block
+---
+/data';
+
 function startElement($parser, $name, $attrs) {
-echo $name at line .xml_get_current_line_number($parser).\n;
+printf($name at line %d, col %d (byte %d)\n,
+  xml_get_current_line_number($parser),
+  xml_get_current_column_number($parser),
+  xml_get_current_byte_index($parser));
 }
+
 function endElement($parser, $name) {
-echo /$name at line .xml_get_current_line_number($parser).\n;
+printf(/$name at line %d, col %d (byte %d)\n,
+  xml_get_current_line_number($parser),
+  xml_get_current_column_number($parser),
+  xml_get_current_byte_index($parser));
+}
+
+function characterData($parser, $data) {
+  // dummy 
 }
 
-$xml_parser = xml_parser_create();
-xml_set_element_handler($xml_parser, startElement, endElement);
-xml_parse($xml_parser, $xml);
-xml_parser_free($xml_parser);
+foreach ($xmls as $desc = $xml) {
+  echo $desc\n;
+   $xml_parser = xml_parser_create();
+   xml_set_element_handler($xml_parser, startElement, endElement);
+   xml_set_character_data_handler($xml_parser, characterData);
+   if (!xml_parse($xml_parser, $xml, true)) 
+   echo Error: .xml_error_string(xml_get_error_code($xml_parser)).\n;
+   xml_parser_free($xml_parser);
+}
 ?
 --EXPECT--
-DATA at line 2
-/DATA at line 9
+CDATA
+DATA at line 2, col 0 (byte 45)
+/DATA at line 9, col 0 (byte 90)
+Comment
+DATA at line 2, col 0 (byte 45)
+/DATA at line 9, col 0 (byte 90)
+Text
+DATA at line 2, col 0 (byte 45)
+/DATA at line 9, col 0 (byte 90)

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



[PHP-CVS] cvs: php-src / run-tests.php

2004-03-28 Thread Jan Lehnardt
jan Mon Mar 29 02:49:32 2004 EDT

  Modified files:  
/php-srcrun-tests.php 
  Log:
   - be more verbose
  
  
http://cvs.php.net/diff.php/php-src/run-tests.php?r1=1.191r2=1.192ty=u
Index: php-src/run-tests.php
diff -u php-src/run-tests.php:1.191 php-src/run-tests.php:1.192
--- php-src/run-tests.php:1.191 Sun Mar 28 18:04:53 2004
+++ php-src/run-tests.php   Mon Mar 29 02:49:32 2004
@@ -263,7 +263,7 @@
 
 -a file   Same as -w but append rather then truncating file.
 
--n  Pass -n option to the php binary.
+-n  Pass -n option to the php binary (Do not use a php.ini).
 
 -h file   This Help.
 

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