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

2004-03-09 Thread changelog
changelog   Tue Mar  9 20:31:58 2004 EDT

  Modified files:  
/php-srcChangeLog 
  Log:
  ChangeLog update
  
http://cvs.php.net/diff.php/php-src/ChangeLog?r1=1.1562r2=1.1563ty=u
Index: php-src/ChangeLog
diff -u php-src/ChangeLog:1.1562 php-src/ChangeLog:1.1563
--- php-src/ChangeLog:1.1562Mon Mar  8 20:34:24 2004
+++ php-src/ChangeLog   Tue Mar  9 20:31:57 2004
@@ -1,3 +1,127 @@
+2004-03-09  Rasmus Lerdorf  [EMAIL PROTECTED]
+
+* (PHP_4_3)
+  ext/curl/curl.c
+  ext/curl/interface.c:
+  Make curl_setopt($ch,CURLOPT_RETURNTRANSFER,0) reset the RETURNTRANSFER to
+  stdout as is implied in the documentation.  Currently it simply does
+  absolutely nothing and there is no way to reset it to stdout.
+
+2004-03-09  Marcus Boerger  [EMAIL PROTECTED]
+
+* ZendEngine2/ZEND_CHANGES:
+  Rename hasMore() to valid() as discussed. (Part VI)
+
+* tests/classes/constants_scope_001.phpt:
+  Update test
+
+* ZendEngine2/zend_API.c
+  ZendEngine2/zend_compile.c
+  ZendEngine2/zend_compile.h
+  ZendEngine2/zend_execute.c
+  ZendEngine2/zend_execute_API.c
+  ZendEngine2/zend_interfaces.c
+  ZendEngine2/zend_language_parser.y
+  ZendEngine2/zend_reflection_api.c:
+  Clearify the different method/class flags (as discussed with Andi).
+
+* ZendEngine2/zend.h:
+  No longer needed
+
+2004-03-09  Andi Gutmans  [EMAIL PROTECTED]
+
+* ZendEngine2/zend_constants.c:
+  - Fix crash:
+  ?php
+  class ResourceFormat
+  {
+   const IMG   = 1;
+  }
+  
+  class Image
+  {
+   const RESOURCE_FORMAT   = ResourceFormat::IMG;
+  }
+  
+  print_r(constant('Image::RESOURCE_FORMAT'));
+  ?
+
+* ZendEngine2/zend_compile.c
+  ZendEngine2/zend_compile.h
+  ZendEngine2/zend_execute.c:
+  - Nuke unused code.
+
+2004-03-09  Ilia Alshanetsky  [EMAIL PROTECTED]
+
+* ext/curl/multi.c:
+  Fixed memory leak with curl_multi_init() de-initialization.
+
+* TSRM/tsrm_virtual_cwd.c:
+  Fixed define.
+
+* NEWS
+  TSRM/tsrm_virtual_cwd.c:
+  Fixed bug #27338 (memory leak inside tsrm_virtual_cwd.c on win32).
+
+2004-03-09  Marcus Boerger  [EMAIL PROTECTED]
+
+* run-tests.php:
+  Make run-tests.php work with xdebug being loaded.
+
+* ext/pgsql/tests/02connection.phpt:
+  Show the connect result
+
+* ext/mysqli/mysqli.c:
+  Missing buffer-val change
+
+2004-03-09  Jani Taskinen  [EMAIL PROTECTED]
+
+* (PHP_4_3)
+  ext/standard/tests/strings/bug27457.phpt:
+  test for bug #27457
+
+* ext/standard/tests/strings/bug27457.phpt:
+  
+  test for bug #27457
+
+* (PHP_4_3)
+  NEWS:
+  order
+
+2004-03-09  Georg Richter  [EMAIL PROTECTED]
+
+* ext/mysqli/config.m4
+  ext/mysqli/mysqli_api.c
+  ext/mysqli/mysqli_fe.c
+  ext/mysqli/php_mysqli.h:
+  fixed memleaks in bind functions
+  added 4.1.2 support (renamed functions)
+
+2004-03-09  Derick Rethans  [EMAIL PROTECTED]
+
+* tests/lang/bug27535.phpt:
+  - Added test for bug #27535 (Objects pointing to each other cause Apache to
+crash).
+
+2004-03-09  Ilia Alshanetsky  [EMAIL PROTECTED]
+
+* (PHP_4_3)
+  NEWS
+  main/SAPI.c:
+  MFH: Fixed bug #27530 (broken http auth when safe_mode is on and PCRE is
+  disabled).
+
+* main/SAPI.c:
+  Fixed bug #27530 (broken http auth when safe_mode is on and PCRE is
+  disabled).
+
+* ext/sqlite/libsqlite/src/sqlite.h.in:
+  Fix function declaration.
+
+* ext/sqlite/sqlite.c:
+  Change float operations to safe_emalloc().
+  Original idea by Sascha (see sess_sqlite.c)
+
 2004-03-08  Ard Biesheuvel  [EMAIL PROTECTED]
 
 * ext/sqlite/libsqlite/src/main.c


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

2004-03-09 Thread changelog
changelog   Tue Mar  9 20:32:01 2004 EDT

  Modified files:  
/ZendEngine2ChangeLog 
  Log:
  ChangeLog update
  
http://cvs.php.net/diff.php/ZendEngine2/ChangeLog?r1=1.424r2=1.425ty=u
Index: ZendEngine2/ChangeLog
diff -u ZendEngine2/ChangeLog:1.424 ZendEngine2/ChangeLog:1.425
--- ZendEngine2/ChangeLog:1.424 Mon Mar  8 20:34:32 2004
+++ ZendEngine2/ChangeLog   Tue Mar  9 20:32:01 2004
@@ -1,3 +1,44 @@
+2004-03-09  Marcus Boerger  [EMAIL PROTECTED]
+
+* ZEND_CHANGES:
+  Rename hasMore() to valid() as discussed. (Part VI)
+
+* zend_API.c
+  zend_compile.c
+  zend_compile.h
+  zend_execute.c
+  zend_execute_API.c
+  zend_interfaces.c
+  zend_language_parser.y
+  zend_reflection_api.c:
+  Clearify the different method/class flags (as discussed with Andi).
+
+* zend.h:
+  No longer needed
+
+2004-03-09  Andi Gutmans  [EMAIL PROTECTED]
+
+* zend_constants.c:
+  - Fix crash:
+  ?php
+  class ResourceFormat
+  {
+   const IMG   = 1;
+  }
+  
+  class Image
+  {
+   const RESOURCE_FORMAT   = ResourceFormat::IMG;
+  }
+  
+  print_r(constant('Image::RESOURCE_FORMAT'));
+  ?
+
+* zend_compile.c
+  zend_compile.h
+  zend_execute.c:
+  - Nuke unused code.
+
 2004-03-08  Marcus Boerger  [EMAIL PROTECTED]
 
 * zend_execute.c
@@ -3829,7 +3870,7 @@
 2003-06-10  Jani Taskinen  [EMAIL PROTECTED]
 
 * zend_multiply.h:
-  - Missing $Id: ChangeLog,v 1.424 2004/03/09 01:34:32 changelog Exp $ tag
+  - Missing $Id: ChangeLog,v 1.425 2004/03/10 01:32:01 changelog Exp $ tag
 
 2003-06-10  James Cox  [EMAIL PROTECTED]
 
@@ -5553,7 +5594,7 @@
   zend_types.h
   zend_variables.c
   zend_variables.h:
-  - Added some missing CVS $Id: ChangeLog,v 1.424 2004/03/09 01:34:32 changelog 
Exp $ tags, headers and footers.
+  - Added some missing CVS $Id: ChangeLog,v 1.425 2004/03/10 01:32:01 changelog 
Exp $ tags, headers and footers.
 
 2003-01-30  Ilia Alshanetsky  [EMAIL PROTECTED]
 


[PHP-CVS] cvs: php-src /tests/lang bug27535.phpt

2004-03-09 Thread Derick Rethans
derick  Tue Mar  9 03:19:23 2004 EDT

  Added files: 
/php-src/tests/lang bug27535.phpt 
  Log:
  - Added test for bug #27535 (Objects pointing to each other cause Apache to
crash).
  
  

http://cvs.php.net/co.php/php-src/tests/lang/bug27535.phpt?r=1.1p=1
Index: php-src/tests/lang/bug27535.phpt
+++ php-src/tests/lang/bug27535.phpt
--TEST--
Bug #27535 (Objects pointing to each other cause Apache to crash)
--FILE--
?php
   
 
class Class1
{
public $_Class2_obj;
}

class Class2
{
public $storage = '';

function Class2()
{
$this-storage = new Class1();

$this-storage-_Class2_obj = $this;
}
}

$foo = new Class2();

?
Alive!
--EXPECT--
Alive!

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

2004-03-09 Thread Jani Taskinen
sniper  Tue Mar  9 07:52:10 2004 EDT

  Modified files:  (Branch: PHP_4_3)
/php-srcNEWS 
  Log:
  order
  
http://cvs.php.net/diff.php/php-src/NEWS?r1=1.1247.2.587r2=1.1247.2.588ty=u
Index: php-src/NEWS
diff -u php-src/NEWS:1.1247.2.587 php-src/NEWS:1.1247.2.588
--- php-src/NEWS:1.1247.2.587   Mon Mar  8 21:24:19 2004
+++ php-src/NEWSTue Mar  9 07:52:08 2004
@@ -25,13 +25,13 @@
 - Fixed bug #27293 (two crashes inside image2wbmp()). (Ilia)
 - Fixed bug #27278 (*printf() functions treat arguments as if passed by
   reference). (Ilia)
+- Fixed bug #27238 (iptcparse() function misses some fields). (Pierre)
 - Fixed bug #26753 (zend_fetch_list_dtor_id() doesn't check NULL strings).
   (Jani, Markus dot Lidel at shadowconnect dot com)
 - Fixed bug #26005 (Random cannot change the session ini settings errors).
   (Jani, jsnajdr at kerio dot com)
 - Fixed bug #21760 (Use of uninitialized pointer inside php_read()). (Ilia, 
   uce at ftc dot gov)
-- Fixed bug #27238 (iptcparse() function misses some fields). (Pierre)
 
 16 Feb 2004, Version 4.3.5RC3
 - Fixed zero bytes memory allocation when no extra ini files are found in the

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



Re: [PHP-CVS] cvs: php-src / NEWS

2004-03-09 Thread Jani Taskinen
On Mon, 1 Mar 2004, Moriyoshi Koizumi wrote:

moriyoshi  Mon Mar  1 05:46:15 2004 EDT

  Modified files:  
/php-src   NEWS 
  Log:
  - NFN
  
  
http://cvs.php.net/diff.php/php-src/NEWS?r1=1.1620r2=1.1621ty=u
Index: php-src/NEWS
diff -u php-src/NEWS:1.1620 php-src/NEWS:1.1621
--- php-src/NEWS:1.1620Sun Feb 29 14:07:56 2004
+++ php-src/NEWS   Mon Mar  1 05:46:14 2004
@@ -2,6 +2,9 @@
 |||
 ?? March 2004, PHP 5 Release Candidate 1
 - Upgraded bundled oniguruma library to version 2.2.2. (Rui, Moriyoshi)
+- Add support for more ISO8601 style datetime formats. (Moriyoshi)
+  . Timezone specifier (ex. 20040301T02:00:00+19:00)
+  . Week specifier (ex. 1997W021)

Support in what exactly? (what functions/extension?)

--Jani

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



[PHP-CVS] cvs: php-src /ext/standard/tests/strings bug27457.phpt

2004-03-09 Thread Jani Taskinen
sniper  Tue Mar  9 09:19:51 2004 EDT

  Added files: 
/php-src/ext/standard/tests/strings bug27457.phpt 
  Log:
  test for bug #27457
  

http://cvs.php.net/co.php/php-src/ext/standard/tests/strings/bug27457.phpt?r=1.1p=1
Index: php-src/ext/standard/tests/strings/bug27457.phpt
+++ php-src/ext/standard/tests/strings/bug27457.phpt
--TEST--
Bug #27457 (Problem with strtr() and translation array)
--FILE--
?php
$test = Dot in brackets [.]\n;
echo $test;
$test = strtr($test, array('.' = '0'));
echo $test;
$test = strtr($test, array('0' = '.'));
echo $test;
$test = strtr($test, '.', '0');
echo $test;
$test = strtr($test, '0', '.');
echo $test;
?
--EXPECT--
Dot in brackets [.]
Dot in brackets [0]
Dot in brackets [.]
Dot in brackets [0]
Dot in brackets [.]

-- 
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/tests/strings bug27457.phpt

2004-03-09 Thread Jani Taskinen
sniper  Tue Mar  9 09:20:14 2004 EDT

  Added files: (Branch: PHP_4_3)
/php-src/ext/standard/tests/strings bug27457.phpt 
  Log:
  test for bug #27457
  

http://cvs.php.net/co.php/php-src/ext/standard/tests/strings/bug27457.phpt?r=1.1p=1
Index: php-src/ext/standard/tests/strings/bug27457.phpt
+++ php-src/ext/standard/tests/strings/bug27457.phpt
--TEST--
Bug #27457 (Problem with strtr() and translation array)
--FILE--
?php
$test = Dot in brackets [.]\n;
echo $test;
$test = strtr($test, array('.' = '0'));
echo $test;
$test = strtr($test, array('0' = '.'));
echo $test;
$test = strtr($test, '.', '0');
echo $test;
$test = strtr($test, '0', '.');
echo $test;
?
--EXPECT--
Dot in brackets [.]
Dot in brackets [0]
Dot in brackets [.]
Dot in brackets [0]
Dot in brackets [.]

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



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

2004-03-09 Thread Marcus Boerger
helly   Tue Mar  9 09:29:22 2004 EDT

  Modified files:  
/php-src/ext/mysqli mysqli.c 
  Log:
  Missing buffer-val change
  
http://cvs.php.net/diff.php/php-src/ext/mysqli/mysqli.c?r1=1.33r2=1.34ty=u
Index: php-src/ext/mysqli/mysqli.c
diff -u php-src/ext/mysqli/mysqli.c:1.33 php-src/ext/mysqli/mysqli.c:1.34
--- php-src/ext/mysqli/mysqli.c:1.33Thu Feb 26 06:40:35 2004
+++ php-src/ext/mysqli/mysqli.c Tue Mar  9 09:29:20 2004
@@ -15,7 +15,7 @@
   | Author: Georg Richter [EMAIL PROTECTED]|
   +--+
 
-  $Id: mysqli.c,v 1.33 2004/02/26 11:40:35 georg Exp $ 
+  $Id: mysqli.c,v 1.34 2004/03/09 14:29:20 helly Exp $ 
 */
 
 #ifdef HAVE_CONFIG_H
@@ -66,7 +66,7 @@
for (i=0; i  bbuf.var_cnt; i++) {
if (type == FETCH_RESULT) {
if (bbuf.buf[i].type == IS_STRING) {
-   efree(bbuf.buf[i].buffer);
+   efree(bbuf.buf[i].val);
}
}
if (bbuf.vars[i]) {

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



[PHP-CVS] cvs: php-src /ext/pgsql/tests 02connection.phpt

2004-03-09 Thread Marcus Boerger
helly   Tue Mar  9 09:37:50 2004 EDT

  Modified files:  
/php-src/ext/pgsql/tests02connection.phpt 
  Log:
  Show the connect result
  
http://cvs.php.net/diff.php/php-src/ext/pgsql/tests/02connection.phpt?r1=1.2r2=1.3ty=u
Index: php-src/ext/pgsql/tests/02connection.phpt
diff -u php-src/ext/pgsql/tests/02connection.phpt:1.2 
php-src/ext/pgsql/tests/02connection.phpt:1.3
--- php-src/ext/pgsql/tests/02connection.phpt:1.2   Mon May 19 20:14:46 2003
+++ php-src/ext/pgsql/tests/02connection.phpt   Tue Mar  9 09:37:49 2004
@@ -9,6 +9,8 @@
 include('config.inc');
 
 $db = pg_pconnect($conn_str);
+var_dump($db);
+
 if (pg_connection_status($db) != PGSQL_CONNECTION_OK) 
 {
echo pg_connection_status() error\n;
@@ -44,7 +46,8 @@
 
 pg_close($db);
 
-echo OK;
 ?
---EXPECT--
-OK
+===DONE===
+--EXPECTF--
+resource(%d) of type (pgsql link%s)
+===DONE===

-- 
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-09 Thread Marcus Boerger
helly   Tue Mar  9 09:39:36 2004 EDT

  Modified files:  
/php-srcrun-tests.php 
  Log:
  Make run-tests.php work with xdebug being loaded.
  # Lots of ppl use that as a built-in extension already.
  
  
http://cvs.php.net/diff.php/php-src/run-tests.php?r1=1.188r2=1.189ty=u
Index: php-src/run-tests.php
diff -u php-src/run-tests.php:1.188 php-src/run-tests.php:1.189
--- php-src/run-tests.php:1.188 Fri Jan 16 10:17:37 2004
+++ php-src/run-tests.php   Tue Mar  9 09:39:35 2004
@@ -178,6 +178,7 @@
'auto_prepend_file=',
'auto_append_file=',
'magic_quotes_runtime=0',
+   'xdebug.default_enable=0',
);
 $info_params = array();
 settings2array($ini_overwrites,$info_params);

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



[PHP-CVS] cvs: php-src /ext/curl multi.c

2004-03-09 Thread Ilia Alshanetsky
iliaa   Tue Mar  9 10:04:17 2004 EDT

  Modified files:  
/php-src/ext/curl   multi.c 
  Log:
  Fixed memory leak with curl_multi_init() de-initialization.
  
  
http://cvs.php.net/diff.php/php-src/ext/curl/multi.c?r1=1.13r2=1.14ty=u
Index: php-src/ext/curl/multi.c
diff -u php-src/ext/curl/multi.c:1.13 php-src/ext/curl/multi.c:1.14
--- php-src/ext/curl/multi.c:1.13   Thu Jan  8 03:14:37 2004
+++ php-src/ext/curl/multi.cTue Mar  9 10:04:16 2004
@@ -16,7 +16,7 @@
+--+
 */
 
-/* $Id: multi.c,v 1.13 2004/01/08 08:14:37 andi Exp $ */
+/* $Id: multi.c,v 1.14 2004/03/09 15:04:16 iliaa Exp $ */
 
 #define ZEND_INCLUDE_FULL_WINDOWS_HEADERS
 
@@ -250,7 +250,11 @@
 void _php_curl_multi_close(zend_rsrc_list_entry *rsrc TSRMLS_DC)
 {
php_curlm *mh = (php_curlm *) rsrc-ptr;
-   curl_multi_cleanup(mh-multi);
+   if (mh) {
+   curl_multi_cleanup(mh-multi);
+   efree(mh);
+   rsrc-ptr = NULL;
+   }
/* XXX: keep track of all curl handles and zval_ptr_dtor them here */
 }
 

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



Re: [PHP-CVS] cvs: php-src / NEWS

2004-03-09 Thread Moriyoshi Koizumi
On 2004/03/09, at 21:59, Jani Taskinen wrote:

On Mon, 1 Mar 2004, Moriyoshi Koizumi wrote:

moriyoshi		Mon Mar  1 05:46:15 2004 EDT

 Modified files:
   /php-src NEWS
 Log:
 - NFN
http://cvs.php.net/diff.php/php-src/NEWS?r1=1.1620r2=1.1621ty=u
Index: php-src/NEWS
diff -u php-src/NEWS:1.1620 php-src/NEWS:1.1621
--- php-src/NEWS:1.1620	Sun Feb 29 14:07:56 2004
+++ php-src/NEWS	Mon Mar  1 05:46:14 2004
@@ -2,6 +2,9 @@
|| 
|
?? March 2004, PHP 5 Release Candidate 1
- Upgraded bundled oniguruma library to version 2.2.2. (Rui,  
Moriyoshi)
+- Add support for more ISO8601 style datetime formats. (Moriyoshi)
+  . Timezone specifier (ex. 20040301T02:00:00+19:00)
+  . Week specifier (ex. 1997W021)
Support in what exactly? (what functions/extension?)
strtotime(). It should have been more descriptive :)

Moriyoshi

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


[PHP-CVS] cvs: php-src /ext/spl spl_functions.c spl_iterators.c ZendEngine2 zend_API.c zend_compile.c zend_compile.h zend_execute.c zend_execute_API.c zend_interfaces.c zend_language_parser.y zend_reflection_api.c

2004-03-09 Thread Marcus Boerger
helly   Tue Mar  9 11:38:38 2004 EDT

  Modified files:  
/ZendEngine2zend_API.c zend_compile.c zend_compile.h 
zend_execute.c zend_execute_API.c zend_interfaces.c 
zend_language_parser.y zend_reflection_api.c 
/php-src/ext/splspl_functions.c spl_iterators.c 
  Log:
  Clearify the different method/class flags (as discussed with Andi).
  
  http://cvs.php.net/diff.php/ZendEngine2/zend_API.c?r1=1.245r2=1.246ty=u
Index: ZendEngine2/zend_API.c
diff -u ZendEngine2/zend_API.c:1.245 ZendEngine2/zend_API.c:1.246
--- ZendEngine2/zend_API.c:1.245Tue Mar  2 11:17:58 2004
+++ ZendEngine2/zend_API.c  Tue Mar  9 11:38:33 2004
@@ -18,7 +18,7 @@
+--+
 */
 
-/* $Id: zend_API.c,v 1.245 2004/03/02 16:17:58 helly Exp $ */
+/* $Id: zend_API.c,v 1.246 2004/03/09 16:38:33 helly Exp $ */
 
 #include zend.h
 #include zend_execute.h
@@ -1237,11 +1237,12 @@
if (ptr-flags  ZEND_ACC_ABSTRACT) {
if (scope) {
/* This is a class that must be abstract itself. Here 
we set the check info. */
-   scope-ce_flags |= ZEND_ACC_ABSTRACT;
+   scope-ce_flags |= ZEND_ACC_IMPLICIT_ABSTRACT_CLASS;
if (!(scope-ce_flags  ZEND_ACC_INTERFACE)) {
/* Since the class is not an interface it 
needs to be declared as a abstract class. */
+   /* Since here we are handling internal 
functions only we can add the keyword flag. */
/* This time we set the flag for the keyword 
'abstratc'. */
-   scope-ce_flags |= ZEND_ACC_ABSTRACT_CLASS;
+   scope-ce_flags |= 
ZEND_ACC_EXPLICIT_ABSTRACT_CLASS;
}
}
} else {
@@ -1522,7 +1523,7 @@
 
 ZEND_API zend_class_entry *zend_register_internal_interface(zend_class_entry 
*orig_class_entry TSRMLS_DC)
 {
-   return do_register_internal_class(orig_class_entry, 
ZEND_ACC_ABSTRACT|ZEND_ACC_INTERFACE TSRMLS_CC);
+   return do_register_internal_class(orig_class_entry, ZEND_ACC_INTERFACE 
TSRMLS_CC);
 }
 
 ZEND_API int zend_set_hash_symbol(zval *symbol, char *name, int name_length,
http://cvs.php.net/diff.php/ZendEngine2/zend_compile.c?r1=1.555r2=1.556ty=u
Index: ZendEngine2/zend_compile.c
diff -u ZendEngine2/zend_compile.c:1.555 ZendEngine2/zend_compile.c:1.556
--- ZendEngine2/zend_compile.c:1.555Tue Mar  9 10:27:39 2004
+++ ZendEngine2/zend_compile.c  Tue Mar  9 11:38:33 2004
@@ -17,7 +17,7 @@
+--+
 */
 
-/* $Id: zend_compile.c,v 1.555 2004/03/09 15:27:39 andi Exp $ */
+/* $Id: zend_compile.c,v 1.556 2004/03/09 16:38:33 helly Exp $ */
 
 #include zend_language_parser.h
 #include zend.h
@@ -974,7 +974,7 @@
}
 
if (fn_flags  ZEND_ACC_ABSTRACT) {
-   CG(active_class_entry)-ce_flags |= ZEND_ACC_ABSTRACT;
+   CG(active_class_entry)-ce_flags |= 
ZEND_ACC_IMPLICIT_ABSTRACT_CLASS;
}
 
if (!(fn_flags  ZEND_ACC_PPP_MASK)) {
@@ -1749,8 +1749,8 @@
TSRMLS_FETCH();
 
if (zend_hash_quick_find(child_function_table, hash_key-arKey, 
hash_key-nKeyLength, hash_key-h, (void **) child)==FAILURE) {
-   if (parent_flags  ZEND_ACC_ABSTRACT) {
-   child_ce-ce_flags |= ZEND_ACC_ABSTRACT;
+   if (parent_flags  (ZEND_ACC_ABSTRACT)) {
+   child_ce-ce_flags |= ZEND_ACC_IMPLICIT_ABSTRACT_CLASS;
}
return 1; /* method doesn't exist in child, copy from parent */
}
@@ -2537,8 +2537,7 @@
if (ce-num_interfaces  0) {
ce-interfaces = (zend_class_entry **) erealloc(ce-interfaces, 
sizeof(zend_class_entry *)*ce-num_interfaces);
}
-   if (!(ce-ce_flags  ZEND_ACC_INTERFACE)
-!(ce-ce_flags  ZEND_ACC_ABSTRACT_CLASS)
+   if (!(ce-ce_flags  (ZEND_ACC_INTERFACE|ZEND_ACC_EXPLICIT_ABSTRACT_CLASS))
 ((parent_token-op_type != IS_UNUSED) || (ce-num_interfaces  0))) 
{
zend_verify_abstract_class(ce TSRMLS_CC);
if (ce-parent || ce-num_interfaces) {
http://cvs.php.net/diff.php/ZendEngine2/zend_compile.h?r1=1.281r2=1.282ty=u
Index: ZendEngine2/zend_compile.h
diff -u ZendEngine2/zend_compile.h:1.281 ZendEngine2/zend_compile.h:1.282
--- ZendEngine2/zend_compile.h:1.281Tue Mar  9 10:27:39 2004
+++ ZendEngine2/zend_compile.h  Tue Mar  9 11:38:33 2004
@@ -17,7 +17,7 @@
+--+
 */
 
-/* $Id: zend_compile.h,v 1.281 2004/03/09 15:27:39 andi 

[PHP-CVS] cvs: php-src /tests/classes constants_scope_001.phpt

2004-03-09 Thread Marcus Boerger
helly   Tue Mar  9 11:51:03 2004 EDT

  Modified files:  
/php-src/tests/classes  constants_scope_001.phpt 
  Log:
  Update test
  
http://cvs.php.net/diff.php/php-src/tests/classes/constants_scope_001.phpt?r1=1.1r2=1.2ty=u
Index: php-src/tests/classes/constants_scope_001.phpt
diff -u php-src/tests/classes/constants_scope_001.phpt:1.1 
php-src/tests/classes/constants_scope_001.phpt:1.2
--- php-src/tests/classes/constants_scope_001.phpt:1.1  Mon Mar  3 11:44:38 2003
+++ php-src/tests/classes/constants_scope_001.phpt  Tue Mar  9 11:51:02 2004
@@ -11,15 +11,28 @@
const INFO = Informational message\n;
 
static function print_fatal_error_codes() {
-   echo FATAL =  . FATAL;
+   echo FATAL =  . FATAL . \n;
echo self::FATAL =  . self::FATAL;
 }
 }
 
+class ErrorCodesDerived extends ErrorCodes {
+   const FATAL = Worst error\n;
+   static function print_fatal_error_codes() {
+   echo self::FATAL =  . self::FATAL;
+   echo parent::FATAL =  . parent::FATAL;
+}
+}
+
 /* Call the static function and move into the ErrorCodes scope */
 ErrorCodes::print_fatal_error_codes();
+ErrorCodesDerived::print_fatal_error_codes();
 
 ?
---EXPECT--
-FATAL = Fatal error
+--EXPECTF--
+
+Notice: Use of undefined constant FATAL - assumed 'FATAL' in 
%sconstants_scope_001.php on line %d
+FATAL = FATAL
 self::FATAL = Fatal error
+self::FATAL = Worst error
+parent::FATAL = Fatal error

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



[PHP-CVS] cvs: php-src /ext/spl README

2004-03-09 Thread Marcus Boerger
helly   Tue Mar  9 11:58:16 2004 EDT

  Modified files:  
/php-src/ext/splREADME 
  Log:
  Update
  
http://cvs.php.net/diff.php/php-src/ext/spl/README?r1=1.5r2=1.6ty=u
Index: php-src/ext/spl/README
diff -u php-src/ext/spl/README:1.5 php-src/ext/spl/README:1.6
--- php-src/ext/spl/README:1.5  Sat Jan 10 18:49:26 2004
+++ php-src/ext/spl/README  Tue Mar  9 11:58:11 2004
@@ -24,3 +24,19 @@
 
 class DirectoryIterator implements Iterator
 class RecursiveDirectoryIterator extends DirectoryIterator implements 
RecursiveIterator
+
+3) XML
+
+SPL offers an advanced XML handling class.
+
+class SimpleXMLIterator extends simplexml_element extends recursiveiterator
+
+4) Array Overloading
+
+SPL offers advanced Array overloading.
+
+class ArrayObject implements IteratorAggregate
+class ArrayIterator implements Iterator
+
+As the above suggest an ArrayObject creates an ArrayIterator when it comes to
+iteration (e.g. ArrayObject instance used inside foreach).

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



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

2004-03-09 Thread Marcus Boerger
helly   Tue Mar  9 12:01:23 2004 EDT

  Modified files:  
/php-src/ext/splspl.php 
  Log:
  Update
  
http://cvs.php.net/diff.php/php-src/ext/spl/spl.php?r1=1.14r2=1.15ty=u
Index: php-src/ext/spl/spl.php
diff -u php-src/ext/spl/spl.php:1.14 php-src/ext/spl/spl.php:1.15
--- php-src/ext/spl/spl.php:1.14Mon Mar  8 12:33:29 2004
+++ php-src/ext/spl/spl.php Tue Mar  9 12:01:21 2004
@@ -2,7 +2,7 @@
 
 /** Standard PHP Library
  *
- * (c) Marcus Boerger, 2003
+ * (c) Marcus Boerger, 2003 - 2004
  */
 
 /** Abstract base interface that cannot be implemented alone. Instead it
@@ -318,6 +318,22 @@
  */
 class SimpleXMLIterator extends simplexml_element implements RecursiveIterator
 {
+   /** \copydoc Iterator::rewind
+*/
+   function rewind();
+
+   /** \copydoc Iterator::current
+*/
+   function current();
+
+   /** \copydoc Iterator::next
+*/
+   function next();
+
+   /** \copydoc Iterator::valid
+*/
+   function valid();
+   
/** \return whether the current node has sub nodes.
 */
function hasChildren(); 

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

2004-03-09 Thread Rasmus Lerdorf
rasmus  Tue Mar  9 12:06:55 2004 EDT

  Modified files:  (Branch: PHP_4_3)
/php-src/ext/curl   curl.c 
  Log:
  Make curl_setopt($ch,CURLOPT_RETURNTRANSFER,0) reset the RETURNTRANSFER to
  stdout as is implied in the documentation.  Currently it simply does
  absolutely nothing and there is no way to reset it to stdout.
  
  
http://cvs.php.net/diff.php/php-src/ext/curl/curl.c?r1=1.124.2.16r2=1.124.2.17ty=u
Index: php-src/ext/curl/curl.c
diff -u php-src/ext/curl/curl.c:1.124.2.16 php-src/ext/curl/curl.c:1.124.2.17
--- php-src/ext/curl/curl.c:1.124.2.16  Mon Feb 23 14:50:47 2004
+++ php-src/ext/curl/curl.c Tue Mar  9 12:06:53 2004
@@ -16,7 +16,7 @@
+--+
 */
 
-/* $Id: curl.c,v 1.124.2.16 2004/02/23 19:50:47 iliaa Exp $ */
+/* $Id: curl.c,v 1.124.2.17 2004/03/09 17:06:53 rasmus Exp $ */
 
 #ifdef HAVE_CONFIG_H
 #include config.h
@@ -802,7 +802,9 @@
 
if (Z_LVAL_PP(zvalue)) {
ch-handlers-write-method = PHP_CURL_RETURN;
-   }
+   } else {
+   ch-handlers-write-method = PHP_CURL_STDOUT;
+   }   
break;
case CURLOPT_BINARYTRANSFER:
convert_to_long_ex(zvalue); 

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



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

2004-03-09 Thread Marcus Boerger
helly   Tue Mar  9 12:35:25 2004 EDT

  Modified files:  
/php-src/ext/splspl_iterators.c 
  Log:
  Access to inner iterator was missing
  
http://cvs.php.net/diff.php/php-src/ext/spl/spl_iterators.c?r1=1.25r2=1.26ty=u
Index: php-src/ext/spl/spl_iterators.c
diff -u php-src/ext/spl/spl_iterators.c:1.25 php-src/ext/spl/spl_iterators.c:1.26
--- php-src/ext/spl/spl_iterators.c:1.25Tue Mar  9 11:38:37 2004
+++ php-src/ext/spl/spl_iterators.c Tue Mar  9 12:35:18 2004
@@ -16,7 +16,7 @@
+--+
  */
 
-/* $Id: spl_iterators.c,v 1.25 2004/03/09 16:38:37 helly Exp $ */
+/* $Id: spl_iterators.c,v 1.26 2004/03/09 17:35:18 helly Exp $ */
 
 #ifdef HAVE_CONFIG_H
 # include config.h
@@ -595,6 +595,19 @@
spl_dual_it_construct(INTERNAL_FUNCTION_PARAM_PASSTHRU, zend_ce_iterator, 
DIT_Default);
 }
 
+SPL_METHOD(dual_it, getInnerIterator)
+{
+   spl_dual_it_object   *intern;
+
+   intern = (spl_dual_it_object*)zend_object_store_get_object(getThis() 
TSRMLS_CC);
+
+   if (intern-inner.zobject) {
+   RETVAL_ZVAL(intern-inner.zobject, 0, 0);
+   } else {
+   RETURN_NULL();
+   }
+}
+
 static INLINE void spl_dual_it_free(spl_dual_it_object *intern TSRMLS_DC)
 {
if (intern-current.data) {
@@ -840,12 +853,13 @@
 ZEND_END_ARG_INFO();
 
 static zend_function_entry spl_funcs_FilterIterator[] = {
-   SPL_ME(dual_it,__construct,   arginfo_filter_it___construct, 
ZEND_ACC_PUBLIC)
-   SPL_ME(FilterIterator, rewind,NULL, ZEND_ACC_PUBLIC)
-   SPL_ME(dual_it,valid, NULL, ZEND_ACC_PUBLIC)
-   SPL_ME(dual_it,key,   NULL, ZEND_ACC_PUBLIC)
-   SPL_ME(dual_it,current,   NULL, ZEND_ACC_PUBLIC)
-   SPL_ME(FilterIterator, next,  NULL, ZEND_ACC_PUBLIC)
+   SPL_ME(dual_it, __construct,  arginfo_filter_it___construct, 
ZEND_ACC_PUBLIC)
+   SPL_ME(FilterIterator,  rewind,   NULL, ZEND_ACC_PUBLIC)
+   SPL_ME(dual_it, valid,NULL, ZEND_ACC_PUBLIC)
+   SPL_ME(dual_it, key,  NULL, ZEND_ACC_PUBLIC)
+   SPL_ME(dual_it, current,  NULL, ZEND_ACC_PUBLIC)
+   SPL_ME(FilterIterator,  next, NULL, ZEND_ACC_PUBLIC)
+   SPL_ME(dual_it, getInnerIterator, NULL, ZEND_ACC_PUBLIC)
SPL_ABSTRACT_ME(FilterIterator, accept, NULL)
{NULL, NULL, NULL}
 };
@@ -856,10 +870,11 @@
 ZEND_END_ARG_INFO();
 
 static zend_function_entry spl_funcs_ParentIterator[] = {
-   SPL_ME(ParentIterator, __construct,   arginfo_parent_it___construct, 
ZEND_ACC_PUBLIC)
-   SPL_MA(ParentIterator, accept,ParentIterator, hasChildren, NULL, 
ZEND_ACC_PUBLIC)
-   SPL_ME(ParentIterator, hasChildren,   NULL, ZEND_ACC_PUBLIC)
-   SPL_ME(ParentIterator, getChildren,   NULL, ZEND_ACC_PUBLIC)
+   SPL_ME(ParentIterator,  __construct,  arginfo_parent_it___construct, 
ZEND_ACC_PUBLIC)
+   SPL_MA(ParentIterator,  accept,   ParentIterator, hasChildren, NULL, 
ZEND_ACC_PUBLIC)
+   SPL_ME(ParentIterator,  hasChildren,  NULL, ZEND_ACC_PUBLIC)
+   SPL_ME(ParentIterator,  getChildren,  NULL, ZEND_ACC_PUBLIC)
+   SPL_ME(dual_it, getInnerIterator, NULL, ZEND_ACC_PUBLIC)
{NULL, NULL, NULL}
 };
 
@@ -992,14 +1007,15 @@
 ZEND_END_ARG_INFO();
 
 static zend_function_entry spl_funcs_LimitIterator[] = {
-   SPL_ME(LimitIterator, __construct,   arginfo_limit_it___construct, 
ZEND_ACC_PUBLIC)
-   SPL_ME(LimitIterator, rewind,NULL, ZEND_ACC_PUBLIC)
-   SPL_ME(LimitIterator, valid, NULL, ZEND_ACC_PUBLIC)
-   SPL_ME(dual_it,   key,   NULL, ZEND_ACC_PUBLIC)
-   SPL_ME(dual_it,   current,   NULL, ZEND_ACC_PUBLIC)
-   SPL_ME(LimitIterator, next,  NULL, ZEND_ACC_PUBLIC)
-   SPL_ME(LimitIterator, seek,  arginfo_limit_it_seek, ZEND_ACC_PUBLIC)
-   SPL_ME(LimitIterator, getPosition,   NULL, ZEND_ACC_PUBLIC)
+   SPL_ME(LimitIterator,   __construct,  arginfo_limit_it___construct, 
ZEND_ACC_PUBLIC)
+   SPL_ME(LimitIterator,   rewind,   NULL, ZEND_ACC_PUBLIC)
+   SPL_ME(LimitIterator,   valid,NULL, ZEND_ACC_PUBLIC)
+   SPL_ME(dual_it, key,  NULL, ZEND_ACC_PUBLIC)
+   SPL_ME(dual_it, current,  NULL, ZEND_ACC_PUBLIC)
+   SPL_ME(LimitIterator,   next, NULL, ZEND_ACC_PUBLIC)
+   SPL_ME(LimitIterator,   seek, arginfo_limit_it_seek, 
ZEND_ACC_PUBLIC)
+   SPL_ME(LimitIterator,   getPosition,  NULL, ZEND_ACC_PUBLIC)
+   SPL_ME(dual_it, getInnerIterator, NULL, ZEND_ACC_PUBLIC)
{NULL, NULL, NULL}
 };
 
@@ -1125,14 +1141,15 @@
 ZEND_END_ARG_INFO();
 
 static zend_function_entry spl_funcs_CachingIterator[] = {
-   SPL_ME(CachingIterator, __construct,   

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

2004-03-09 Thread Marcus Boerger
helly   Tue Mar  9 12:36:34 2004 EDT

  Modified files:  
/php-src/ext/splspl.php 
  Log:
  Drop copydoc and add more classes/methods
  
http://cvs.php.net/diff.php/php-src/ext/spl/spl.php?r1=1.15r2=1.16ty=u
Index: php-src/ext/spl/spl.php
diff -u php-src/ext/spl/spl.php:1.15 php-src/ext/spl/spl.php:1.16
--- php-src/ext/spl/spl.php:1.15Tue Mar  9 12:01:21 2004
+++ php-src/ext/spl/spl.php Tue Mar  9 12:36:32 2004
@@ -139,26 +139,6 @@
 * \param $array the array to use.
 */
private function __construct($array);
-
-   /** \copydoc Iterator::rewind
-*/
-   function rewind();
-
-   /** \copydoc Iterator::current
-*/
-   function current();
-
-   /** \copydoc Iterator::key
-*/
-   function key();
-
-   /** \copydoc Iterator::next
-*/
-   function next();
-
-   /** \copydoc Iterator::valid
-*/
-   function valid();
 }
 
 /** Iterator that wrapps around another iterator and only returns selected
@@ -176,26 +156,51 @@
 * used as a current element of this iterator or if it should be skipped.
 */
abstract function accept();
-
-   /** \copydoc Iterator::rewind
+   
+   /** \return the inner Iterator
 */
-   function rewind();
+   function getInnerIterator();
+}
 
-   /** \copydoc Iterator::current
+interface SeekableIterator implements Iterator
+{
+   /** Seek to a specific position if available or throw an exception.
 */
-   function current();
+   function seek($position);
+}
 
-   /** \copydoc Iterator::key
+/** A class that starts iteration at a certain offset and only iterates over
+ * a specified amount of elements.
+ */
+class LimitIetrator implements Iterator
+{
+   /** Construct an instance form a Iterator.
+*
+* \param $iterator inner iterator
+* \param $offset   starting position (zero based)
+* \param $countamount of elements returned, if available)
 */
-   function key();
+   function __construct(Iterator $iterator, $offset = 0, $count = -1);
 
-   /** \copydoc Iterator::next
+   /** \return whether the current element of the inner iterator should be
+* used as a current element of this iterator or if it should be skipped.
 */
-   function next();
-
-   /** \copydoc Iterator::valid
+   abstract function accept();
+   
+   /** \return the inner Iterator
+*/
+   function getInnerIterator();
+   
+   /** Seek to a specific position if available or throw an exception.
+* If the inner iterator is an instance of SeekableIterator its seek()
+* method will be used. Otherwise the iterator will me manually forwared
+* and rewinded first if necessary.
 */
-   function valid();
+   function seek($position);
+   
+   /** return the current position (zero based)
+*/
+   function getPosition();
 }
 
 /** A recursive iterator that only returns elements that themselves can be 
@@ -208,34 +213,50 @@
 * \param $iterator inner iterator
 */
function __construct(RecursiveIterator $iterator);
+}
 
-   /** \copydoc RecursiveIterator::hasChildren
-*/
-   function hasChildren();
-
-   /** \copydoc RecursiveIterator::getChildren
-*/
-   function getChildren();
-
-   /** \copydoc Iterator::rewind
+/** This Iterator allways reads one ahead. That allows it to know whether
+ * more elements are available.
+ */
+class CachingIterator implements Iterator
+{
+   /** Construct an instance form a RecursiveIterator.
+*
+* \param $iterator  inner iterator
+* \param $getStrVal whether to fetch the value returned by __toString()
+*   or the (string) conversion. This is optional since
+*   it is not always used nad takes an additional fcall.
 */
-   function rewind();
+   function __construct(Iterator $iterator, $getStrVal = false);
 
-   /** \copydoc Iterator::current
+   /** \return whether the inner iterator is valid. That is this iterator
+* is valid and has one more element.
 */
-   function current();
+   function hasNext();
 
-   /** \copydoc Iterator::key
+   /** \return The last value from the inner iterators __toString() or
+* (string) conversion. The value is only fetched when the __constructor
+* was called with $getStrVal = true.
 */
-   function key();
-
-   /** \copydoc Iterator::next
+   function __tostring();
+   
+   /** \return the inner Iterator
 */
-   function next();
+   function getInnerIterator();
+}
 
-   /** \copydoc Iterator::valid
+/** The recursive version of the CachingIterator.
+ */
+class CachingRecursiveIterator extends CachingIterator implemnets RecursiveIterator