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

2008-02-04 Thread Jani Taskinen
This function was actually just for debugging. I didn't include it in by
default since I don't think it has much value to the end users..:)
Did you find some real usage for it?

--Jani

On Sun, 2008-02-03 at 14:35 +, Marcus Boerger wrote:
> helly Sun Feb  3 14:35:29 2008 UTC
> 
>   Modified files:  
> /php-src/ext/standard basic_functions.c basic_functions.h 
> /php-src/main php_ini.c php_ini.h 
>   Log:
>   - Rename dump_config_hash() to get_config_hash() as it doesn't dump
>   
> http://cvs.php.net/viewvc.cgi/php-src/ext/standard/basic_functions.c?r1=1.887&r2=1.888&diff_format=u
> Index: php-src/ext/standard/basic_functions.c
> diff -u php-src/ext/standard/basic_functions.c:1.887 
> php-src/ext/standard/basic_functions.c:1.888
> --- php-src/ext/standard/basic_functions.c:1.887  Sat Jan 19 19:23:25 2008
> +++ php-src/ext/standard/basic_functions.cSun Feb  3 14:35:29 2008
> @@ -17,7 +17,7 @@
> +--+
>   */
>  
> -/* $Id: basic_functions.c,v 1.887 2008/01/19 19:23:25 davidc Exp $ */
> +/* $Id: basic_functions.c,v 1.888 2008/02/03 14:35:29 helly Exp $ */
>  
>  #include "php.h"
>  #include "php_streams.h"
> @@ -943,11 +943,9 @@
>   ZEND_ARG_INFO(0, scanner_mode)
>  ZEND_END_ARG_INFO()
>  
> -#if ZEND_DEBUG
>  static
> -ZEND_BEGIN_ARG_INFO(arginfo_dump_config_hash, 0)
> +ZEND_BEGIN_ARG_INFO(arginfo_get_config_hash, 0)
>  ZEND_END_ARG_INFO()
> -#endif
>  
>  static
>  ZEND_BEGIN_ARG_INFO_EX(arginfo_import_request_variables, 0, 0, 1)
> @@ -3439,9 +3437,7 @@
>   PHP_FE(connection_status,   
> arginfo_connection_status)
>   PHP_FE(ignore_user_abort,   
> arginfo_ignore_user_abort)
>   PHP_FE(parse_ini_file,  
> arginfo_parse_ini_file)
> -#if ZEND_DEBUG
> - PHP_FE(dump_config_hash,
> arginfo_dump_config_hash)
> -#endif
> + PHP_FE(get_config_hash, 
> arginfo_get_config_hash)
>   PHP_FE(is_uploaded_file,
> arginfo_is_uploaded_file)
>   PHP_FE(move_uploaded_file,  
> arginfo_move_uploaded_file)
>  
> @@ -6340,18 +6336,16 @@
>  }
>  /* }}} */
>  
> -#if ZEND_DEBUG
> -/* {{{ proto void dump_config_hash(void)
> +/* {{{ proto array get_config_hash(void)
>   */
> -PHP_FUNCTION(dump_config_hash)
> +PHP_FUNCTION(get_config_hash)
>  {
> - HashTable hash = get_configuration_hash();
> + HashTable *hash = php_ini_get_configuration_hash();
>  
>   array_init(return_value);
> - zend_hash_apply_with_arguments(&hash, (apply_func_args_t) 
> add_config_entry_cb, 1, return_value TSRMLS_CC);
> + zend_hash_apply_with_arguments(hash, (apply_func_args_t) 
> add_config_entry_cb, 1, return_value TSRMLS_CC);
>  }
>  /* }}} */
> -#endif
>  
>  static int copy_request_variable(void *pDest, int num_args, va_list args, 
> zend_hash_key *hash_key) /* {{{ */
>  {
> http://cvs.php.net/viewvc.cgi/php-src/ext/standard/basic_functions.h?r1=1.159&r2=1.160&diff_format=u
> Index: php-src/ext/standard/basic_functions.h
> diff -u php-src/ext/standard/basic_functions.h:1.159 
> php-src/ext/standard/basic_functions.h:1.160
> --- php-src/ext/standard/basic_functions.h:1.159  Mon Dec 31 07:12:15 2007
> +++ php-src/ext/standard/basic_functions.hSun Feb  3 14:35:29 2008
> @@ -17,7 +17,7 @@
> +--+
>  */
>  
> -/* $Id: basic_functions.h,v 1.159 2007/12/31 07:12:15 sebastian Exp $ */
> +/* $Id: basic_functions.h,v 1.160 2008/02/03 14:35:29 helly Exp $ */
>  
>  #ifndef BASIC_FUNCTIONS_H
>  #define BASIC_FUNCTIONS_H
> @@ -125,9 +125,7 @@
>  
>  /* From the INI parser */
>  PHP_FUNCTION(parse_ini_file);
> -#if ZEND_DEBUG
>  PHP_FUNCTION(dump_config_hash);
> -#endif
>  
>  PHP_FUNCTION(str_rot13);
>  PHP_FUNCTION(stream_get_filters);
> http://cvs.php.net/viewvc.cgi/php-src/main/php_ini.c?r1=1.164&r2=1.165&diff_format=u
> Index: php-src/main/php_ini.c
> diff -u php-src/main/php_ini.c:1.164 php-src/main/php_ini.c:1.165
> --- php-src/main/php_ini.c:1.164  Mon Dec 31 07:12:18 2007
> +++ php-src/main/php_ini.cSun Feb  3 14:35:29 2008
> @@ -16,7 +16,7 @@
> +--+
>   */
>  
> -/* $Id: php_ini.c,v 1.164 2007/12/31 07:12:18 sebastian Exp $ */
> +/* $Id: php_ini.c,v 1.165 2008/02/03 14:35:29 helly Exp $ */

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

2008-02-04 Thread Jani Taskinen
Like what stuff? :)

--Jani

On Mon, 2008-02-04 at 11:40 +0100, Marcus Boerger wrote:
> Hello Jani,
> 
>   for the moment probably only ofr me. But I am working on more stuff.
> 
> marcus
> 
> Monday, February 4, 2008, 10:28:09 AM, you wrote:
> 
> > This function was actually just for debugging. I didn't include it in by
> > default since I don't think it has much value to the end users..:)
> > Did you find some real usage for it?
> 
> > --Jani
> 
> > On Sun, 2008-02-03 at 14:35 +, Marcus Boerger wrote:
> >> helly Sun Feb  3 14:35:29 2008 UTC
> >> 
> >>   Modified files:  
> >> /php-src/ext/standard basic_functions.c basic_functions.h 
> >> /php-src/main php_ini.c php_ini.h 
> >>   Log:
> >>   - Rename dump_config_hash() to get_config_hash() as it doesn't dump
> >>   
> >> http://cvs.php.net/viewvc.cgi/php-src/ext/standard/basic_functions.c?r1=1.887&r2=1.888&diff_format=u
> >> Index: php-src/ext/standard/basic_functions.c
> >> diff -u php-src/ext/standard/basic_functions.c:1.887 
> >> php-src/ext/standard/basic_functions.c:1.888
> >> --- php-src/ext/standard/basic_functions.c:1.887  Sat Jan 19 19:23:25 
> >> 2008
> >> +++ php-src/ext/standard/basic_functions.cSun Feb  3 14:35:29 2008
> >> @@ -17,7 +17,7 @@
> >> 
> >> +--+
> >>   */
> >>  
> >> -/* $Id: basic_functions.c,v 1.887 2008/01/19 19:23:25 davidc Exp $ */
> >> +/* $Id: basic_functions.c,v 1.888 2008/02/03 14:35:29 helly Exp $ */
> >>  
> >>  #include "php.h"
> >>  #include "php_streams.h"
> >> @@ -943,11 +943,9 @@
> >>   ZEND_ARG_INFO(0, scanner_mode)
> >>  ZEND_END_ARG_INFO()
> >>  
> >> -#if ZEND_DEBUG
> >>  static
> >> -ZEND_BEGIN_ARG_INFO(arginfo_dump_config_hash, 0)
> >> +ZEND_BEGIN_ARG_INFO(arginfo_get_config_hash, 0)
> >>  ZEND_END_ARG_INFO()
> >> -#endif
> >>  
> >>  static
> >>  ZEND_BEGIN_ARG_INFO_EX(arginfo_import_request_variables, 0, 0, 1)
> >> @@ -3439,9 +3437,7 @@
> >>   PHP_FE(connection_status,
> >>
> >> arginfo_connection_status)
> >>   PHP_FE(ignore_user_abort,
> >>
> >> arginfo_ignore_user_abort)
> >>   PHP_FE(parse_ini_file,   
> >>
> >> arginfo_parse_ini_file)
> >> -#if ZEND_DEBUG
> >> - PHP_FE(dump_config_hash, 
> >>
> >> arginfo_dump_config_hash)
> >> -#endif
> >> + PHP_FE(get_config_hash,  
> >>
> >> arginfo_get_config_hash)
> >>   PHP_FE(is_uploaded_file, 
> >>
> >> arginfo_is_uploaded_file)
> >>   PHP_FE(move_uploaded_file,   
> >>
> >> arginfo_move_uploaded_file)
> >>  
> >> @@ -6340,18 +6336,16 @@
> >>  }
> >>  /* }}} */
> >>  
> >> -#if ZEND_DEBUG
> >> -/* {{{ proto void dump_config_hash(void)
> >> +/* {{{ proto array get_config_hash(void)
> >>   */
> >> -PHP_FUNCTION(dump_config_hash)
> >> +PHP_FUNCTION(get_config_hash)
> >>  {
> >> - HashTable hash = get_configuration_hash();
> >> + HashTable *hash = php_ini_get_configuration_hash();
> >>  
> >>   array_init(return_value);
> >> - zend_hash_apply_with_arguments(&hash, (apply_func_args_t) 
> >> add_config_entry_cb, 1, return_value
> >> TSRMLS_CC);
> >> + zend_hash_apply_with_arguments(hash, (apply_func_args_t) 
> >> add_config_entry_cb, 1, return_value
> >> TSRMLS_CC);
> >>  }
> >>  /* }}} */
> >> -#endif
> >>  
> >>  static int copy_request_variable(void *pDest, int num_args, va_list args, 
> >> zend_hash_key *hash_key) /* {{{ */
> >>  {
> >> http://cvs.php.net/viewvc.cgi/php-src/ext/standard/basic_functions.h?r1=1.159&r2=1.160&diff_format=u
> >> Index: php-src/ext/standard/basic_functions.h
> >> diff -u php-src/ext/standard/basic_functions.h:1.159 
> >> php-src/ext/standard/basic_functions.h:1.160
> >> --- php-src/ext/standard/basic_functions.h:1.159  Mon Dec 31 07:12:15 
> >> 2007
> >> +++ php-src/ext/standard/basic_functions.hSun Feb  3 14:35:29 2008
> >> @@ -17,7 +17,7 @@
> >> 
> >> +--+
> >>  */
> >>  
> >> -/* $Id: basic_functions.h,v 1.159 2007/12/31 07:12:15 sebastian Exp $ */
> >> +/* $Id: basic_functions.h,v 1.160 2008/02/03 14:35:29 helly Exp $ */
> >>  
> >>  #ifndef BASIC_FUNCTIONS_H
> >>  #define BASIC_FUNCTIONS_H
> >> @@ -125,9 +125,7 @@
> >>  
> >>  /* From the INI parser */
> >>  PHP_FUNCTION(parse_ini_file);
> >> -#if ZEND_DEBUG
> >>  PHP_FUNCTION(dump_config_hash);
> >> -#endif
> >>  
> >>  PHP_FUNCTION(str_rot13);
> >>  PHP_FUNCTION(stream_get_filters);
> >> http://cvs.php.net/viewvc

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

2008-02-04 Thread Marcus Boerger
Hello Jani,

  for the moment probably only ofr me. But I am working on more stuff.

marcus

Monday, February 4, 2008, 10:28:09 AM, you wrote:

> This function was actually just for debugging. I didn't include it in by
> default since I don't think it has much value to the end users..:)
> Did you find some real usage for it?

> --Jani

> On Sun, 2008-02-03 at 14:35 +, Marcus Boerger wrote:
>> helly Sun Feb  3 14:35:29 2008 UTC
>> 
>>   Modified files:  
>> /php-src/ext/standard basic_functions.c basic_functions.h 
>> /php-src/main php_ini.c php_ini.h 
>>   Log:
>>   - Rename dump_config_hash() to get_config_hash() as it doesn't dump
>>   
>> http://cvs.php.net/viewvc.cgi/php-src/ext/standard/basic_functions.c?r1=1.887&r2=1.888&diff_format=u
>> Index: php-src/ext/standard/basic_functions.c
>> diff -u php-src/ext/standard/basic_functions.c:1.887 
>> php-src/ext/standard/basic_functions.c:1.888
>> --- php-src/ext/standard/basic_functions.c:1.887  Sat Jan 19 19:23:25 
>> 2008
>> +++ php-src/ext/standard/basic_functions.cSun Feb  3 14:35:29 2008
>> @@ -17,7 +17,7 @@
>> +--+
>>   */
>>  
>> -/* $Id: basic_functions.c,v 1.887 2008/01/19 19:23:25 davidc Exp $ */
>> +/* $Id: basic_functions.c,v 1.888 2008/02/03 14:35:29 helly Exp $ */
>>  
>>  #include "php.h"
>>  #include "php_streams.h"
>> @@ -943,11 +943,9 @@
>>   ZEND_ARG_INFO(0, scanner_mode)
>>  ZEND_END_ARG_INFO()
>>  
>> -#if ZEND_DEBUG
>>  static
>> -ZEND_BEGIN_ARG_INFO(arginfo_dump_config_hash, 0)
>> +ZEND_BEGIN_ARG_INFO(arginfo_get_config_hash, 0)
>>  ZEND_END_ARG_INFO()
>> -#endif
>>  
>>  static
>>  ZEND_BEGIN_ARG_INFO_EX(arginfo_import_request_variables, 0, 0, 1)
>> @@ -3439,9 +3437,7 @@
>>   PHP_FE(connection_status,  
>>  
>> arginfo_connection_status)
>>   PHP_FE(ignore_user_abort,  
>>  
>> arginfo_ignore_user_abort)
>>   PHP_FE(parse_ini_file, 
>>  
>> arginfo_parse_ini_file)
>> -#if ZEND_DEBUG
>> - PHP_FE(dump_config_hash,   
>>  
>> arginfo_dump_config_hash)
>> -#endif
>> + PHP_FE(get_config_hash,
>>  
>> arginfo_get_config_hash)
>>   PHP_FE(is_uploaded_file,   
>>  
>> arginfo_is_uploaded_file)
>>   PHP_FE(move_uploaded_file, 
>>  
>> arginfo_move_uploaded_file)
>>  
>> @@ -6340,18 +6336,16 @@
>>  }
>>  /* }}} */
>>  
>> -#if ZEND_DEBUG
>> -/* {{{ proto void dump_config_hash(void)
>> +/* {{{ proto array get_config_hash(void)
>>   */
>> -PHP_FUNCTION(dump_config_hash)
>> +PHP_FUNCTION(get_config_hash)
>>  {
>> - HashTable hash = get_configuration_hash();
>> + HashTable *hash = php_ini_get_configuration_hash();
>>  
>>   array_init(return_value);
>> - zend_hash_apply_with_arguments(&hash, (apply_func_args_t) 
>> add_config_entry_cb, 1, return_value
>> TSRMLS_CC);
>> + zend_hash_apply_with_arguments(hash, (apply_func_args_t) 
>> add_config_entry_cb, 1, return_value
>> TSRMLS_CC);
>>  }
>>  /* }}} */
>> -#endif
>>  
>>  static int copy_request_variable(void *pDest, int num_args, va_list args, 
>> zend_hash_key *hash_key) /* {{{ */
>>  {
>> http://cvs.php.net/viewvc.cgi/php-src/ext/standard/basic_functions.h?r1=1.159&r2=1.160&diff_format=u
>> Index: php-src/ext/standard/basic_functions.h
>> diff -u php-src/ext/standard/basic_functions.h:1.159 
>> php-src/ext/standard/basic_functions.h:1.160
>> --- php-src/ext/standard/basic_functions.h:1.159  Mon Dec 31 07:12:15 
>> 2007
>> +++ php-src/ext/standard/basic_functions.hSun Feb  3 14:35:29 2008
>> @@ -17,7 +17,7 @@
>> +--+
>>  */
>>  
>> -/* $Id: basic_functions.h,v 1.159 2007/12/31 07:12:15 sebastian Exp $ */
>> +/* $Id: basic_functions.h,v 1.160 2008/02/03 14:35:29 helly Exp $ */
>>  
>>  #ifndef BASIC_FUNCTIONS_H
>>  #define BASIC_FUNCTIONS_H
>> @@ -125,9 +125,7 @@
>>  
>>  /* From the INI parser */
>>  PHP_FUNCTION(parse_ini_file);
>> -#if ZEND_DEBUG
>>  PHP_FUNCTION(dump_config_hash);
>> -#endif
>>  
>>  PHP_FUNCTION(str_rot13);
>>  PHP_FUNCTION(stream_get_filters);
>> http://cvs.php.net/viewvc.cgi/php-src/main/php_ini.c?r1=1.164&r2=1.165&diff_format=u
>> Index: php-src/main/php_ini.c
>> diff -u php-src/main/php_ini.c:1.164 php-src/main/php_ini.c:1.165
>> --- php-src/main/php_ini.c:1.164  Mon Dec 31 07:12:18 2007
>> +++ php-src/main/php_ini.cSun Feb  3 14:35:29 2008
>> @@ -16,7 +16,7 @@
>> +---

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

2008-02-04 Thread Marcus Boerger
Hello Jani,

  I am trying to add stuff to configuration hash prior to calling the ini
parser and then somehow allowing the parser for instance to act on the
version of php, whether it is a debug build, and whether it is a zts build.
That way I could have one config that loads the correct xdebug extension on
my development machine. I see two possibilities here:
a) zend_extension${php.debug?_debug:}${php.zts?_zts:} = 
/usr/src/${php.tag}/ext/xdebug/xdebug.so
b)
[IF ${php.debug} && ${php.zts}]
zend_extension_debug_zts = /usr/src/${php.tag}/ext/xdebug/xdebug.so
[ELIF ${php.debug}]
zend_extension_debug = /usr/src/${php.tag}/ext/xdebug/xdebug.so
[ELIF ${php.zts}]
zend_extension_zts = /usr/src/${php.tag}/ext/xdebug/xdebug.so
[ELSE]
zend_extension_zts = /usr/src/${php.tag}/ext/xdebug/xdebug.so
[ENDIF]

Monday, February 4, 2008, 11:54:00 AM, you wrote:

> Like what stuff? :)

> --Jani

> On Mon, 2008-02-04 at 11:40 +0100, Marcus Boerger wrote:
>> Hello Jani,
>> 
>>   for the moment probably only ofr me. But I am working on more stuff.
>> 
>> marcus
>> 
>> Monday, February 4, 2008, 10:28:09 AM, you wrote:
>> 
>> > This function was actually just for debugging. I didn't include it in by
>> > default since I don't think it has much value to the end users..:)
>> > Did you find some real usage for it?
>> 
>> > --Jani
>> 
>> > On Sun, 2008-02-03 at 14:35 +, Marcus Boerger wrote:
>> >> helly Sun Feb  3 14:35:29 2008 UTC
>> >> 
>> >>   Modified files:  
>> >> /php-src/ext/standard basic_functions.c basic_functions.h 
>> >> /php-src/main php_ini.c php_ini.h 
>> >>   Log:
>> >>   - Rename dump_config_hash() to get_config_hash() as it doesn't dump
>> >>   
>> >> http://cvs.php.net/viewvc.cgi/php-src/ext/standard/basic_functions.c?r1=1.887&r2=1.888&diff_format=u
>> >> Index: php-src/ext/standard/basic_functions.c
>> >> diff -u php-src/ext/standard/basic_functions.c:1.887 
>> >> php-src/ext/standard/basic_functions.c:1.888
>> >> --- php-src/ext/standard/basic_functions.c:1.887  Sat Jan 19 19:23:25 
>> >> 2008
>> >> +++ php-src/ext/standard/basic_functions.cSun Feb  3 14:35:29 2008
>> >> @@ -17,7 +17,7 @@
>> >> 
>> >> +--+
>> >>   */
>> >>  
>> >> -/* $Id: basic_functions.c,v 1.887 2008/01/19 19:23:25 davidc Exp $ */
>> >> +/* $Id: basic_functions.c,v 1.888 2008/02/03 14:35:29 helly Exp $ */
>> >>  
>> >>  #include "php.h"
>> >>  #include "php_streams.h"
>> >> @@ -943,11 +943,9 @@
>> >>   ZEND_ARG_INFO(0, scanner_mode)
>> >>  ZEND_END_ARG_INFO()
>> >>  
>> >> -#if ZEND_DEBUG
>> >>  static
>> >> -ZEND_BEGIN_ARG_INFO(arginfo_dump_config_hash, 0)
>> >> +ZEND_BEGIN_ARG_INFO(arginfo_get_config_hash, 0)
>> >>  ZEND_END_ARG_INFO()
>> >> -#endif
>> >>  
>> >>  static
>> >>  ZEND_BEGIN_ARG_INFO_EX(arginfo_import_request_variables, 0, 0, 1)
>> >> @@ -3439,9 +3437,7 @@
>> >>   PHP_FE(connection_status,   
>> >> 
>> >> arginfo_connection_status)
>> >>   PHP_FE(ignore_user_abort,   
>> >> 
>> >> arginfo_ignore_user_abort)
>> >>   PHP_FE(parse_ini_file,  
>> >> 
>> >> arginfo_parse_ini_file)
>> >> -#if ZEND_DEBUG
>> >> - PHP_FE(dump_config_hash,
>> >> 
>> >> arginfo_dump_config_hash)
>> >> -#endif
>> >> + PHP_FE(get_config_hash, 
>> >> 
>> >> arginfo_get_config_hash)
>> >>   PHP_FE(is_uploaded_file,
>> >> 
>> >> arginfo_is_uploaded_file)
>> >>   PHP_FE(move_uploaded_file,  
>> >> 
>> >> arginfo_move_uploaded_file)
>> >>  
>> >> @@ -6340,18 +6336,16 @@
>> >>  }
>> >>  /* }}} */
>> >>  
>> >> -#if ZEND_DEBUG
>> >> -/* {{{ proto void dump_config_hash(void)
>> >> +/* {{{ proto array get_config_hash(void)
>> >>   */
>> >> -PHP_FUNCTION(dump_config_hash)
>> >> +PHP_FUNCTION(get_config_hash)
>> >>  {
>> >> - HashTable hash = get_configuration_hash();
>> >> + HashTable *hash = php_ini_get_configuration_hash();
>> >>  
>> >>   array_init(return_value);
>> >> - zend_hash_apply_with_arguments(&hash, (apply_func_args_t) 
>> >> add_config_entry_cb, 1, return_value
>> >> TSRMLS_CC);
>> >> + zend_hash_apply_with_arguments(hash, (apply_func_args_t) 
>> >> add_config_entry_cb, 1, return_value
>> >> TSRMLS_CC);
>> >>  }
>> >>  /* }}} */
>> >> -#endif
>> >>  
>> >>  static int copy_request_variable(void *pDest, int num_args, va_list 
>> >> args, zend_hash_key *hash_key) /*
>> {{{ */
>> >>  {
>> >> http://cvs.php.net/viewvc.cgi/php-src/ext/standard/basic_functions.h?r1=1.159&r2=1.16

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

2008-02-04 Thread Marcus Boerger
Hello Jani,

  I did some experiments with b) and I would indeed ignore everything
that is configured out. I'll send you a patch as soon as I have somethign
that works. For getting the variables into the configuratrion hash prior to
parsing the INI I can send you the patch tonight if you care how I did that
part.

marcus

Monday, February 4, 2008, 12:43:18 PM, you wrote:

> a) requires that certain constants are defined prior to parse happens
> (I have patch for that waiting for commit already)

> b) Also requires the patch for constants but also a lot more
> modifications to the parser. I've been working on adding the if..else
> stuff but haven't had much time lately.

> It would be neat to have both a) and b). But the syntax for b)
> should be something else. And it should be parse-time thing, not execute
> time. ie. The scanner/parser should only add the "true" block into
> config hash. I had this syntax in mind:

> #if expr
> #elseif expr
> #endif

> Similar syntax with CPP.. :)

> --Jani


> On Mon, 2008-02-04 at 12:27 +0100, Marcus Boerger wrote:
>> Hello Jani,
>> 
>>   I am trying to add stuff to configuration hash prior to calling the ini
>> parser and then somehow allowing the parser for instance to act on the
>> version of php, whether it is a debug build, and whether it is a zts build.
>> That way I could have one config that loads the correct xdebug extension on
>> my development machine. I see two possibilities here:
>> a) zend_extension${php.debug?_debug:}${php.zts?_zts:} = 
>> /usr/src/${php.tag}/ext/xdebug/xdebug.so
>> b)
>> [IF ${php.debug} && ${php.zts}]
>> zend_extension_debug_zts = /usr/src/${php.tag}/ext/xdebug/xdebug.so
>> [ELIF ${php.debug}]
>> zend_extension_debug = /usr/src/${php.tag}/ext/xdebug/xdebug.so
>> [ELIF ${php.zts}]
>> zend_extension_zts = /usr/src/${php.tag}/ext/xdebug/xdebug.so
>> [ELSE]
>> zend_extension_zts = /usr/src/${php.tag}/ext/xdebug/xdebug.so
>> [ENDIF]
>> 
>> Monday, February 4, 2008, 11:54:00 AM, you wrote:
>> 
>> > Like what stuff? :)
>> 
>> > --Jani
>> 
>> > On Mon, 2008-02-04 at 11:40 +0100, Marcus Boerger wrote:
>> >> Hello Jani,
>> >> 
>> >>   for the moment probably only ofr me. But I am working on more stuff.
>> >> 
>> >> marcus
>> >> 
>> >> Monday, February 4, 2008, 10:28:09 AM, you wrote:
>> >> 
>> >> > This function was actually just for debugging. I didn't include it in by
>> >> > default since I don't think it has much value to the end users..:)
>> >> > Did you find some real usage for it?
>> >> 
>> >> > --Jani
>> >> 
>> >> > On Sun, 2008-02-03 at 14:35 +, Marcus Boerger wrote:
>> >> >> helly Sun Feb  3 14:35:29 2008 UTC
>> >> >> 
>> >> >>   Modified files:  
>> >> >> /php-src/ext/standard basic_functions.c basic_functions.h 
>> >> >> /php-src/main php_ini.c php_ini.h 
>> >> >>   Log:
>> >> >>   - Rename dump_config_hash() to get_config_hash() as it doesn't dump
>> >> >>   
>> >> >> http://cvs.php.net/viewvc.cgi/php-src/ext/standard/basic_functions.c?r1=1.887&r2=1.888&diff_format=u
>> >> >> Index: php-src/ext/standard/basic_functions.c
>> >> >> diff -u php-src/ext/standard/basic_functions.c:1.887 
>> >> >> php-src/ext/standard/basic_functions.c:1.888
>> >> >> --- php-src/ext/standard/basic_functions.c:1.887  Sat Jan 19 
>> >> >> 19:23:25 2008
>> >> >> +++ php-src/ext/standard/basic_functions.cSun Feb  3 14:35:29 2008
>> >> >> @@ -17,7 +17,7 @@
>> >> >> 
>> >> >> +--+
>> >> >>   */
>> >> >>  
>> >> >> -/* $Id: basic_functions.c,v 1.887 2008/01/19 19:23:25 davidc Exp $ */
>> >> >> +/* $Id: basic_functions.c,v 1.888 2008/02/03 14:35:29 helly Exp $ */
>> >> >>  
>> >> >>  #include "php.h"
>> >> >>  #include "php_streams.h"
>> >> >> @@ -943,11 +943,9 @@
>> >> >>   ZEND_ARG_INFO(0, scanner_mode)
>> >> >>  ZEND_END_ARG_INFO()
>> >> >>  
>> >> >> -#if ZEND_DEBUG
>> >> >>  static
>> >> >> -ZEND_BEGIN_ARG_INFO(arginfo_dump_config_hash, 0)
>> >> >> +ZEND_BEGIN_ARG_INFO(arginfo_get_config_hash, 0)
>> >> >>  ZEND_END_ARG_INFO()
>> >> >> -#endif
>> >> >>  
>> >> >>  static
>> >> >>  ZEND_BEGIN_ARG_INFO_EX(arginfo_import_request_variables, 0, 0, 1)
>> >> >> @@ -3439,9 +3437,7 @@
>> >> >>   PHP_FE(connection_status,
>> >> >>  
>> >> >> arginfo_connection_status)
>> >> >>   PHP_FE(ignore_user_abort,
>> >> >>  
>> >> >> arginfo_ignore_user_abort)
>> >> >>   PHP_FE(parse_ini_file,   
>> >> >>  
>> >> >> arginfo_parse_ini_file)
>> >> >> -#if ZEND_DEBUG
>> >> >> - PHP_FE(dump_config_hash, 
>> >> >>  
>> >> >> arginfo_dump_config_hash)
>> >> >> -#endif
>> >> >> + PHP_FE(get_config_hash,  
>> >> >> 

[PHP-CVS] cvs: CVSROOT / avail

2008-02-04 Thread Marcus Boerger
helly   Mon Feb  4 14:24:42 2008 UTC

  Modified files:  
/CVSROOTavail 
  Log:
  - Reorder and add felipe as engine test writer
  
http://cvs.php.net/viewvc.cgi/CVSROOT/avail?r1=1.1355&r2=1.1356&diff_format=u
Index: CVSROOT/avail
diff -u CVSROOT/avail:1.1355 CVSROOT/avail:1.1356
--- CVSROOT/avail:1.1355Fri Feb  1 13:14:25 2008
+++ CVSROOT/avail   Mon Feb  4 14:24:42 2008
@@ -19,6 +19,9 @@
 
 
avail|dharmap,kraghuba,stevseea,colder,lwe,auroraeosrose,mike,rolland,cawa,msisolak,alan_k,rrichards,tal,mfischer,fmk,hirokawa,jah,eschmid,dbeu,sebastian,samjam,avsm,ronabob,derick,sterling,venaas,stas,hholzgra,cmv,phildriscoll,jmoore,andre,jani,sr,david,jdonagher,chagenbu,jon,elixer,joosters,jason,mysql,kalowsky,opaquedave,steinm,phanto,gluke,svanegmond,rjs,vlad,jimjag,emile,wez,sasha,camber,ohrn,romolo,martin,lurcher,wsanchez,dreid,bmcadams,swm,zhang,kevin,joey,entity,cardinal,coar,jflemer,raphael,danda,rbb,mboeren,dougm,edink,alexwaugh,bernd,zak,sesser,yohgaki,imajes,markonen,dickmeiss,helly,sander,jan,kir,aaron,jwoolley,pbannister,rvenkat,dali,rodif_bl,hyanantha,witten,georg,msopacua,mpdoremus,fujimoto,iliaa,chregu,azzit,gschlossnagle,andrey,dan,moriyoshi,dviner,bfrance,flex,iwakiri,john,harrie,pollita,ianh,k.schroeder,dcowgill,jerenkrantz,jay,ddhill,jorton,thetaphi,abies,vincent,goba,dmitry,pajoye,shie,rafi,magnus,tony2001,johannes,dbs,skoduru,nrathna,jesus,gopalv,bjor!
 
i,nlopess,wrowe,shire,zoe,scottmac,t2man,dsp,davidw,ab5602,nicholsr,lsmith,cellog,davidc,felipe,robinf,jmessa|phpfi,php3,php-src,pecl,non-pecl,spl,phpdoc,phpdoc-ar,phpdoc-bg,phpdoc-cs,phpdoc-da,phpdoc-de,phpdoc-el,phpdoc-es,phpdoc-fa_IR,phpdoc-fi,phpdoc-fr,phpdoc-he,phpdoc-hk,phpdoc-hu,phpdoc-id,phpdoc-it,phpdoc-ja,phpdoc-kr,phpdoc-lt,phpdoc-nl,phpdoc-pl,phpdoc-pt_BR,phpdoc-pt,phpdoc-ro,phpdoc-ru,phpdoc-sk,phpdoc-sl,phpdoc-sv,phpdoc-tr,phpdoc-tw,phpdoc-zh,phpdoc-ca,phpdoc-no
 
+# Some people have access to tests in the Engine
+avail|magnus,michael,zoe,robinf,jmessa,felipe|Zend/tests,ZendEngine2/tests
+
 # fastcgi implementation for IIS
 avail|shane,wez,edink|fastcgi-isapi
 
@@ -27,7 +30,6 @@
 
 # Limited group of people with ZendAPI write access
 # (the contents now reside in the phpdoc module)
-
 avail|goba|ZendAPI
 
 # The Livedocs developers
@@ -37,9 +39,8 @@
 # The PhD (DocBook build system) lead developers
 avail|bjori,gwynne|phd
 
-# People who work on the Engine
+# People who work on the Engine - not people with just tests access
 
avail|andi,zeev,andrei,stas,sterling,sascha,derick,sebastian,phanto,jani,hirokawa,fujimoto,rvenkat,sesser,kalowsky,iliaa,hyanantha,georg,wez,edink,helly,hholzgra,imajes,gschlossnagle,moriyoshi,dmitry,jon,pollita,tony2001,johannes,bjori,davidw,nicholsr,wharmby|Zend,ZendEngine2,TSRM
-avail|zoe|ZendEngine2/tests
 
 # The PHP Documentation Group maintains the documentation and its
 # translations.
@@ -247,7 +248,6 @@
 avail|simenec,ttk|pecl/maxdb,phpdoc/en/reference
 avail|ksadlocha|pecl/simplesql
 avail|uw|pecl/maxdb,php-src/ext/mysqli,php-src/ext/mysql,phpdoc
-avail|magnus,michael|Zend/tests,ZendEngine2/tests
 avail|michael|php-src/tests
 avail|blindman|pecl/colorer
 avail|mike|pecl/http

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



[PHP-CVS] cvs: php-src /ext/spl/tests bug38325.phpt /ext/sqlite/tests sqlite_oo_030.phpt /ext/standard/tests/array array_filter.phpt array_filter_error.phpt array_filter_variation2.phpt array_filter

2008-02-04 Thread Felipe Pena
felipe  Mon Feb  4 15:22:09 2008 UTC

  Modified files:  
/php-src/ext/standard/tests/array   array_filter_error.phpt 
array_filter_variation2.phpt 
array_filter_variation9.phpt 
array_map_object1.phpt 
array_intersect_variation9.phpt 
array_filter.phpt 
/php-src/ext/standard/tests/assert  assert_variation.phpt 
/php-src/ext/standard/tests/general_functions   bug40398.phpt 
/php-src/ext/sqlite/tests   sqlite_oo_030.phpt 
/php-src/ext/spl/tests  bug38325.phpt 
  Log:
  Fix tests (new error message)
  http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/array/array_filter_error.phpt?r1=1.2&r2=1.3&diff_format=u
Index: php-src/ext/standard/tests/array/array_filter_error.phpt
diff -u php-src/ext/standard/tests/array/array_filter_error.phpt:1.2 
php-src/ext/standard/tests/array/array_filter_error.phpt:1.3
--- php-src/ext/standard/tests/array/array_filter_error.phpt:1.2Fri Oct 
19 18:22:55 2007
+++ php-src/ext/standard/tests/array/array_filter_error.phptMon Feb  4 
15:22:08 2008
@@ -45,7 +45,7 @@
 Warning: array_filter() expects at most 2 parameters, 3 given in %s on line %d
 NULL
 -- Testing array_filter() function with incorrect callback --
-Warning: array_filter() expects parameter 2 to be valid callback, string given 
in %s on line %d
+Warning: array_filter() expects parameter 2 to be a valid callback, function 
'even' not found or invalid function name in %s on line %d
 NULL
 Done
 --UEXPECTF--
@@ -57,6 +57,6 @@
 Warning: array_filter() expects at most 2 parameters, 3 given in %s on line %d
 NULL
 -- Testing array_filter() function with incorrect callback --
-Warning: array_filter() expects parameter 2 to be valid callback, Unicode 
string given in %s on line %d
+Warning: array_filter() expects parameter 2 to be a valid callback, function 
'even' not found or invalid function name in %s on line %d
 NULL
 Done
http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/array/array_filter_variation2.phpt?r1=1.2&r2=1.3&diff_format=u
Index: php-src/ext/standard/tests/array/array_filter_variation2.phpt
diff -u php-src/ext/standard/tests/array/array_filter_variation2.phpt:1.2 
php-src/ext/standard/tests/array/array_filter_variation2.phpt:1.3
--- php-src/ext/standard/tests/array/array_filter_variation2.phpt:1.2   Fri Oct 
19 18:22:55 2007
+++ php-src/ext/standard/tests/array/array_filter_variation2.phpt   Mon Feb 
 4 15:22:08 2008
@@ -98,174 +98,174 @@
 --EXPECTF--
 *** Testing array_filter() : usage variations - unexpected values for 
'callback' function***
 -- Iteration 1 --
-Warning: array_filter() expects parameter 2 to be valid callback, integer 
given in %s on line %d
+Warning: array_filter() expects parameter 2 to be a valid callback, no array 
or string given in %s on line %d
 NULL
 -- Iteration 2 --
-Warning: array_filter() expects parameter 2 to be valid callback, integer 
given in %s on line %d
+Warning: array_filter() expects parameter 2 to be a valid callback, no array 
or string given in %s on line %d
 NULL
 -- Iteration 3 --
-Warning: array_filter() expects parameter 2 to be valid callback, integer 
given in %s on line %d
+Warning: array_filter() expects parameter 2 to be a valid callback, no array 
or string given in %s on line %d
 NULL
 -- Iteration 4 --
-Warning: array_filter() expects parameter 2 to be valid callback, integer 
given in %s on line %d
+Warning: array_filter() expects parameter 2 to be a valid callback, no array 
or string given in %s on line %d
 NULL
 -- Iteration 5 --
-Warning: array_filter() expects parameter 2 to be valid callback, double given 
in %s on line %d
+Warning: array_filter() expects parameter 2 to be a valid callback, no array 
or string given in %s on line %d
 NULL
 -- Iteration 6 --
-Warning: array_filter() expects parameter 2 to be valid callback, double given 
in %s on line %d
+Warning: array_filter() expects parameter 2 to be a valid callback, no array 
or string given in %s on line %d
 NULL
 -- Iteration 7 --
-Warning: array_filter() expects parameter 2 to be valid callback, double given 
in %s on line %d
+Warning: array_filter() expects parameter 2 to be a valid callback, no array 
or string given in %s on line %d
 NULL
 -- Iteration 8 --
-Warning: array_filter() expects parameter 2 to be valid callback, double given 
in %s on line %d
+Warning: array_filter() expects parameter 2 to be a valid callback, no array 
or string given in %s on line %d
 NULL
 -- Iteration 9 --
-Warning: array_filter() expects parameter 2 to be valid callback, double given 
in %s on line %d
+Warning: array_filter() expects parameter 2 to be a valid callback, no array 
or string given in %s on line %d
 NULL
 -- Iteration 10 --
-Warning: array_filter() expects parameter 2 to be valid callback, array given 
in %s on line %d
+War

[PHP-CVS] cvs: php-src(PHP_5_2) /ext/dom attr.c cdatasection.c characterdata.c comment.c document.c documentfragment.c domconfiguration.c domerrorhandler.c domimplementation.c domimplementationlist.c

2008-02-04 Thread Sebastian Bergmann
sebastian   Mon Feb  4 15:23:11 2008 UTC

  Modified files:  (Branch: PHP_5_2)
/php-src/ext/domattr.c cdatasection.c characterdata.c comment.c 
document.c documentfragment.c domconfiguration.c 
domerrorhandler.c domimplementation.c 
domimplementationlist.c domimplementationsource.c 
domstringlist.c element.c entityreference.c 
namednodemap.c namelist.c nodelist.c 
processinginstruction.c string_extend.c text.c 
  Log:
  MFH: Add missing Reflection API metadata for DOM classes.
  http://cvs.php.net/viewvc.cgi/php-src/ext/dom/attr.c?r1=1.18.2.2.2.3&r2=1.18.2.2.2.4&diff_format=u
Index: php-src/ext/dom/attr.c
diff -u php-src/ext/dom/attr.c:1.18.2.2.2.3 php-src/ext/dom/attr.c:1.18.2.2.2.4
--- php-src/ext/dom/attr.c:1.18.2.2.2.3 Mon Dec 31 07:20:05 2007
+++ php-src/ext/dom/attr.c  Mon Feb  4 15:23:10 2008
@@ -17,7 +17,7 @@
+--+
 */
 
-/* $Id: attr.c,v 1.18.2.2.2.3 2007/12/31 07:20:05 sebastian Exp $ */
+/* $Id: attr.c,v 1.18.2.2.2.4 2008/02/04 15:23:10 sebastian Exp $ */
 
 #ifdef HAVE_CONFIG_H
 #include "config.h"
@@ -30,6 +30,18 @@
 #include "php_dom.h"
 
 
+/* {{{ arginfo */
+static
+ZEND_BEGIN_ARG_INFO_EX(arginfo_dom_attr_is_id, 0, 0, 0)
+ZEND_END_ARG_INFO();
+
+static
+ZEND_BEGIN_ARG_INFO_EX(arginfo_dom_attr_construct, 0, 0, 1)
+   ZEND_ARG_INFO(0, name)
+   ZEND_ARG_INFO(0, value)
+ZEND_END_ARG_INFO();
+/* }}} */
+
 /*
 * class DOMAttr extends DOMNode 
 *
@@ -38,8 +50,8 @@
 */
 
 zend_function_entry php_dom_attr_class_functions[] = {
-   PHP_FALIAS(isId, dom_attr_is_id, NULL)
-   PHP_ME(domattr, __construct, NULL, ZEND_ACC_PUBLIC)
+   PHP_FALIAS(isId, dom_attr_is_id, arginfo_dom_attr_is_id)
+   PHP_ME(domattr, __construct, arginfo_dom_attr_construct, 
ZEND_ACC_PUBLIC)
{NULL, NULL, NULL}
 };
 
http://cvs.php.net/viewvc.cgi/php-src/ext/dom/cdatasection.c?r1=1.11.2.1.2.2&r2=1.11.2.1.2.3&diff_format=u
Index: php-src/ext/dom/cdatasection.c
diff -u php-src/ext/dom/cdatasection.c:1.11.2.1.2.2 
php-src/ext/dom/cdatasection.c:1.11.2.1.2.3
--- php-src/ext/dom/cdatasection.c:1.11.2.1.2.2 Mon Dec 31 07:20:05 2007
+++ php-src/ext/dom/cdatasection.c  Mon Feb  4 15:23:10 2008
@@ -17,7 +17,7 @@
+--+
 */
 
-/* $Id: cdatasection.c,v 1.11.2.1.2.2 2007/12/31 07:20:05 sebastian Exp $ */
+/* $Id: cdatasection.c,v 1.11.2.1.2.3 2008/02/04 15:23:10 sebastian Exp $ */
 
 #ifdef HAVE_CONFIG_H
 #include "config.h"
@@ -28,6 +28,13 @@
 #include "php_dom.h"
 
 
+/* {{{ arginfo */
+static
+ZEND_BEGIN_ARG_INFO_EX(arginfo_dom_cdatasection_construct, 0, 0, 1)
+   ZEND_ARG_INFO(0, value)
+ZEND_END_ARG_INFO();
+/* }}} */
+
 /*
 * class DOMCdataSection extends DOMText 
 *
@@ -36,7 +43,7 @@
 */
 
 zend_function_entry php_dom_cdatasection_class_functions[] = {
-   PHP_ME(domcdatasection, __construct, NULL, ZEND_ACC_PUBLIC)
+   PHP_ME(domcdatasection, __construct, 
arginfo_dom_cdatasection_construct, ZEND_ACC_PUBLIC)
{NULL, NULL, NULL}
 };
 
http://cvs.php.net/viewvc.cgi/php-src/ext/dom/characterdata.c?r1=1.15.2.1.2.3&r2=1.15.2.1.2.4&diff_format=u
Index: php-src/ext/dom/characterdata.c
diff -u php-src/ext/dom/characterdata.c:1.15.2.1.2.3 
php-src/ext/dom/characterdata.c:1.15.2.1.2.4
--- php-src/ext/dom/characterdata.c:1.15.2.1.2.3Mon Dec 31 07:20:05 2007
+++ php-src/ext/dom/characterdata.c Mon Feb  4 15:23:10 2008
@@ -17,7 +17,7 @@
+--+
 */
 
-/* $Id: characterdata.c,v 1.15.2.1.2.3 2007/12/31 07:20:05 sebastian Exp $ */
+/* $Id: characterdata.c,v 1.15.2.1.2.4 2008/02/04 15:23:10 sebastian Exp $ */
 
 #ifdef HAVE_CONFIG_H
 #include "config.h"
@@ -28,6 +28,38 @@
 #include "php_dom.h"
 
 
+/* {{{ arginfo */
+static
+ZEND_BEGIN_ARG_INFO_EX(arginfo_dom_characterdata_substring_data, 0, 0, 2)
+   ZEND_ARG_INFO(0, offset)
+   ZEND_ARG_INFO(0, count)
+ZEND_END_ARG_INFO();
+
+static
+ZEND_BEGIN_ARG_INFO_EX(arginfo_dom_characterdata_append_data, 0, 0, 1)
+   ZEND_ARG_INFO(0, arg)
+ZEND_END_ARG_INFO();
+
+static
+ZEND_BEGIN_ARG_INFO_EX(arginfo_dom_characterdata_insert_data, 0, 0, 2)
+   ZEND_ARG_INFO(0, offset)
+   ZEND_ARG_INFO(0, arg)
+ZEND_END_ARG_INFO();
+
+static
+ZEND_BEGIN_ARG_INFO_EX(arginfo_dom_characterdata_delete_data, 0, 0, 2)
+   ZEND_ARG_INFO(0, offset)
+   ZEND_ARG_INFO(0, count)
+ZEND_END_ARG_INFO();
+
+static
+ZEND_BEGIN_ARG_INFO_EX(arginfo_dom_characterdata_replace_data, 0, 0, 3)
+   ZEND_ARG_INFO(0, offset)
+   ZEND_ARG_INFO(0, count)
+   ZEND_ARG_INFO(0, arg)
+ZEND_END_ARG_INFO();
+/* }}} */
+
 /*
 * class DOMCharacterData extends DOMNode 
 *
@@ -36,11 +68,11 @@
 */
 
 zend_function_entry php_dom_characterdata_class_functions[] = {
-   PHP_

[PHP-CVS] cvs: php-src /ext/dom attr.c cdatasection.c characterdata.c comment.c document.c documentfragment.c domconfiguration.c domerrorhandler.c domimplementation.c domimplementationlist.c domimplem

2008-02-04 Thread Sebastian Bergmann
sebastian   Mon Feb  4 15:22:40 2008 UTC

  Modified files:  
/php-src/ext/domattr.c cdatasection.c characterdata.c comment.c 
document.c documentfragment.c domconfiguration.c 
domerrorhandler.c domimplementation.c 
domimplementationlist.c domimplementationsource.c 
domstringlist.c element.c entityreference.c 
namednodemap.c namelist.c nodelist.c 
processinginstruction.c string_extend.c text.c 
  Log:
  Add missing Reflection API metadata for DOM classes.
  http://cvs.php.net/viewvc.cgi/php-src/ext/dom/attr.c?r1=1.29&r2=1.30&diff_format=u
Index: php-src/ext/dom/attr.c
diff -u php-src/ext/dom/attr.c:1.29 php-src/ext/dom/attr.c:1.30
--- php-src/ext/dom/attr.c:1.29 Mon Dec 31 07:12:08 2007
+++ php-src/ext/dom/attr.c  Mon Feb  4 15:22:40 2008
@@ -17,7 +17,7 @@
+--+
 */
 
-/* $Id: attr.c,v 1.29 2007/12/31 07:12:08 sebastian Exp $ */
+/* $Id: attr.c,v 1.30 2008/02/04 15:22:40 sebastian Exp $ */
 
 #ifdef HAVE_CONFIG_H
 #include "config.h"
@@ -30,6 +30,18 @@
 #include "php_dom.h"
 
 
+/* {{{ arginfo */
+static
+ZEND_BEGIN_ARG_INFO_EX(arginfo_dom_attr_is_id, 0, 0, 0)
+ZEND_END_ARG_INFO();
+
+static
+ZEND_BEGIN_ARG_INFO_EX(arginfo_dom_attr_construct, 0, 0, 1)
+   ZEND_ARG_INFO(0, name)
+   ZEND_ARG_INFO(0, value)
+ZEND_END_ARG_INFO();
+/* }}} */
+
 /*
 * class DOMAttr extends DOMNode 
 *
@@ -38,8 +50,8 @@
 */
 
 const zend_function_entry php_dom_attr_class_functions[] = {
-   PHP_FALIAS(isId, dom_attr_is_id, NULL)
-   PHP_ME(domattr, __construct, NULL, ZEND_ACC_PUBLIC)
+   PHP_FALIAS(isId, dom_attr_is_id, arginfo_dom_attr_is_id)
+   PHP_ME(domattr, __construct, arginfo_dom_attr_construct, 
ZEND_ACC_PUBLIC)
{NULL, NULL, NULL}
 };
 
http://cvs.php.net/viewvc.cgi/php-src/ext/dom/cdatasection.c?r1=1.19&r2=1.20&diff_format=u
Index: php-src/ext/dom/cdatasection.c
diff -u php-src/ext/dom/cdatasection.c:1.19 php-src/ext/dom/cdatasection.c:1.20
--- php-src/ext/dom/cdatasection.c:1.19 Mon Dec 31 07:12:08 2007
+++ php-src/ext/dom/cdatasection.c  Mon Feb  4 15:22:40 2008
@@ -17,7 +17,7 @@
+--+
 */
 
-/* $Id: cdatasection.c,v 1.19 2007/12/31 07:12:08 sebastian Exp $ */
+/* $Id: cdatasection.c,v 1.20 2008/02/04 15:22:40 sebastian Exp $ */
 
 #ifdef HAVE_CONFIG_H
 #include "config.h"
@@ -28,6 +28,13 @@
 #include "php_dom.h"
 
 
+/* {{{ arginfo */
+static
+ZEND_BEGIN_ARG_INFO_EX(arginfo_dom_cdatasection_construct, 0, 0, 1)
+   ZEND_ARG_INFO(0, value)
+ZEND_END_ARG_INFO();
+/* }}} */
+
 /*
 * class DOMCdataSection extends DOMText 
 *
@@ -36,7 +43,7 @@
 */
 
 const zend_function_entry php_dom_cdatasection_class_functions[] = {
-   PHP_ME(domcdatasection, __construct, NULL, ZEND_ACC_PUBLIC)
+   PHP_ME(domcdatasection, __construct, 
arginfo_dom_cdatasection_construct, ZEND_ACC_PUBLIC)
{NULL, NULL, NULL}
 };
 
http://cvs.php.net/viewvc.cgi/php-src/ext/dom/characterdata.c?r1=1.25&r2=1.26&diff_format=u
Index: php-src/ext/dom/characterdata.c
diff -u php-src/ext/dom/characterdata.c:1.25 
php-src/ext/dom/characterdata.c:1.26
--- php-src/ext/dom/characterdata.c:1.25Mon Dec 31 07:12:08 2007
+++ php-src/ext/dom/characterdata.c Mon Feb  4 15:22:40 2008
@@ -17,7 +17,7 @@
+--+
 */
 
-/* $Id: characterdata.c,v 1.25 2007/12/31 07:12:08 sebastian Exp $ */
+/* $Id: characterdata.c,v 1.26 2008/02/04 15:22:40 sebastian Exp $ */
 
 #ifdef HAVE_CONFIG_H
 #include "config.h"
@@ -28,6 +28,38 @@
 #include "php_dom.h"
 
 
+/* {{{ arginfo */
+static
+ZEND_BEGIN_ARG_INFO_EX(arginfo_dom_characterdata_substring_data, 0, 0, 2)
+   ZEND_ARG_INFO(0, offset)
+   ZEND_ARG_INFO(0, count)
+ZEND_END_ARG_INFO();
+
+static
+ZEND_BEGIN_ARG_INFO_EX(arginfo_dom_characterdata_append_data, 0, 0, 1)
+   ZEND_ARG_INFO(0, arg)
+ZEND_END_ARG_INFO();
+
+static
+ZEND_BEGIN_ARG_INFO_EX(arginfo_dom_characterdata_insert_data, 0, 0, 2)
+   ZEND_ARG_INFO(0, offset)
+   ZEND_ARG_INFO(0, arg)
+ZEND_END_ARG_INFO();
+
+static
+ZEND_BEGIN_ARG_INFO_EX(arginfo_dom_characterdata_delete_data, 0, 0, 2)
+   ZEND_ARG_INFO(0, offset)
+   ZEND_ARG_INFO(0, count)
+ZEND_END_ARG_INFO();
+
+static
+ZEND_BEGIN_ARG_INFO_EX(arginfo_dom_characterdata_replace_data, 0, 0, 3)
+   ZEND_ARG_INFO(0, offset)
+   ZEND_ARG_INFO(0, count)
+   ZEND_ARG_INFO(0, arg)
+ZEND_END_ARG_INFO();
+/* }}} */
+
 /*
 * class DOMCharacterData extends DOMNode 
 *
@@ -36,11 +68,11 @@
 */
 
 const zend_function_entry php_dom_characterdata_class_functions[] = {
-   PHP_FALIAS(substringData, dom_characterdata_substring_data, NULL)
-   PHP_FALIAS(appendData, dom_characterdata_append_data, NULL)
-   PHP_FALIAS(insertData, dom_characte

[PHP-CVS] cvs: php-src /ext/spl/tests spl_004.phpt spl_autoload_001.phpt spl_autoload_005.phpt spl_autoload_007.phpt spl_autoload_008.phpt

2008-02-04 Thread Felipe Pena
felipe  Mon Feb  4 14:02:01 2008 UTC

  Modified files:  
/php-src/ext/spl/tests  spl_autoload_001.phpt spl_autoload_005.phpt 
spl_autoload_007.phpt spl_autoload_008.phpt 
spl_004.phpt 
  Log:
  Fix tests (new error message)
  http://cvs.php.net/viewvc.cgi/php-src/ext/spl/tests/spl_autoload_001.phpt?r1=1.6&r2=1.7&diff_format=u
Index: php-src/ext/spl/tests/spl_autoload_001.phpt
diff -u php-src/ext/spl/tests/spl_autoload_001.phpt:1.6 
php-src/ext/spl/tests/spl_autoload_001.phpt:1.7
--- php-src/ext/spl/tests/spl_autoload_001.phpt:1.6 Wed Dec 20 22:08:51 2006
+++ php-src/ext/spl/tests/spl_autoload_001.phpt Mon Feb  4 14:02:01 2008
@@ -134,7 +134,7 @@
 %stestclass.class.inc
 bool(true)
 ===NOFUNCTION===
-Exception: Function 'unavailable_autoload_function' not found
+Exception: Function 'unavailable_autoload_function' not found, (function 
'unavailable_autoload_function' not found or invalid function name)
 ===DONE===
 --UEXPECTF--
 ===EMPTY===
@@ -165,5 +165,5 @@
 %stestclass.class.inc
 bool(true)
 ===NOFUNCTION===
-Exception: Function 'unavailable_autoload_function' not found
+Exception: Function 'unavailable_autoload_function' not found, (function 
'unavailable_autoload_function' not found or invalid function name)
 ===DONE===
http://cvs.php.net/viewvc.cgi/php-src/ext/spl/tests/spl_autoload_005.phpt?r1=1.2&r2=1.3&diff_format=u
Index: php-src/ext/spl/tests/spl_autoload_005.phpt
diff -u php-src/ext/spl/tests/spl_autoload_005.phpt:1.2 
php-src/ext/spl/tests/spl_autoload_005.phpt:1.3
--- php-src/ext/spl/tests/spl_autoload_005.phpt:1.2 Wed Dec 21 22:21:54 2005
+++ php-src/ext/spl/tests/spl_autoload_005.phpt Mon Feb  4 14:02:01 2008
@@ -50,7 +50,7 @@
 ===DONE===
 
 --EXPECTF--
-Exception: Passed array specifies a non static method but no object
+Exception: Passed array specifies a non static method but no object 
(non-static method MyAutoLoader::autoLoad() should not be called statically)
 MyAutoLoader::autoLoad(TestClass)
 MyAutoLoader::autoThrow(TestClass)
 Exception: Unavailable
http://cvs.php.net/viewvc.cgi/php-src/ext/spl/tests/spl_autoload_007.phpt?r1=1.4&r2=1.5&diff_format=u
Index: php-src/ext/spl/tests/spl_autoload_007.phpt
diff -u php-src/ext/spl/tests/spl_autoload_007.phpt:1.4 
php-src/ext/spl/tests/spl_autoload_007.phpt:1.5
--- php-src/ext/spl/tests/spl_autoload_007.phpt:1.4 Wed Feb 22 12:15:09 2006
+++ php-src/ext/spl/tests/spl_autoload_007.phpt Mon Feb  4 14:02:01 2008
@@ -59,16 +59,16 @@
 
 --EXPECTF--
 string(22) "MyAutoLoader::notExist"
-Function 'MyAutoLoader::notExist' not found
+Function 'MyAutoLoader::notExist' not found, (class 'MyAutoLoader' does not 
have a method 'notexist')
 
 string(22) "MyAutoLoader::noAccess"
-Function 'MyAutoLoader::noAccess' not callable
+Function 'MyAutoLoader::noAccess' not callable, (cannot access protected 
method MyAutoLoader::noAccess())
 
 string(22) "MyAutoLoader::autoLoad"
 ok
 
 string(22) "MyAutoLoader::dynaLoad"
-Function 'MyAutoLoader::dynaLoad' not callable
+Function 'MyAutoLoader::dynaLoad' not callable, (non-static method 
MyAutoLoader::dynaLoad() should not be called statically)
 
 array(2) {
   [0]=>
@@ -76,7 +76,7 @@
   [1]=>
   string(8) "notExist"
 }
-Passed array does not specify an existing static method
+Passed array does not specify an existing static method (class 'MyAutoLoader' 
does not have a method 'notexist')
 
 array(2) {
   [0]=>
@@ -84,7 +84,7 @@
   [1]=>
   string(8) "noAccess"
 }
-Passed array does not specify a callable static method
+Passed array does not specify a callable static method (cannot access 
protected method MyAutoLoader::noAccess())
 
 array(2) {
   [0]=>
@@ -100,7 +100,7 @@
   [1]=>
   string(8) "dynaLoad"
 }
-Passed array specifies a non static method but no object
+Passed array specifies a non static method but no object (non-static method 
MyAutoLoader::dynaLoad() should not be called statically)
 
 array(2) {
   [0]=>
@@ -109,7 +109,7 @@
   [1]=>
   string(8) "notExist"
 }
-Passed array does not specify an existing method
+Passed array does not specify an existing method (class 'MyAutoLoader' does 
not have a method 'notexist')
 
 array(2) {
   [0]=>
@@ -118,7 +118,7 @@
   [1]=>
   string(8) "noAccess"
 }
-Passed array does not specify a callable method
+Passed array does not specify a callable method (cannot access protected 
method MyAutoLoader::noAccess())
 
 array(2) {
   [0]=>
@@ -140,16 +140,16 @@
 ===DONE===
 --UEXPECTF--
 unicode(22) "MyAutoLoader::notExist"
-Function 'MyAutoLoader::notExist' not found
+Function 'MyAutoLoader::notExist' not found, (class 'MyAutoLoader' does not 
have a method 'notexist')
 
 unicode(22) "MyAutoLoader::noAccess"
-Function 'MyAutoLoader::noAccess' not callable
+Function 'MyAutoLoader::noAccess' not callable, (cannot access protected 
method MyAutoLoader::noAccess())
 
 unicode(22) "MyAutoLoader::autoLoad"
 ok
 
 unicode(22) "MyAutoLoader::dynaLoad"
-Function 'MyAutoLoader::

[PHP-CVS] cvs: php-src /ext/standard/tests/general_functions is_callable.phpt

2008-02-04 Thread Felipe Pena
felipe  Mon Feb  4 17:21:01 2008 UTC

  Modified files:  
/php-src/ext/standard/tests/general_functions   is_callable.phpt 
  Log:
  Fix error messages
  http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/general_functions/is_callable.phpt?r1=1.4&r2=1.5&diff_format=u
Index: php-src/ext/standard/tests/general_functions/is_callable.phpt
diff -u php-src/ext/standard/tests/general_functions/is_callable.phpt:1.4 
php-src/ext/standard/tests/general_functions/is_callable.phpt:1.5
--- php-src/ext/standard/tests/general_functions/is_callable.phpt:1.4   Tue Sep 
11 05:23:45 2007
+++ php-src/ext/standard/tests/general_functions/is_callable.phpt   Mon Feb 
 4 17:21:01 2008
@@ -479,15 +479,15 @@
 object_class::func
 -- Innerloop iteration 10 of Outerloop iteration 1 --
 
-Strict Standards: Non-static method object_class::foo1() cannot be called 
statically in %s on line %d
+Strict Standards: Non-static method object_class::foo1() should not be called 
statically in %s on line %d
 bool(true)
 bool(true)
 
-Strict Standards: Non-static method object_class::foo1() cannot be called 
statically in %s on line %d
+Strict Standards: Non-static method object_class::foo1() should not be called 
statically in %s on line %d
 bool(true)
 bool(true)
 
-Strict Standards: Non-static method object_class::foo1() cannot be called 
statically in %s on line %d
+Strict Standards: Non-static method object_class::foo1() should not be called 
statically in %s on line %d
 bool(true)
 object_class::foo1
 --- Outerloop iteration 2 ---
@@ -556,15 +556,15 @@
 no_member_class::func
 -- Innerloop iteration 10 of Outerloop iteration 2 --
 
-Strict Standards: Non-static method object_class::foo1() cannot be called 
statically in %s on line %d
+Strict Standards: Non-static method object_class::foo1() should not be called 
statically in %s on line %d
 bool(true)
 bool(true)
 
-Strict Standards: Non-static method object_class::foo1() cannot be called 
statically in %s on line %d
+Strict Standards: Non-static method object_class::foo1() should not be called 
statically in %s on line %d
 bool(true)
 bool(true)
 
-Strict Standards: Non-static method object_class::foo1() cannot be called 
statically in %s on line %d
+Strict Standards: Non-static method object_class::foo1() should not be called 
statically in %s on line %d
 bool(true)
 object_class::foo1
 --- Outerloop iteration 3 ---
@@ -633,15 +633,15 @@
 contains_object_class::func
 -- Innerloop iteration 10 of Outerloop iteration 3 --
 
-Strict Standards: Non-static method object_class::foo1() cannot be called 
statically in %s on line %d
+Strict Standards: Non-static method object_class::foo1() should not be called 
statically in %s on line %d
 bool(true)
 bool(true)
 
-Strict Standards: Non-static method object_class::foo1() cannot be called 
statically in %s on line %d
+Strict Standards: Non-static method object_class::foo1() should not be called 
statically in %s on line %d
 bool(true)
 bool(true)
 
-Strict Standards: Non-static method object_class::foo1() cannot be called 
statically in %s on line %d
+Strict Standards: Non-static method object_class::foo1() should not be called 
statically in %s on line %d
 bool(true)
 object_class::foo1
 --- Outerloop iteration 4 ---
@@ -710,15 +710,15 @@
 contains_object_class::func
 -- Innerloop iteration 10 of Outerloop iteration 4 --
 
-Strict Standards: Non-static method object_class::foo1() cannot be called 
statically in %s on line %d
+Strict Standards: Non-static method object_class::foo1() should not be called 
statically in %s on line %d
 bool(true)
 bool(true)
 
-Strict Standards: Non-static method object_class::foo1() cannot be called 
statically in %s on line %d
+Strict Standards: Non-static method object_class::foo1() should not be called 
statically in %s on line %d
 bool(true)
 bool(true)
 
-Strict Standards: Non-static method object_class::foo1() cannot be called 
statically in %s on line %d
+Strict Standards: Non-static method object_class::foo1() should not be called 
statically in %s on line %d
 bool(true)
 object_class::foo1
 --- Outerloop iteration 5 ---
@@ -787,15 +787,15 @@
 object_class::func
 -- Innerloop iteration 10 of Outerloop iteration 5 --
 
-Strict Standards: Non-static method object_class::foo1() cannot be called 
statically in %s on line %d
+Strict Standards: Non-static method object_class::foo1() should not be called 
statically in %s on line %d
 bool(true)
 bool(true)
 
-Strict Standards: Non-static method object_class::foo1() cannot be called 
statically in %s on line %d
+Strict Standards: Non-static method object_class::foo1() should not be called 
statically in %s on line %d
 bool(true)
 bool(true)
 
-Strict Standards: Non-static method object_class::foo1() cannot be called 
statically in %s on line %d
+Strict Standards: Non-static method object_class::foo1() should not be called 
statically in %s on line %d
 bool(true)
 object_class::foo1
 --- Outerloop iteration 6 ---
@@ -864,15 +864,15 @

[PHP-CVS] cvs: php-src(PHP_5_3) /ext/spl spl_directory.c

2008-02-04 Thread Marcus Boerger
helly   Mon Feb  4 17:19:07 2008 UTC

  Modified files:  (Branch: PHP_5_3)
/php-src/ext/splspl_directory.c 
  Log:
  - MFH Fix default flag value in contructor
  
http://cvs.php.net/viewvc.cgi/php-src/ext/spl/spl_directory.c?r1=1.45.2.27.2.23.2.12&r2=1.45.2.27.2.23.2.13&diff_format=u
Index: php-src/ext/spl/spl_directory.c
diff -u php-src/ext/spl/spl_directory.c:1.45.2.27.2.23.2.12 
php-src/ext/spl/spl_directory.c:1.45.2.27.2.23.2.13
--- php-src/ext/spl/spl_directory.c:1.45.2.27.2.23.2.12 Sat Feb  2 23:09:38 2008
+++ php-src/ext/spl/spl_directory.c Mon Feb  4 17:19:07 2008
@@ -16,7 +16,7 @@
+--+
  */
 
-/* $Id: spl_directory.c,v 1.45.2.27.2.23.2.12 2008/02/02 23:09:38 helly Exp $ 
*/
+/* $Id: spl_directory.c,v 1.45.2.27.2.23.2.13 2008/02/04 17:19:07 helly Exp $ 
*/
 
 #ifdef HAVE_CONFIG_H
 # include "config.h"
@@ -551,7 +551,7 @@
spl_filesystem_object *intern;
char *path;
int parsed, len;
-   long flags;
+   long flags = 0;
 
php_set_error_handling(EH_THROW, spl_ce_UnexpectedValueException 
TSRMLS_CC);
 
@@ -1148,7 +1148,7 @@
ZVAL_LONG(&zflags, intern->flags);
ZVAL_STRINGL(&zpath, intern->file_name, intern->file_name_len, 0);
 
-   spl_instantiate_arg_ex2(spl_ce_RecursiveDirectoryIterator, 
&return_value, 0, &zpath, &zflags TSRMLS_CC);
+   spl_instantiate_arg_ex2(Z_OBJCE_P(getThis()), &return_value, 0, &zpath, 
&zflags TSRMLS_CC);

subdir = 
(spl_filesystem_object*)zend_object_store_get_object(return_value TSRMLS_CC);
if (subdir) {

-- 
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/spl php_spl.c /ext/spl/tests dit_001.phpt spl_autoload_007.phpt

2008-02-04 Thread Marcus Boerger
helly   Mon Feb  4 17:07:07 2008 UTC

  Modified files:  (Branch: PHP_5_3)
/php-src/ext/splphp_spl.c 
/php-src/ext/spl/tests  dit_001.phpt spl_autoload_007.phpt 
  Log:
  - MFH Fix messages and tests
  
http://cvs.php.net/viewvc.cgi/php-src/ext/spl/php_spl.c?r1=1.52.2.28.2.17.2.11&r2=1.52.2.28.2.17.2.12&diff_format=u
Index: php-src/ext/spl/php_spl.c
diff -u php-src/ext/spl/php_spl.c:1.52.2.28.2.17.2.11 
php-src/ext/spl/php_spl.c:1.52.2.28.2.17.2.12
--- php-src/ext/spl/php_spl.c:1.52.2.28.2.17.2.11   Sat Feb  2 23:09:38 2008
+++ php-src/ext/spl/php_spl.c   Mon Feb  4 17:07:06 2008
@@ -16,7 +16,7 @@
+--+
  */
 
-/* $Id: php_spl.c,v 1.52.2.28.2.17.2.11 2008/02/02 23:09:38 helly Exp $ */
+/* $Id: php_spl.c,v 1.52.2.28.2.17.2.12 2008/02/04 17:07:06 helly Exp $ */
 
 #ifdef HAVE_CONFIG_H
 #include "config.h"
@@ -378,7 +378,7 @@

zend_hash_get_current_data_ex(SPL_G(autoload_functions), (void **) &alfi, 
&function_pos);
zend_call_method(alfi->obj ? &alfi->obj : NULL, 
alfi->ce, &alfi->func_ptr, func_name, func_name_len, &retval, 1, class_name, 
NULL TSRMLS_CC);
if (retval) {
-   zval_ptr_dtor(&retval); 

+   zval_ptr_dtor(&retval);
}
if (zend_hash_exists(EG(class_table), lc_name, 
class_name_len + 1)) {
break;
@@ -435,7 +435,7 @@
RETURN_FALSE;
}
else if (do_throw) {
-   
zend_throw_exception_ex(spl_ce_LogicException, 0 TSRMLS_CC, "Passed array does 
not specify %s %smethod, (%s)", alfi.func_ptr ? "a callable" : "an existing", 
!obj_ptr ? "static " : "", error);
+   
zend_throw_exception_ex(spl_ce_LogicException, 0 TSRMLS_CC, "Passed array does 
not specify %s %smethod (%s)", alfi.func_ptr ? "a callable" : "an existing", 
!obj_ptr ? "static " : "", error);
}
if (error) {
efree(error);
http://cvs.php.net/viewvc.cgi/php-src/ext/spl/tests/dit_001.phpt?r1=1.3.6.2&r2=1.3.6.3&diff_format=u
Index: php-src/ext/spl/tests/dit_001.phpt
diff -u php-src/ext/spl/tests/dit_001.phpt:1.3.6.2 
php-src/ext/spl/tests/dit_001.phpt:1.3.6.3
--- php-src/ext/spl/tests/dit_001.phpt:1.3.6.2  Thu Jan 31 07:44:01 2008
+++ php-src/ext/spl/tests/dit_001.phpt  Mon Feb  4 17:07:07 2008
@@ -15,7 +15,7 @@
 object(DirectoryIterator)#%d (3) {
   %s"pathName"%s"SplFileInfo":private]=>
   %s(1) "."
-  %s"glob"%s"RecursiveDirectoryIterator":private]=>
+  %s"glob"%s"DirectoryIterator":private]=>
   bool(false)
   %s"subPathName"%s"RecursiveDirectoryIterator":private]=>
   %s(0) ""
http://cvs.php.net/viewvc.cgi/php-src/ext/spl/tests/spl_autoload_007.phpt?r1=1.1.2.2.4.1&r2=1.1.2.2.4.2&diff_format=u
Index: php-src/ext/spl/tests/spl_autoload_007.phpt
diff -u php-src/ext/spl/tests/spl_autoload_007.phpt:1.1.2.2.4.1 
php-src/ext/spl/tests/spl_autoload_007.phpt:1.1.2.2.4.2
--- php-src/ext/spl/tests/spl_autoload_007.phpt:1.1.2.2.4.1 Sat Feb  2 
03:20:51 2008
+++ php-src/ext/spl/tests/spl_autoload_007.phpt Mon Feb  4 17:07:07 2008
@@ -76,7 +76,7 @@
   [1]=>
   string(8) "notExist"
 }
-Passed array does not specify an existing static method, (class 'MyAutoLoader' 
does not have a method 'notexist')
+Passed array does not specify an existing static method (class 'MyAutoLoader' 
does not have a method 'notexist')
 
 array(2) {
   [0]=>
@@ -84,7 +84,7 @@
   [1]=>
   string(8) "noAccess"
 }
-Passed array does not specify a callable static method, (cannot access 
protected method MyAutoLoader::noAccess())
+Passed array does not specify a callable static method (cannot access 
protected method MyAutoLoader::noAccess())
 
 array(2) {
   [0]=>
@@ -109,7 +109,7 @@
   [1]=>
   string(8) "notExist"
 }
-Passed array does not specify an existing method, (class 'MyAutoLoader' does 
not have a method 'notexist')
+Passed array does not specify an existing method (class 'MyAutoLoader' does 
not have a method 'notexist')
 
 array(2) {
   [0]=>
@@ -118,7 +118,7 @@
   [1]=>
   string(8) "noAccess"
 }
-Passed array does not specify a callable method, (cannot access protected 
method MyAutoLoader::noAccess())
+Passed array does not specify a callable method (cannot access protected 
method MyAutoLoader::noAccess())
 
 array(2) {
   [0]=>

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



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

2008-02-04 Thread Marcus Boerger
helly   Mon Feb  4 16:12:47 2008 UTC

  Modified files:  
/php-src/ext/spl/tests  dit_001.phpt 
  Log:
  - Fix test
  
http://cvs.php.net/viewvc.cgi/php-src/ext/spl/tests/dit_001.phpt?r1=1.5&r2=1.6&diff_format=u
Index: php-src/ext/spl/tests/dit_001.phpt
diff -u php-src/ext/spl/tests/dit_001.phpt:1.5 
php-src/ext/spl/tests/dit_001.phpt:1.6
--- php-src/ext/spl/tests/dit_001.phpt:1.5  Thu Jan 31 07:43:49 2008
+++ php-src/ext/spl/tests/dit_001.phpt  Mon Feb  4 16:12:47 2008
@@ -15,7 +15,7 @@
 object(DirectoryIterator)#%d (3) {
   %s"pathName"%s"SplFileInfo":private]=>
   %s(1) "."
-  %s"glob"%s"RecursiveDirectoryIterator":private]=>
+  %s"glob"%s"DirectoryIterator":private]=>
   bool(false)
   %s"subPathName"%s"RecursiveDirectoryIterator":private]=>
   %s(0) ""

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

2008-02-04 Thread Andrey Hristov
andrey  Mon Feb  4 17:55:06 2008 UTC

  Modified files:  (Branch: PHP_5_3)
/php-src/ext/mysqlndmysqlnd.c 
  Log:
  Simplify unique string generation and plug a leak.
  
  
http://cvs.php.net/viewvc.cgi/php-src/ext/mysqlnd/mysqlnd.c?r1=1.5.2.13&r2=1.5.2.14&diff_format=u
Index: php-src/ext/mysqlnd/mysqlnd.c
diff -u php-src/ext/mysqlnd/mysqlnd.c:1.5.2.13 
php-src/ext/mysqlnd/mysqlnd.c:1.5.2.14
--- php-src/ext/mysqlnd/mysqlnd.c:1.5.2.13  Tue Jan 29 18:11:46 2008
+++ php-src/ext/mysqlnd/mysqlnd.c   Mon Feb  4 17:55:06 2008
@@ -18,7 +18,7 @@
   +--+
 */
 
-/* $Id: mysqlnd.c,v 1.5.2.13 2008/01/29 18:11:46 andrey Exp $ */
+/* $Id: mysqlnd.c,v 1.5.2.14 2008/02/04 17:55:06 andrey Exp $ */
 #include "php.h"
 #include "mysqlnd.h"
 #include "mysqlnd_wireprotocol.h"
@@ -28,8 +28,6 @@
 #include "mysqlnd_charset.h"
 #include "mysqlnd_debug.h"
 #include "mysqlnd_block_alloc.h"
-#include "ext/standard/basic_functions.h"
-#include "ext/standard/php_lcg.h"
 
 /* the server doesn't support 4byte utf8, but let's make it forward compatible 
*/
 #define MYSQLND_MAX_ALLOWED_USER_LEN   256  /* 64 char * 4byte */
@@ -544,15 +542,6 @@
}
DBG_INF_FMT("transport=%p", transport);
 
-   if (conn->persistent) {
-   struct timeval tv;
-   gettimeofday(&tv, NULL);
-   /* We should generate something unique */
-   hashed_details_len = spprintf(&hashed_details, 0, "[EMAIL 
PROTECTED]@[EMAIL PROTECTED]@[EMAIL PROTECTED]",
- 
transport, user, db, tv.tv_sec, (long int)tv.tv_usec,
- 
php_combined_lcg(TSRMLS_C) * 10);
-   DBG_INF_FMT("hashed_details=%s", hashed_details);
-   } 
 
PACKET_INIT_ALLOCA(greet_packet, PROT_GREET_PACKET);
PACKET_INIT(auth_packet, PROT_AUTH_PACKET, php_mysql_packet_auth *);
@@ -563,6 +552,19 @@
self_alloced = TRUE;
}
 
+   if (conn->persistent) {
+#if 0
+   struct timeval tv;
+   gettimeofday(&tv, NULL);
+   /* We should generate something unique */
+   hashed_details_len = spprintf(&hashed_details, 0, "[EMAIL 
PROTECTED]@[EMAIL PROTECTED]@[EMAIL PROTECTED]",
+ 
transport, user, db, tv.tv_sec, (long int)tv.tv_usec,
+ 
php_combined_lcg(TSRMLS_C) * 10);
+#endif
+   hashed_details_len = spprintf(&hashed_details, 0, "%p", conn);
+   DBG_INF_FMT("hashed_details=%s", hashed_details);
+   } 
+
CONN_SET_STATE(conn, CONN_ALLOCED);
conn->net.packet_no = 0;
 
@@ -584,6 +586,9 @@
DBG_INF_FMT("stream=%p", conn->net.stream);
 
if (errstr || !conn->net.stream) {
+   if (hashed_details) {
+   mnd_efree(hashed_details);
+   }
goto err;
}
 

-- 
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_directory.c

2008-02-04 Thread Marcus Boerger
helly   Mon Feb  4 18:46:02 2008 UTC

  Modified files:  
/php-src/ext/splspl_directory.c 
  Log:
  - Fix #44018 (RecursiveDirectoryIterator options inconsistancy)
  
http://cvs.php.net/viewvc.cgi/php-src/ext/spl/spl_directory.c?r1=1.145&r2=1.146&diff_format=u
Index: php-src/ext/spl/spl_directory.c
diff -u php-src/ext/spl/spl_directory.c:1.145 
php-src/ext/spl/spl_directory.c:1.146
--- php-src/ext/spl/spl_directory.c:1.145   Mon Feb  4 18:35:08 2008
+++ php-src/ext/spl/spl_directory.c Mon Feb  4 18:46:02 2008
@@ -16,7 +16,7 @@
+--+
  */
 
-/* $Id: spl_directory.c,v 1.145 2008/02/04 18:35:08 helly Exp $ */
+/* $Id: spl_directory.c,v 1.146 2008/02/04 18:46:02 helly Exp $ */
 
 #ifdef HAVE_CONFIG_H
 # include "config.h"
@@ -602,10 +602,8 @@
php_set_error_handling(EH_THROW, spl_ce_RuntimeException TSRMLS_CC);
 
if (ctor_flags & DIT_CTOR_FLAGS) {
-   flags = SPL_FILE_DIR_CURRENT_AS_FILEINFO;
parsed = zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, 
"t|l", &path, &len, &path_type, &flags);
} else {
-   flags = 0;
parsed = zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "t", 
&path, &len, &path_type);
}
if (parsed == FAILURE) {

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



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

2008-02-04 Thread Felipe Pena
felipe  Mon Feb  4 18:45:40 2008 UTC

  Modified files:  
/php-src/ext/standard   file.c 
  Log:
  Fixed Bug #42057 (fwrite() writes data into file when length is given as a 
negative value)
  
http://cvs.php.net/viewvc.cgi/php-src/ext/standard/file.c?r1=1.504&r2=1.505&diff_format=u
Index: php-src/ext/standard/file.c
diff -u php-src/ext/standard/file.c:1.504 php-src/ext/standard/file.c:1.505
--- php-src/ext/standard/file.c:1.504   Mon Dec 31 07:12:15 2007
+++ php-src/ext/standard/file.c Mon Feb  4 18:45:40 2008
@@ -21,7 +21,7 @@
+--+
 */
 
-/* $Id: file.c,v 1.504 2007/12/31 07:12:15 sebastian Exp $ */
+/* $Id: file.c,v 1.505 2008/02/04 18:45:40 felipe Exp $ */
 
 /* Synced with php 3.0 revision 1.218 1999-06-16 [ssb] */
 
@@ -1359,22 +1359,20 @@
RETURN_NULL();
}
 
-   if (!write_len) {
+   if (write_len <= 0) {
RETURN_LONG(0);
}
 
php_stream_from_zval(stream, &zstream);
 
if (Z_TYPE_P(zstring) == IS_UNICODE) {
-   if (write_len >= 0) {
-   /* Convert code units to data points */
-   int32_t write_uchars = 0;
+   /* Convert code units to data points */
+   int32_t write_uchars = 0;
 
-   U16_FWD_N(Z_USTRVAL_P(zstring), write_uchars, 
Z_USTRLEN_P(zstring), write_len);
-   write_len = write_uchars;
-   }
+   U16_FWD_N(Z_USTRVAL_P(zstring), write_uchars, 
Z_USTRLEN_P(zstring), write_len);
+   write_len = write_uchars;
 
-   if (write_len < 0 || write_len > Z_USTRLEN_P(zstring)) {
+   if (write_len > Z_USTRLEN_P(zstring)) {
write_len = Z_USTRLEN_P(zstring);
}
ret = php_stream_write_unicode(stream, Z_USTRVAL_P(zstring), 
write_len);
@@ -1385,7 +1383,7 @@
}
} else {
convert_to_string(zstring);
-   if (write_len < 0 || write_len > Z_STRLEN_P(zstring)) {
+   if (write_len > Z_STRLEN_P(zstring)) {
write_len = Z_STRLEN_P(zstring);
}
 

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



[PHP-CVS] cvs: php-src /ext/spl/tests spl_autoload_008.phpt /ext/standard/tests/array array_walk_recursive_error1.phpt

2008-02-04 Thread Felipe Pena
felipe  Mon Feb  4 15:43:09 2008 UTC

  Modified files:  
/php-src/ext/spl/tests  spl_autoload_008.phpt 
/php-src/ext/standard/tests/array   array_walk_recursive_error1.phpt 
  Log:
  Fix tests
  
http://cvs.php.net/viewvc.cgi/php-src/ext/spl/tests/spl_autoload_008.phpt?r1=1.4&r2=1.5&diff_format=u
Index: php-src/ext/spl/tests/spl_autoload_008.phpt
diff -u php-src/ext/spl/tests/spl_autoload_008.phpt:1.4 
php-src/ext/spl/tests/spl_autoload_008.phpt:1.5
--- php-src/ext/spl/tests/spl_autoload_008.phpt:1.4 Mon Feb  4 14:02:01 2008
+++ php-src/ext/spl/tests/spl_autoload_008.phpt Mon Feb  4 15:43:09 2008
@@ -82,7 +82,7 @@
 int(0)
 2
 string(22) "MyAutoLoader::dynaLoad"
-LogicException: Function 'MyAutoLoader::dynaLoad' not callable (non-static 
method MyAutoLoader::dynaLoad() should not be called statically)
+LogicException: Function 'MyAutoLoader::dynaLoad' not callable, (non-static 
method MyAutoLoader::dynaLoad() should not be called statically)
 int(0)
 3
 array(2) {
@@ -144,7 +144,7 @@
 int(0)
 2
 unicode(22) "MyAutoLoader::dynaLoad"
-LogicException: Function 'MyAutoLoader::dynaLoad' not callable (non-static 
method MyAutoLoader::dynaLoad() should not be called statically)
+LogicException: Function 'MyAutoLoader::dynaLoad' not callable, (non-static 
method MyAutoLoader::dynaLoad() should not be called statically)
 int(0)
 3
 array(2) {
http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/array/array_walk_recursive_error1.phpt?r1=1.3&r2=1.4&diff_format=u
Index: php-src/ext/standard/tests/array/array_walk_recursive_error1.phpt
diff -u php-src/ext/standard/tests/array/array_walk_recursive_error1.phpt:1.3 
php-src/ext/standard/tests/array/array_walk_recursive_error1.phpt:1.4
--- php-src/ext/standard/tests/array/array_walk_recursive_error1.phpt:1.3   
Mon Feb  4 13:08:27 2008
+++ php-src/ext/standard/tests/array/array_walk_recursive_error1.phpt   Mon Feb 
 4 15:43:09 2008
@@ -43,7 +43,7 @@
 NULL
 -- Testing array_walk_recursive() function with non existent callback function 
 --
 
-Warning: array_walk_recursive() expects parameter 2 to be valid callback, 
string given in %s on line %d
+Warning: array_walk_recursive() expects parameter 2 to be a valid callback, 
function 'non_existent' not found or invalid function name in %s on line %d
 NULL
 Done
 --UEXPECTF--

-- 
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/dom attr.c cdatasection.c characterdata.c comment.c document.c documentfragment.c domconfiguration.c domerrorhandler.c domimplementation.c domimplementationlist.c

2008-02-04 Thread Sebastian Bergmann
sebastian   Mon Feb  4 15:22:59 2008 UTC

  Modified files:  (Branch: PHP_5_3)
/php-src/ext/domattr.c cdatasection.c characterdata.c comment.c 
document.c documentfragment.c domconfiguration.c 
domerrorhandler.c domimplementation.c 
domimplementationlist.c domimplementationsource.c 
domstringlist.c element.c entityreference.c 
namednodemap.c namelist.c nodelist.c 
processinginstruction.c string_extend.c text.c 
  Log:
  MFH: Add missing Reflection API metadata for DOM classes.
  http://cvs.php.net/viewvc.cgi/php-src/ext/dom/attr.c?r1=1.18.2.2.2.2.2.3&r2=1.18.2.2.2.2.2.4&diff_format=u
Index: php-src/ext/dom/attr.c
diff -u php-src/ext/dom/attr.c:1.18.2.2.2.2.2.3 
php-src/ext/dom/attr.c:1.18.2.2.2.2.2.4
--- php-src/ext/dom/attr.c:1.18.2.2.2.2.2.3 Mon Dec 31 07:17:07 2007
+++ php-src/ext/dom/attr.c  Mon Feb  4 15:22:59 2008
@@ -17,7 +17,7 @@
+--+
 */
 
-/* $Id: attr.c,v 1.18.2.2.2.2.2.3 2007/12/31 07:17:07 sebastian Exp $ */
+/* $Id: attr.c,v 1.18.2.2.2.2.2.4 2008/02/04 15:22:59 sebastian Exp $ */
 
 #ifdef HAVE_CONFIG_H
 #include "config.h"
@@ -30,6 +30,18 @@
 #include "php_dom.h"
 
 
+/* {{{ arginfo */
+static
+ZEND_BEGIN_ARG_INFO_EX(arginfo_dom_attr_is_id, 0, 0, 0)
+ZEND_END_ARG_INFO();
+
+static
+ZEND_BEGIN_ARG_INFO_EX(arginfo_dom_attr_construct, 0, 0, 1)
+   ZEND_ARG_INFO(0, name)
+   ZEND_ARG_INFO(0, value)
+ZEND_END_ARG_INFO();
+/* }}} */
+
 /*
 * class DOMAttr extends DOMNode 
 *
@@ -38,8 +50,8 @@
 */
 
 const zend_function_entry php_dom_attr_class_functions[] = {
-   PHP_FALIAS(isId, dom_attr_is_id, NULL)
-   PHP_ME(domattr, __construct, NULL, ZEND_ACC_PUBLIC)
+   PHP_FALIAS(isId, dom_attr_is_id, arginfo_dom_attr_is_id)
+   PHP_ME(domattr, __construct, arginfo_dom_attr_construct, 
ZEND_ACC_PUBLIC)
{NULL, NULL, NULL}
 };
 
http://cvs.php.net/viewvc.cgi/php-src/ext/dom/cdatasection.c?r1=1.11.2.1.2.1.2.2&r2=1.11.2.1.2.1.2.3&diff_format=u
Index: php-src/ext/dom/cdatasection.c
diff -u php-src/ext/dom/cdatasection.c:1.11.2.1.2.1.2.2 
php-src/ext/dom/cdatasection.c:1.11.2.1.2.1.2.3
--- php-src/ext/dom/cdatasection.c:1.11.2.1.2.1.2.2 Mon Dec 31 07:17:07 2007
+++ php-src/ext/dom/cdatasection.c  Mon Feb  4 15:22:59 2008
@@ -17,7 +17,7 @@
+--+
 */
 
-/* $Id: cdatasection.c,v 1.11.2.1.2.1.2.2 2007/12/31 07:17:07 sebastian Exp $ 
*/
+/* $Id: cdatasection.c,v 1.11.2.1.2.1.2.3 2008/02/04 15:22:59 sebastian Exp $ 
*/
 
 #ifdef HAVE_CONFIG_H
 #include "config.h"
@@ -28,6 +28,13 @@
 #include "php_dom.h"
 
 
+/* {{{ arginfo */
+static
+ZEND_BEGIN_ARG_INFO_EX(arginfo_dom_cdatasection_construct, 0, 0, 1)
+   ZEND_ARG_INFO(0, value)
+ZEND_END_ARG_INFO();
+/* }}} */
+
 /*
 * class DOMCdataSection extends DOMText 
 *
@@ -36,7 +43,7 @@
 */
 
 const zend_function_entry php_dom_cdatasection_class_functions[] = {
-   PHP_ME(domcdatasection, __construct, NULL, ZEND_ACC_PUBLIC)
+   PHP_ME(domcdatasection, __construct, 
arginfo_dom_cdatasection_construct, ZEND_ACC_PUBLIC)
{NULL, NULL, NULL}
 };
 
http://cvs.php.net/viewvc.cgi/php-src/ext/dom/characterdata.c?r1=1.15.2.1.2.2.2.3&r2=1.15.2.1.2.2.2.4&diff_format=u
Index: php-src/ext/dom/characterdata.c
diff -u php-src/ext/dom/characterdata.c:1.15.2.1.2.2.2.3 
php-src/ext/dom/characterdata.c:1.15.2.1.2.2.2.4
--- php-src/ext/dom/characterdata.c:1.15.2.1.2.2.2.3Mon Dec 31 07:17:07 2007
+++ php-src/ext/dom/characterdata.c Mon Feb  4 15:22:59 2008
@@ -17,7 +17,7 @@
+--+
 */
 
-/* $Id: characterdata.c,v 1.15.2.1.2.2.2.3 2007/12/31 07:17:07 sebastian Exp $ 
*/
+/* $Id: characterdata.c,v 1.15.2.1.2.2.2.4 2008/02/04 15:22:59 sebastian Exp $ 
*/
 
 #ifdef HAVE_CONFIG_H
 #include "config.h"
@@ -28,6 +28,38 @@
 #include "php_dom.h"
 
 
+/* {{{ arginfo */
+static
+ZEND_BEGIN_ARG_INFO_EX(arginfo_dom_characterdata_substring_data, 0, 0, 2)
+   ZEND_ARG_INFO(0, offset)
+   ZEND_ARG_INFO(0, count)
+ZEND_END_ARG_INFO();
+
+static
+ZEND_BEGIN_ARG_INFO_EX(arginfo_dom_characterdata_append_data, 0, 0, 1)
+   ZEND_ARG_INFO(0, arg)
+ZEND_END_ARG_INFO();
+
+static
+ZEND_BEGIN_ARG_INFO_EX(arginfo_dom_characterdata_insert_data, 0, 0, 2)
+   ZEND_ARG_INFO(0, offset)
+   ZEND_ARG_INFO(0, arg)
+ZEND_END_ARG_INFO();
+
+static
+ZEND_BEGIN_ARG_INFO_EX(arginfo_dom_characterdata_delete_data, 0, 0, 2)
+   ZEND_ARG_INFO(0, offset)
+   ZEND_ARG_INFO(0, count)
+ZEND_END_ARG_INFO();
+
+static
+ZEND_BEGIN_ARG_INFO_EX(arginfo_dom_characterdata_replace_data, 0, 0, 3)
+   ZEND_ARG_INFO(0, offset)
+   ZEND_ARG_INFO(0, count)
+   ZEND_ARG_INFO(0, arg)
+ZEND_END_ARG_INFO();
+/* }}} */
+
 /*
 * class DOMCharacterData extends DOMNode 
 

[PHP-CVS] cvs: php-src(PHP_5_3) /ext/spl spl_array.c

2008-02-04 Thread Marcus Boerger
helly   Mon Feb  4 16:48:06 2008 UTC

  Modified files:  (Branch: PHP_5_3)
/php-src/ext/splspl_array.c 
  Log:
  - CS/WS
  
http://cvs.php.net/viewvc.cgi/php-src/ext/spl/spl_array.c?r1=1.71.2.17.2.13.2.12&r2=1.71.2.17.2.13.2.13&diff_format=u
Index: php-src/ext/spl/spl_array.c
diff -u php-src/ext/spl/spl_array.c:1.71.2.17.2.13.2.12 
php-src/ext/spl/spl_array.c:1.71.2.17.2.13.2.13
--- php-src/ext/spl/spl_array.c:1.71.2.17.2.13.2.12 Mon Dec 31 07:17:14 2007
+++ php-src/ext/spl/spl_array.c Mon Feb  4 16:48:06 2008
@@ -16,7 +16,7 @@
+--+
  */
 
-/* $Id: spl_array.c,v 1.71.2.17.2.13.2.12 2007/12/31 07:17:14 sebastian Exp $ 
*/
+/* $Id: spl_array.c,v 1.71.2.17.2.13.2.13 2008/02/04 16:48:06 helly Exp $ */
 
 #ifdef HAVE_CONFIG_H
 # include "config.h"
@@ -1214,7 +1214,7 @@
RETURN_LONG(count);
 } /* }}} */
 
-static void spl_array_method(INTERNAL_FUNCTION_PARAMETERS, char *fname, int 
fname_len, int use_arg)
+static void spl_array_method(INTERNAL_FUNCTION_PARAMETERS, char *fname, int 
fname_len, int use_arg) /* {{{ */
 {
spl_array_object *intern = 
(spl_array_object*)zend_object_store_get_object(getThis() TSRMLS_CC);
HashTable *aht = spl_array_get_hash_table(intern, 0 TSRMLS_CC);
@@ -1233,7 +1233,7 @@
} else {
zend_call_method(NULL, NULL, NULL, fname, fname_len, 
&return_value, 1, &tmp, NULL TSRMLS_CC);
}
-}
+} /* }}} */
 
 #define SPL_ARRAY_METHOD(cname, fname, use_arg) \
 SPL_METHOD(cname, fname) \
@@ -1483,7 +1483,6 @@
}
 
RETURN_NULL();
-   
 } /* }}} */
 
 /* {{{ proto void ArrayObject::unserialize(string serialized)

-- 
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/array array_map_object2.phpt array_map_object3.phpt array_map_variation12.phpt array_map_variation14.phpt array_map_variation15.phpt array_map_variation16.ph

2008-02-04 Thread Felipe Pena
felipe  Mon Feb  4 12:37:15 2008 UTC

  Modified files:  
/php-src/ext/standard/tests/general_functions   bug32647.phpt 
010.phpt 
/php-src/ext/standard/tests/array   array_map_object2.phpt 
array_map_object3.phpt 
array_map_variation12.phpt 
array_map_variation14.phpt 
array_map_variation15.phpt 
array_map_variation16.phpt 
array_map_variation17.phpt 
array_walk_error1.phpt 
array_walk.phpt 
array_walk_recursive1.phpt 
  Log:
  Fix tests (new error message)
  http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/general_functions/bug32647.phpt?r1=1.3&r2=1.4&diff_format=u
Index: php-src/ext/standard/tests/general_functions/bug32647.phpt
diff -u php-src/ext/standard/tests/general_functions/bug32647.phpt:1.3 
php-src/ext/standard/tests/general_functions/bug32647.phpt:1.4
--- php-src/ext/standard/tests/general_functions/bug32647.phpt:1.3  Fri Sep 
14 15:04:46 2007
+++ php-src/ext/standard/tests/general_functions/bug32647.phpt  Mon Feb  4 
12:37:14 2008
@@ -49,13 +49,13 @@
 
 Warning: register_shutdown_function(): Invalid shutdown callback 'bar' passed 
in %s on line %d
 
-Strict Standards: Non-static method bar::barfoo() cannot be called statically 
in %sbug32647.php on line %d
+Strict Standards: Non-static method bar::barfoo() should not be called 
statically in %s on line %d
 
-Warning: register_shutdown_function(): Invalid shutdown callback 'bar::foobar' 
passed in %sbug32647.php on line %d
+Warning: register_shutdown_function(): Invalid shutdown callback 'bar::foobar' 
passed in %s on line %d
 foo!
 
-Strict Standards: Non-static method bar::barfoo() cannot be called statically 
in Unknown on line 0
+Strict Standards: Non-static method bar::barfoo() should not be called 
statically in Unknown on line 0
 
-Strict Standards: Non-static method bar::barfoo() cannot be called statically 
in Unknown on line 0
+Strict Standards: Non-static method bar::barfoo() should not be called 
statically in Unknown on line 0
 bar!
 bar!
http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/general_functions/010.phpt?r1=1.1&r2=1.2&diff_format=u
Index: php-src/ext/standard/tests/general_functions/010.phpt
diff -u php-src/ext/standard/tests/general_functions/010.phpt:1.1 
php-src/ext/standard/tests/general_functions/010.phpt:1.2
--- php-src/ext/standard/tests/general_functions/010.phpt:1.1   Fri Sep 15 
09:11:31 2006
+++ php-src/ext/standard/tests/general_functions/010.phpt   Mon Feb  4 
12:37:14 2008
@@ -15,11 +15,5 @@
 
 echo "Done\n";
 ?>
---EXPECTF--
-Strict Standards: Non-static method test::__call() cannot be called statically 
in %s on line %d
-NULL
-Done
-
-Strict Standards: Non-static method test::__call() cannot be called statically 
in Unknown on line 0
-
-Fatal error: Non-static method test::__call() cannot be called statically in 
Unknown on line 0
+--EXPECTF--
+Fatal error: Non-static method test::__call() cannot be called statically in 
%s on line %d
http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/array/array_map_object2.phpt?r1=1.1&r2=1.2&diff_format=u
Index: php-src/ext/standard/tests/array/array_map_object2.phpt
diff -u php-src/ext/standard/tests/array/array_map_object2.phpt:1.1 
php-src/ext/standard/tests/array/array_map_object2.phpt:1.2
--- php-src/ext/standard/tests/array/array_map_object2.phpt:1.1 Thu Jan  3 
09:35:11 2008
+++ php-src/ext/standard/tests/array/array_map_object2.phpt Mon Feb  4 
12:37:15 2008
@@ -37,21 +37,21 @@
 *** Testing array_map() :  with non-existent class and method ***
 -- with non-existent class --
 
-Warning: array_map() expects parameter 1 to be valid callback, array given in 
%s on line %d%d
+Warning: array_map() expects parameter 1 to be a valid callback, first array 
member is not a valid class name in %s on line %d
 NULL
 -- with existent class and non-existent method --
 
-Warning: array_map() expects parameter 1 to be valid callback, array given in 
%s on line %d%d
+Warning: array_map() expects parameter 1 to be a valid callback, class 
'SimpleClass' does not have a method 'non-existent' in %s on line %d
 NULL
 Done
 --UEXPECTF--
 *** Testing array_map() :  with non-existent class and method ***
 -- with non-existent class --
 
-Warning: array_map() expects parameter 1 to be valid callback, array given in 
%s on line %d
+Warning: array_map() expects parameter 1 to be a valid callback, first array 
member is not a valid class name in %s on line %d
 NULL
 -- with existent class and non-existent method --
 
-Warning: array_map() expects parameter 1 to be valid callback, array given in 
%s on line %d
+Warni

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

2008-02-04 Thread Jani Taskinen
a) requires that certain constants are defined prior to parse happens
(I have patch for that waiting for commit already)

b) Also requires the patch for constants but also a lot more
modifications to the parser. I've been working on adding the if..else
stuff but haven't had much time lately.

It would be neat to have both a) and b). But the syntax for b)
should be something else. And it should be parse-time thing, not execute
time. ie. The scanner/parser should only add the "true" block into
config hash. I had this syntax in mind:

#if expr
#elseif expr
#endif

Similar syntax with CPP.. :)

--Jani


On Mon, 2008-02-04 at 12:27 +0100, Marcus Boerger wrote:
> Hello Jani,
> 
>   I am trying to add stuff to configuration hash prior to calling the ini
> parser and then somehow allowing the parser for instance to act on the
> version of php, whether it is a debug build, and whether it is a zts build.
> That way I could have one config that loads the correct xdebug extension on
> my development machine. I see two possibilities here:
> a) zend_extension${php.debug?_debug:}${php.zts?_zts:} = 
> /usr/src/${php.tag}/ext/xdebug/xdebug.so
> b)
> [IF ${php.debug} && ${php.zts}]
> zend_extension_debug_zts = /usr/src/${php.tag}/ext/xdebug/xdebug.so
> [ELIF ${php.debug}]
> zend_extension_debug = /usr/src/${php.tag}/ext/xdebug/xdebug.so
> [ELIF ${php.zts}]
> zend_extension_zts = /usr/src/${php.tag}/ext/xdebug/xdebug.so
> [ELSE]
> zend_extension_zts = /usr/src/${php.tag}/ext/xdebug/xdebug.so
> [ENDIF]
> 
> Monday, February 4, 2008, 11:54:00 AM, you wrote:
> 
> > Like what stuff? :)
> 
> > --Jani
> 
> > On Mon, 2008-02-04 at 11:40 +0100, Marcus Boerger wrote:
> >> Hello Jani,
> >> 
> >>   for the moment probably only ofr me. But I am working on more stuff.
> >> 
> >> marcus
> >> 
> >> Monday, February 4, 2008, 10:28:09 AM, you wrote:
> >> 
> >> > This function was actually just for debugging. I didn't include it in by
> >> > default since I don't think it has much value to the end users..:)
> >> > Did you find some real usage for it?
> >> 
> >> > --Jani
> >> 
> >> > On Sun, 2008-02-03 at 14:35 +, Marcus Boerger wrote:
> >> >> helly Sun Feb  3 14:35:29 2008 UTC
> >> >> 
> >> >>   Modified files:  
> >> >> /php-src/ext/standard basic_functions.c basic_functions.h 
> >> >> /php-src/main php_ini.c php_ini.h 
> >> >>   Log:
> >> >>   - Rename dump_config_hash() to get_config_hash() as it doesn't dump
> >> >>   
> >> >> http://cvs.php.net/viewvc.cgi/php-src/ext/standard/basic_functions.c?r1=1.887&r2=1.888&diff_format=u
> >> >> Index: php-src/ext/standard/basic_functions.c
> >> >> diff -u php-src/ext/standard/basic_functions.c:1.887 
> >> >> php-src/ext/standard/basic_functions.c:1.888
> >> >> --- php-src/ext/standard/basic_functions.c:1.887  Sat Jan 19 
> >> >> 19:23:25 2008
> >> >> +++ php-src/ext/standard/basic_functions.cSun Feb  3 14:35:29 2008
> >> >> @@ -17,7 +17,7 @@
> >> >> 
> >> >> +--+
> >> >>   */
> >> >>  
> >> >> -/* $Id: basic_functions.c,v 1.887 2008/01/19 19:23:25 davidc Exp $ */
> >> >> +/* $Id: basic_functions.c,v 1.888 2008/02/03 14:35:29 helly Exp $ */
> >> >>  
> >> >>  #include "php.h"
> >> >>  #include "php_streams.h"
> >> >> @@ -943,11 +943,9 @@
> >> >>   ZEND_ARG_INFO(0, scanner_mode)
> >> >>  ZEND_END_ARG_INFO()
> >> >>  
> >> >> -#if ZEND_DEBUG
> >> >>  static
> >> >> -ZEND_BEGIN_ARG_INFO(arginfo_dump_config_hash, 0)
> >> >> +ZEND_BEGIN_ARG_INFO(arginfo_get_config_hash, 0)
> >> >>  ZEND_END_ARG_INFO()
> >> >> -#endif
> >> >>  
> >> >>  static
> >> >>  ZEND_BEGIN_ARG_INFO_EX(arginfo_import_request_variables, 0, 0, 1)
> >> >> @@ -3439,9 +3437,7 @@
> >> >>   PHP_FE(connection_status, 
> >> >>   
> >> >> arginfo_connection_status)
> >> >>   PHP_FE(ignore_user_abort, 
> >> >>   
> >> >> arginfo_ignore_user_abort)
> >> >>   PHP_FE(parse_ini_file,
> >> >>   
> >> >> arginfo_parse_ini_file)
> >> >> -#if ZEND_DEBUG
> >> >> - PHP_FE(dump_config_hash,  
> >> >>   
> >> >> arginfo_dump_config_hash)
> >> >> -#endif
> >> >> + PHP_FE(get_config_hash,   
> >> >>   
> >> >> arginfo_get_config_hash)
> >> >>   PHP_FE(is_uploaded_file,  
> >> >>   
> >> >> arginfo_is_uploaded_file)
> >> >>   PHP_FE(move_uploaded_file,
> >> >>   
> >> >> arginfo_move_uploaded_file)
> >> >>  
> >> >> @@ -6340,18 +6336,16 @@
> >> >>  }
> >> >>  /* }}} */
> >> >>  
> >> >> -#if ZEND_DEBUG
> >> >> -

[PHP-CVS] cvs: php-src /ext/standard/tests/file fwrite.phpt

2008-02-04 Thread Felipe Pena
felipe  Mon Feb  4 19:58:12 2008 UTC

  Modified files:  
/php-src/ext/standard/tests/filefwrite.phpt 
  Log:
  Fix wrong test
  
http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/file/fwrite.phpt?r1=1.2&r2=1.3&diff_format=u
Index: php-src/ext/standard/tests/file/fwrite.phpt
diff -u php-src/ext/standard/tests/file/fwrite.phpt:1.2 
php-src/ext/standard/tests/file/fwrite.phpt:1.3
--- php-src/ext/standard/tests/file/fwrite.phpt:1.2 Wed Nov 15 12:11:07 2006
+++ php-src/ext/standard/tests/file/fwrite.phpt Mon Feb  4 19:58:12 2008
@@ -36,7 +36,7 @@
 Notice: Array to string conversion in %s on line %d
 int(5)
 int(0)
-int(4)
+int(0)
 int(4)
 
 Warning: fwrite(): 7 is not a valid stream resource in %s on line %d
@@ -50,5 +50,5 @@
 
 Warning: fwrite() expects at least 2 parameters, 1 given in %s on line %d
 NULL
-string(8) "datadata"
+string(4) "data"
 Done

-- 
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/spl spl_directory.c

2008-02-04 Thread Marcus Boerger
helly   Mon Feb  4 18:46:13 2008 UTC

  Modified files:  (Branch: PHP_5_3)
/php-src/ext/splspl_directory.c 
  Log:
  - MFH Fix #44018 (RecursiveDirectoryIterator options inconsistancy)
  
http://cvs.php.net/viewvc.cgi/php-src/ext/spl/spl_directory.c?r1=1.45.2.27.2.23.2.13&r2=1.45.2.27.2.23.2.14&diff_format=u
Index: php-src/ext/spl/spl_directory.c
diff -u php-src/ext/spl/spl_directory.c:1.45.2.27.2.23.2.13 
php-src/ext/spl/spl_directory.c:1.45.2.27.2.23.2.14
--- php-src/ext/spl/spl_directory.c:1.45.2.27.2.23.2.13 Mon Feb  4 17:19:07 2008
+++ php-src/ext/spl/spl_directory.c Mon Feb  4 18:46:13 2008
@@ -16,7 +16,7 @@
+--+
  */
 
-/* $Id: spl_directory.c,v 1.45.2.27.2.23.2.13 2008/02/04 17:19:07 helly Exp $ 
*/
+/* $Id: spl_directory.c,v 1.45.2.27.2.23.2.14 2008/02/04 18:46:13 helly Exp $ 
*/
 
 #ifdef HAVE_CONFIG_H
 # include "config.h"
@@ -556,10 +556,8 @@
php_set_error_handling(EH_THROW, spl_ce_UnexpectedValueException 
TSRMLS_CC);
 
if (ctor_flags & DIT_CTOR_FLAGS) {
-   flags = SPL_FILE_DIR_CURRENT_AS_FILEINFO;
parsed = zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, 
"s|l", &path, &len, &flags);
} else {
-   flags = 0;
parsed = zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "s", 
&path, &len);
}
if (parsed == FAILURE) {

-- 
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_directory.c

2008-02-04 Thread Marcus Boerger
helly   Mon Feb  4 18:35:08 2008 UTC

  Modified files:  
/php-src/ext/splspl_directory.c 
  Log:
  - Setting flags once is enough
  
http://cvs.php.net/viewvc.cgi/php-src/ext/spl/spl_directory.c?r1=1.144&r2=1.145&diff_format=u
Index: php-src/ext/spl/spl_directory.c
diff -u php-src/ext/spl/spl_directory.c:1.144 
php-src/ext/spl/spl_directory.c:1.145
--- php-src/ext/spl/spl_directory.c:1.144   Mon Feb  4 17:18:48 2008
+++ php-src/ext/spl/spl_directory.c Mon Feb  4 18:35:08 2008
@@ -16,7 +16,7 @@
+--+
  */
 
-/* $Id: spl_directory.c,v 1.144 2008/02/04 17:18:48 helly Exp $ */
+/* $Id: spl_directory.c,v 1.145 2008/02/04 18:35:08 helly Exp $ */
 
 #ifdef HAVE_CONFIG_H
 # include "config.h"
@@ -619,8 +619,6 @@
}
 
intern = (spl_filesystem_object*)zend_object_store_get_object(getThis() 
TSRMLS_CC);
-
-   intern->flags = flags;
if ((ctor_flags & DIT_CTOR_GLOB) && (
(path_type == IS_STRING && strstr(path.s, "glob://") != path.s) 
||
(path_type == IS_UNICODE && u_strstr(path.u, u_glob) != path.u)

-- 
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_directory.c

2008-02-04 Thread Marcus Boerger
helly   Mon Feb  4 17:18:48 2008 UTC

  Modified files:  
/php-src/ext/splspl_directory.c 
  Log:
   Fix default flag value in contructor
  
http://cvs.php.net/viewvc.cgi/php-src/ext/spl/spl_directory.c?r1=1.143&r2=1.144&diff_format=u
Index: php-src/ext/spl/spl_directory.c
diff -u php-src/ext/spl/spl_directory.c:1.143 
php-src/ext/spl/spl_directory.c:1.144
--- php-src/ext/spl/spl_directory.c:1.143   Sat Feb  2 22:53:05 2008
+++ php-src/ext/spl/spl_directory.c Mon Feb  4 17:18:48 2008
@@ -16,7 +16,7 @@
+--+
  */
 
-/* $Id: spl_directory.c,v 1.143 2008/02/02 22:53:05 helly Exp $ */
+/* $Id: spl_directory.c,v 1.144 2008/02/04 17:18:48 helly Exp $ */
 
 #ifdef HAVE_CONFIG_H
 # include "config.h"
@@ -597,7 +597,7 @@
zstr path;
int parsed, len;
zend_uchar path_type;
-   long flags;
+   long flags = 0;

php_set_error_handling(EH_THROW, spl_ce_RuntimeException TSRMLS_CC);
 

-- 
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_directory.c spl_directory.h

2008-02-04 Thread Marcus Boerger
helly   Mon Feb  4 19:33:03 2008 UTC

  Modified files:  
/php-src/ext/splspl_directory.c spl_directory.h 
  Log:
  - Really fix flag handling
  
http://cvs.php.net/viewvc.cgi/php-src/ext/spl/spl_directory.c?r1=1.146&r2=1.147&diff_format=u
Index: php-src/ext/spl/spl_directory.c
diff -u php-src/ext/spl/spl_directory.c:1.146 
php-src/ext/spl/spl_directory.c:1.147
--- php-src/ext/spl/spl_directory.c:1.146   Mon Feb  4 18:46:02 2008
+++ php-src/ext/spl/spl_directory.c Mon Feb  4 19:33:03 2008
@@ -16,7 +16,7 @@
+--+
  */
 
-/* $Id: spl_directory.c,v 1.146 2008/02/04 18:46:02 helly Exp $ */
+/* $Id: spl_directory.c,v 1.147 2008/02/04 19:33:03 helly Exp $ */
 
 #ifdef HAVE_CONFIG_H
 # include "config.h"
@@ -597,13 +597,15 @@
zstr path;
int parsed, len;
zend_uchar path_type;
-   long flags = 0;
+   long flags;

php_set_error_handling(EH_THROW, spl_ce_RuntimeException TSRMLS_CC);
 
if (ctor_flags & DIT_CTOR_FLAGS) {
+   flags = 0;
parsed = zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, 
"t|l", &path, &len, &path_type, &flags);
} else {
+   flags = 
SPL_FILE_DIR_KEY_AS_PATHNAME|SPL_FILE_DIR_CURRENT_AS_SELF;
parsed = zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "t", 
&path, &len, &path_type);
}
if (parsed == FAILURE) {
@@ -837,7 +839,7 @@
 {
spl_filesystem_object *intern = 
(spl_filesystem_object*)zend_object_store_get_object(getThis() TSRMLS_CC);
 
-   if (intern->flags & SPL_FILE_DIR_KEY_AS_FILENAME) {
+   if (SPL_FILE_DIR_KEY(intern, SPL_FILE_DIR_KEY_AS_FILENAME)) {
RETURN_RT_STRING(intern->u.dir.entry.d_name, ZSTR_DUPLICATE);
} else {
spl_filesystem_object_get_file_name(intern TSRMLS_CC);
@@ -852,10 +854,10 @@
 {
spl_filesystem_object *intern = 
(spl_filesystem_object*)zend_object_store_get_object(getThis() TSRMLS_CC);
 
-   if (intern->flags & SPL_FILE_DIR_CURRENT_AS_PATHNAME) {
+   if (SPL_FILE_DIR_CURRENT(intern, SPL_FILE_DIR_CURRENT_AS_PATHNAME)) {
spl_filesystem_object_get_file_name(intern TSRMLS_CC);
RETURN_ZSTRL(intern->file_name_type, intern->file_name, 
intern->file_name_len, ZSTR_DUPLICATE);
-   } else if (intern->flags & SPL_FILE_DIR_CURRENT_AS_FILEINFO) {
+   } else if (SPL_FILE_DIR_CURRENT(intern, 
SPL_FILE_DIR_CURRENT_AS_FILEINFO)) {
spl_filesystem_object_get_file_name(intern TSRMLS_CC);
spl_filesystem_object_create_type(0, intern, SPL_FS_INFO, NULL, 
return_value TSRMLS_CC);
} else {
@@ -1460,14 +1462,14 @@
spl_filesystem_iterator *iterator = (spl_filesystem_iterator *)iter;
spl_filesystem_object   *object   = 
spl_filesystem_iterator_to_object(iterator);
 
-   if (object->flags & SPL_FILE_DIR_CURRENT_AS_PATHNAME) {
+   if (SPL_FILE_DIR_CURRENT(object, SPL_FILE_DIR_CURRENT_AS_PATHNAME)) {
if (!iterator->current) {
ALLOC_INIT_ZVAL(iterator->current);
spl_filesystem_object_get_file_name(object TSRMLS_CC);
ZVAL_ZSTRL(iterator->current, object->file_name_type, 
object->file_name, object->file_name_len, ZSTR_DUPLICATE);
}
*data = &iterator->current;
-   } else if (object->flags & SPL_FILE_DIR_CURRENT_AS_FILEINFO) {
+   } else if (SPL_FILE_DIR_CURRENT(object, 
SPL_FILE_DIR_CURRENT_AS_FILEINFO)) {
if (!iterator->current) {
ALLOC_INIT_ZVAL(iterator->current);
spl_filesystem_object_get_file_name(object TSRMLS_CC);
@@ -1485,7 +1487,7 @@
 {
spl_filesystem_object *object = 
spl_filesystem_iterator_to_object((spl_filesystem_iterator *)iter);

-   if (object->flags & SPL_FILE_DIR_KEY_AS_FILENAME) {
+   if (SPL_FILE_DIR_KEY(object, SPL_FILE_DIR_KEY_AS_FILENAME)) {
*str_key_len = strlen(object->u.dir.entry.d_name) + 1;
str_key->s = estrndup(object->u.dir.entry.d_name, *str_key_len 
- 1);
return HASH_KEY_IS_STRING;
@@ -1898,11 +1900,11 @@
case IS_UNICODE:
return Z_STRLEN_P(intern->u.file.current_zval) == 0;
case IS_ARRAY:
-   if ((intern->flags & SPL_FILE_OBJECT_READ_CSV) 
+   if ((intern->flags & SPL_FILE_OBJECT_READ_CSV)
&& 
zend_hash_num_elements(Z_ARRVAL_P(intern->u.file.current_zval)) == 1) {
zval ** first = 
Z_ARRVAL_P(intern->u.file.current_zval)->pListHead->pData;

-   return (Z_TYPE_PP(first) == IS_STRING || 
Z_TYPE_PP(first) == IS_UNICODE) 
+   return (Z_TYPE_PP(first) == IS_STRING || 

[PHP-CVS] cvs: php-src(PHP_5_3) /ext/spl spl_directory.c spl_directory.h

2008-02-04 Thread Marcus Boerger
helly   Mon Feb  4 19:33:10 2008 UTC

  Modified files:  (Branch: PHP_5_3)
/php-src/ext/splspl_directory.c spl_directory.h 
  Log:
  - MFH Really fix flag handling
  
http://cvs.php.net/viewvc.cgi/php-src/ext/spl/spl_directory.c?r1=1.45.2.27.2.23.2.14&r2=1.45.2.27.2.23.2.15&diff_format=u
Index: php-src/ext/spl/spl_directory.c
diff -u php-src/ext/spl/spl_directory.c:1.45.2.27.2.23.2.14 
php-src/ext/spl/spl_directory.c:1.45.2.27.2.23.2.15
--- php-src/ext/spl/spl_directory.c:1.45.2.27.2.23.2.14 Mon Feb  4 18:46:13 2008
+++ php-src/ext/spl/spl_directory.c Mon Feb  4 19:33:10 2008
@@ -16,7 +16,7 @@
+--+
  */
 
-/* $Id: spl_directory.c,v 1.45.2.27.2.23.2.14 2008/02/04 18:46:13 helly Exp $ 
*/
+/* $Id: spl_directory.c,v 1.45.2.27.2.23.2.15 2008/02/04 19:33:10 helly Exp $ 
*/
 
 #ifdef HAVE_CONFIG_H
 # include "config.h"
@@ -551,13 +551,15 @@
spl_filesystem_object *intern;
char *path;
int parsed, len;
-   long flags = 0;
+   long flags;
 
php_set_error_handling(EH_THROW, spl_ce_UnexpectedValueException 
TSRMLS_CC);
 
if (ctor_flags & DIT_CTOR_FLAGS) {
+   flags = 0;
parsed = zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, 
"s|l", &path, &len, &flags);
} else {
+   flags = 
SPL_FILE_DIR_KEY_AS_PATHNAME|SPL_FILE_DIR_CURRENT_AS_SELF;
parsed = zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "s", 
&path, &len);
}
if (parsed == FAILURE) {
@@ -769,7 +771,7 @@
 {
spl_filesystem_object *intern = 
(spl_filesystem_object*)zend_object_store_get_object(getThis() TSRMLS_CC);
 
-   if (intern->flags & SPL_FILE_DIR_KEY_AS_FILENAME) {
+   if (SPL_FILE_DIR_KEY(intern, SPL_FILE_DIR_KEY_AS_FILENAME)) {
RETURN_STRING(intern->u.dir.entry.d_name, 1);
} else {
spl_filesystem_object_get_file_name(intern TSRMLS_CC);
@@ -784,10 +786,10 @@
 {
spl_filesystem_object *intern = 
(spl_filesystem_object*)zend_object_store_get_object(getThis() TSRMLS_CC);
 
-   if (intern->flags & SPL_FILE_DIR_CURRENT_AS_PATHNAME) {
+   if (SPL_FILE_DIR_CURRENT(intern, SPL_FILE_DIR_CURRENT_AS_PATHNAME)) {
spl_filesystem_object_get_file_name(intern TSRMLS_CC);
RETURN_STRINGL(intern->file_name, intern->file_name_len, 1);
-   } else if (intern->flags & SPL_FILE_DIR_CURRENT_AS_FILEINFO) {
+   } else if (SPL_FILE_DIR_CURRENT(intern, 
SPL_FILE_DIR_CURRENT_AS_FILEINFO)) {
spl_filesystem_object_get_file_name(intern TSRMLS_CC);
spl_filesystem_object_create_type(0, intern, SPL_FS_INFO, NULL, 
return_value TSRMLS_CC);
} else {
@@ -1350,14 +1352,14 @@
spl_filesystem_iterator *iterator = (spl_filesystem_iterator *)iter;
spl_filesystem_object   *object   = 
spl_filesystem_iterator_to_object(iterator);
 
-   if (object->flags & SPL_FILE_DIR_CURRENT_AS_PATHNAME) {
+   if (SPL_FILE_DIR_CURRENT(object, SPL_FILE_DIR_CURRENT_AS_PATHNAME)) {
if (!iterator->current) {
ALLOC_INIT_ZVAL(iterator->current);
spl_filesystem_object_get_file_name(object TSRMLS_CC);
ZVAL_STRINGL(iterator->current, object->file_name, 
object->file_name_len, 1);
}
*data = &iterator->current;
-   } else if (object->flags & SPL_FILE_DIR_CURRENT_AS_FILEINFO) {
+   } else if (SPL_FILE_DIR_CURRENT(object, 
SPL_FILE_DIR_CURRENT_AS_FILEINFO)) {
if (!iterator->current) {
ALLOC_INIT_ZVAL(iterator->current);
spl_filesystem_object_get_file_name(object TSRMLS_CC);
@@ -1375,7 +1377,7 @@
 {
spl_filesystem_object *object = 
spl_filesystem_iterator_to_object((spl_filesystem_iterator *)iter);

-   if (object->flags & SPL_FILE_DIR_KEY_AS_FILENAME) {
+   if (SPL_FILE_DIR_KEY(object, SPL_FILE_DIR_KEY_AS_FILENAME)) {
*str_key_len = strlen(object->u.dir.entry.d_name) + 1;
*str_key = estrndup(object->u.dir.entry.d_name, *str_key_len - 
1);
} else {
@@ -2350,17 +2352,17 @@
 ZEND_END_ARG_INFO()
 
 static
-ZEND_BEGIN_ARG_INFO(arginfo_file_object_setFlags, 0) 
+ZEND_BEGIN_ARG_INFO(arginfo_file_object_setFlags, 0)
ZEND_ARG_INFO(0, flags)
 ZEND_END_ARG_INFO()
 
 static
-ZEND_BEGIN_ARG_INFO(arginfo_file_object_setMaxLineLen, 0) 
+ZEND_BEGIN_ARG_INFO(arginfo_file_object_setMaxLineLen, 0)
ZEND_ARG_INFO(0, max_len)
 ZEND_END_ARG_INFO()
 
 static
-ZEND_BEGIN_ARG_INFO_EX(arginfo_file_object_fgetcsv, 0, 0, 0) 
+ZEND_BEGIN_ARG_INFO_EX(arginfo_file_object_fgetcsv, 0, 0, 0)
ZEND_ARG_INFO(0, delimiter)
ZEND_ARG_INFO(0, enclosure)
 ZEND_END_ARG_INFO()
@@ -2470,9 +2472,9 @@
REGISTER_SPL_CLASS_CONST_LONG(FilesystemIterator, "CURRENT_MODE_MASK",  
 SPL_FILE_DIR_CUR

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

2008-02-04 Thread Felipe Pena
felipe  Mon Feb  4 13:56:50 2008 UTC

  Modified files:  
/php-src/tests/classes  autoload_012.phpt bug27504.phpt 
  Log:
  Fix tests (new error message)
  
http://cvs.php.net/viewvc.cgi/php-src/tests/classes/autoload_012.phpt?r1=1.2&r2=1.3&diff_format=u
Index: php-src/tests/classes/autoload_012.phpt
diff -u php-src/tests/classes/autoload_012.phpt:1.2 
php-src/tests/classes/autoload_012.phpt:1.3
--- php-src/tests/classes/autoload_012.phpt:1.2 Wed Jan 30 14:29:19 2008
+++ php-src/tests/classes/autoload_012.phpt Mon Feb  4 13:56:50 2008
@@ -12,9 +12,9 @@
 --EXPECTF--
 In autoload: string(6) "UndefC"
 
-Warning: call_user_func() expects parameter 1 to be valid callback, string 
given in %s on line %d
+Warning: call_user_func() expects parameter 1 to be a valid callback, class 
'UndefC' not found in %s on line %d
 
 --UEXPECTF--
 In autoload: unicode(6) "UndefC"
 
-Warning: call_user_func() expects parameter 1 to be valid callback, Unicode 
string given in %s on line %d 
+Warning: call_user_func() expects parameter 1 to be a valid callback, class 
'UndefC' not found in %s on line %d
http://cvs.php.net/viewvc.cgi/php-src/tests/classes/bug27504.phpt?r1=1.4&r2=1.5&diff_format=u
Index: php-src/tests/classes/bug27504.phpt
diff -u php-src/tests/classes/bug27504.phpt:1.4 
php-src/tests/classes/bug27504.phpt:1.5
--- php-src/tests/classes/bug27504.phpt:1.4 Mon Feb 19 20:02:08 2007
+++ php-src/tests/classes/bug27504.phpt Mon Feb  4 13:56:50 2008
@@ -20,6 +20,6 @@
 --EXPECTF--
 Called function foo:bar(1)
 
-Warning: call_user_func_array() expects parameter 1 to be valid callback, 
array given in %s on line %d
+Warning: call_user_func_array() expects parameter 1 to be a valid callback, 
cannot access private method foo::bar() in %s on line %d
 
 Fatal error: Call to private method foo::bar() from context '' in %s on line %d

-- 
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 basic_functions.h /main php_ini.c php_ini.h

2008-02-04 Thread Jani Taskinen
Please send patches, I'm very interested. :)
Perhaps we can combine the work I already did in this..

--Jani


On Mon, 2008-02-04 at 13:17 +0100, Marcus Boerger wrote:
> Hello Jani,
> 
>   I did some experiments with b) and I would indeed ignore everything
> that is configured out. I'll send you a patch as soon as I have somethign
> that works. For getting the variables into the configuratrion hash prior to
> parsing the INI I can send you the patch tonight if you care how I did that
> part.
> 
> marcus
> 
> Monday, February 4, 2008, 12:43:18 PM, you wrote:
> 
> > a) requires that certain constants are defined prior to parse happens
> > (I have patch for that waiting for commit already)
> 
> > b) Also requires the patch for constants but also a lot more
> > modifications to the parser. I've been working on adding the if..else
> > stuff but haven't had much time lately.
> 
> > It would be neat to have both a) and b). But the syntax for b)
> > should be something else. And it should be parse-time thing, not execute
> > time. ie. The scanner/parser should only add the "true" block into
> > config hash. I had this syntax in mind:
> 
> > #if expr
> > #elseif expr
> > #endif
> 
> > Similar syntax with CPP.. :)
> 
> > --Jani
> 
> 
> > On Mon, 2008-02-04 at 12:27 +0100, Marcus Boerger wrote:
> >> Hello Jani,
> >> 
> >>   I am trying to add stuff to configuration hash prior to calling the ini
> >> parser and then somehow allowing the parser for instance to act on the
> >> version of php, whether it is a debug build, and whether it is a zts build.
> >> That way I could have one config that loads the correct xdebug extension on
> >> my development machine. I see two possibilities here:
> >> a) zend_extension${php.debug?_debug:}${php.zts?_zts:} = 
> >> /usr/src/${php.tag}/ext/xdebug/xdebug.so
> >> b)
> >> [IF ${php.debug} && ${php.zts}]
> >> zend_extension_debug_zts = /usr/src/${php.tag}/ext/xdebug/xdebug.so
> >> [ELIF ${php.debug}]
> >> zend_extension_debug = /usr/src/${php.tag}/ext/xdebug/xdebug.so
> >> [ELIF ${php.zts}]
> >> zend_extension_zts = /usr/src/${php.tag}/ext/xdebug/xdebug.so
> >> [ELSE]
> >> zend_extension_zts = /usr/src/${php.tag}/ext/xdebug/xdebug.so
> >> [ENDIF]
> >> 
> >> Monday, February 4, 2008, 11:54:00 AM, you wrote:
> >> 
> >> > Like what stuff? :)
> >> 
> >> > --Jani
> >> 
> >> > On Mon, 2008-02-04 at 11:40 +0100, Marcus Boerger wrote:
> >> >> Hello Jani,
> >> >> 
> >> >>   for the moment probably only ofr me. But I am working on more stuff.
> >> >> 
> >> >> marcus
> >> >> 
> >> >> Monday, February 4, 2008, 10:28:09 AM, you wrote:
> >> >> 
> >> >> > This function was actually just for debugging. I didn't include it in 
> >> >> > by
> >> >> > default since I don't think it has much value to the end users..:)
> >> >> > Did you find some real usage for it?
> >> >> 
> >> >> > --Jani
> >> >> 
> >> >> > On Sun, 2008-02-03 at 14:35 +, Marcus Boerger wrote:
> >> >> >> helly Sun Feb  3 14:35:29 2008 UTC
> >> >> >> 
> >> >> >>   Modified files:  
> >> >> >> /php-src/ext/standard basic_functions.c basic_functions.h 
> >> >> >> /php-src/main php_ini.c php_ini.h 
> >> >> >>   Log:
> >> >> >>   - Rename dump_config_hash() to get_config_hash() as it doesn't dump
> >> >> >>   
> >> >> >> http://cvs.php.net/viewvc.cgi/php-src/ext/standard/basic_functions.c?r1=1.887&r2=1.888&diff_format=u
> >> >> >> Index: php-src/ext/standard/basic_functions.c
> >> >> >> diff -u php-src/ext/standard/basic_functions.c:1.887 
> >> >> >> php-src/ext/standard/basic_functions.c:1.888
> >> >> >> --- php-src/ext/standard/basic_functions.c:1.887  Sat Jan 19 
> >> >> >> 19:23:25 2008
> >> >> >> +++ php-src/ext/standard/basic_functions.cSun Feb  3 14:35:29 
> >> >> >> 2008
> >> >> >> @@ -17,7 +17,7 @@
> >> >> >> 
> >> >> >> +--+
> >> >> >>   */
> >> >> >>  
> >> >> >> -/* $Id: basic_functions.c,v 1.887 2008/01/19 19:23:25 davidc Exp $ 
> >> >> >> */
> >> >> >> +/* $Id: basic_functions.c,v 1.888 2008/02/03 14:35:29 helly Exp $ */
> >> >> >>  
> >> >> >>  #include "php.h"
> >> >> >>  #include "php_streams.h"
> >> >> >> @@ -943,11 +943,9 @@
> >> >> >>   ZEND_ARG_INFO(0, scanner_mode)
> >> >> >>  ZEND_END_ARG_INFO()
> >> >> >>  
> >> >> >> -#if ZEND_DEBUG
> >> >> >>  static
> >> >> >> -ZEND_BEGIN_ARG_INFO(arginfo_dump_config_hash, 0)
> >> >> >> +ZEND_BEGIN_ARG_INFO(arginfo_get_config_hash, 0)
> >> >> >>  ZEND_END_ARG_INFO()
> >> >> >> -#endif
> >> >> >>  
> >> >> >>  static
> >> >> >>  ZEND_BEGIN_ARG_INFO_EX(arginfo_import_request_variables, 0, 0, 1)
> >> >> >> @@ -3439,9 +3437,7 @@
> >> >> >>   PHP_FE(connection_status,  
> >> >> >>
> >> >> >> arginfo_connection_status)
> >> >> >>   PHP_FE(ignore_user_abort,  
> >> >> >>
> >> >> >> arginfo_ignore_user_abort)
> >> >> >>   PH

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

2008-02-04 Thread Sebastian Bergmann
sebastian   Mon Feb  4 19:43:34 2008 UTC

  Modified files:  (Branch: PHP_5_2)
/php-srcNEWS 
  Log:
  Add NEWS entry for ext/dom arginfo changes.
  
http://cvs.php.net/viewvc.cgi/php-src/NEWS?r1=1.2027.2.547.2.1071&r2=1.2027.2.547.2.1072&diff_format=u
Index: php-src/NEWS
diff -u php-src/NEWS:1.2027.2.547.2.1071 php-src/NEWS:1.2027.2.547.2.1072
--- php-src/NEWS:1.2027.2.547.2.1071Sun Feb  3 16:15:30 2008
+++ php-src/NEWSMon Feb  4 19:43:34 2008
@@ -1,6 +1,7 @@
 PHPNEWS
 |||
 ?? ??? 2008, PHP 5.2.6
+- Added Reflection API metadata for the methods of the DOM classes. (Sebastian)
 - Fixed weired behavior in CGI parameter parsing. (Dmitry, Hannes Magnusson)
 - Fixed a safe_mode bypass in cURL identified by Maksymilian Arciemowicz.
   (Ilia)

-- 
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/spl spl_directory.c

2008-02-04 Thread Marcus Boerger
helly   Mon Feb  4 19:40:49 2008 UTC

  Modified files:  (Branch: PHP_5_3)
/php-src/ext/splspl_directory.c 
  Log:
  - MFH Fix/add folding markers
  
http://cvs.php.net/viewvc.cgi/php-src/ext/spl/spl_directory.c?r1=1.45.2.27.2.23.2.15&r2=1.45.2.27.2.23.2.16&diff_format=u
Index: php-src/ext/spl/spl_directory.c
diff -u php-src/ext/spl/spl_directory.c:1.45.2.27.2.23.2.15 
php-src/ext/spl/spl_directory.c:1.45.2.27.2.23.2.16
--- php-src/ext/spl/spl_directory.c:1.45.2.27.2.23.2.15 Mon Feb  4 19:33:10 2008
+++ php-src/ext/spl/spl_directory.c Mon Feb  4 19:40:49 2008
@@ -16,7 +16,7 @@
+--+
  */
 
-/* $Id: spl_directory.c,v 1.45.2.27.2.23.2.15 2008/02/04 19:33:10 helly Exp $ 
*/
+/* $Id: spl_directory.c,v 1.45.2.27.2.23.2.16 2008/02/04 19:40:49 helly Exp $ 
*/
 
 #ifdef HAVE_CONFIG_H
 # include "config.h"
@@ -1227,7 +1227,7 @@
 }
 /* }}} */
 
-/* forward declarations to the iterator handlers */
+/* {{{ forward declarations to the iterator handlers */
 static void spl_filesystem_dir_it_dtor(zend_object_iterator *iter TSRMLS_DC);
 static int spl_filesystem_dir_it_valid(zend_object_iterator *iter TSRMLS_DC);
 static void spl_filesystem_dir_it_current_data(zend_object_iterator *iter, 
zval ***data TSRMLS_DC);
@@ -1244,6 +1244,7 @@
spl_filesystem_dir_it_move_forward,
spl_filesystem_dir_it_rewind
 };
+/* }}} */
 
 /* {{{ spl_ce_dir_get_iterator */
 zend_object_iterator *spl_filesystem_dir_get_iterator(zend_class_entry *ce, 
zval *object, int by_ref TSRMLS_DC)
@@ -1276,7 +1277,7 @@
iterator->intern.data = NULL; /* mark as unused */
 }
 /* }}} */
-   
+
 /* {{{ spl_filesystem_dir_it_valid */
 static int spl_filesystem_dir_it_valid(zend_object_iterator *iter TSRMLS_DC)
 {
@@ -1286,7 +1287,6 @@
 }
 /* }}} */
 
-
 /* {{{ spl_filesystem_dir_it_current_data */
 static void spl_filesystem_dir_it_current_data(zend_object_iterator *iter, 
zval ***data TSRMLS_DC)
 {
@@ -1345,7 +1345,7 @@
iterator->intern.data = NULL; /* mark as unused */
 }
 /* }}} */
-   
+
 /* {{{ spl_filesystem_tree_it_current_data */
 static void spl_filesystem_tree_it_current_data(zend_object_iterator *iter, 
zval ***data TSRMLS_DC)
 {
@@ -1430,7 +1430,7 @@
 }
 /* }}} */
 
-/* iterator handler table */
+/* {{{ iterator handler table */
 zend_object_iterator_funcs spl_filesystem_tree_it_funcs = {
spl_filesystem_tree_it_dtor,
spl_filesystem_dir_it_valid,
@@ -1439,6 +1439,7 @@
spl_filesystem_tree_it_move_forward,
spl_filesystem_tree_it_rewind
 };
+/* }}} */
 
 /* {{{ spl_ce_dir_get_iterator */
 zend_object_iterator *spl_filesystem_tree_get_iterator(zend_class_entry *ce, 
zval *object, int by_ref TSRMLS_DC)
@@ -1482,7 +1483,7 @@
 }
 /* }}} */
 
-/* declare method parameters */
+/* {{{ declare method parameters */
 /* supply a name and default to call by parameter */
 static
 ZEND_BEGIN_ARG_INFO(arginfo_info___construct, 0) 
@@ -1597,6 +1598,7 @@
SPL_ME(GlobIterator, count, NULL,  
ZEND_ACC_PUBLIC)
{NULL, NULL, NULL}
 };
+/* }}} */
 
 static int spl_filesystem_file_read(spl_filesystem_object *intern, int silent 
TSRMLS_DC) /* {{{ */
 {
@@ -1692,12 +1694,12 @@
return result;
 } /* }}} */
 
-#define FileFunctionCall(func_name, pass_num_args, arg2) \
+#define FileFunctionCall(func_name, pass_num_args, arg2) /* {{{ */ \
 { \
zend_function *func_ptr; \
zend_hash_find(EG(function_table), #func_name, sizeof(#func_name), 
(void **) &func_ptr); \
spl_filesystem_file_call(intern, func_ptr, pass_num_args, return_value, 
arg2 TSRMLS_CC); \
-}
+} /* }}} */
 
 static int spl_filesystem_file_read_csv(spl_filesystem_object *intern, char 
delimiter, char enclosure, char escape, zval *return_value TSRMLS_DC) /* {{{ */
 {
@@ -2170,7 +2172,6 @@
RETURN_BOOL(!php_stream_flush(intern->u.file.stream));
 } /* }}} */
 
-
 /* {{{ proto int SplFileObject::ftell()
Return current file position */
 SPL_METHOD(SplFileObject, ftell)
@@ -2500,7 +2501,6 @@
 }
 /* }}} */
 
-
 /*
  * Local variables:
  * tab-width: 4

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



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

2008-02-04 Thread Felipe Pena
felipe  Mon Feb  4 19:48:14 2008 UTC

  Modified files:  
/php-src/ext/standard   file.c 
  Log:
  Fixed wrong fix
  
http://cvs.php.net/viewvc.cgi/php-src/ext/standard/file.c?r1=1.505&r2=1.506&diff_format=u
Index: php-src/ext/standard/file.c
diff -u php-src/ext/standard/file.c:1.505 php-src/ext/standard/file.c:1.506
--- php-src/ext/standard/file.c:1.505   Mon Feb  4 18:45:40 2008
+++ php-src/ext/standard/file.c Mon Feb  4 19:48:14 2008
@@ -21,7 +21,7 @@
+--+
 */
 
-/* $Id: file.c,v 1.505 2008/02/04 18:45:40 felipe Exp $ */
+/* $Id: file.c,v 1.506 2008/02/04 19:48:14 felipe Exp $ */
 
 /* Synced with php 3.0 revision 1.218 1999-06-16 [ssb] */
 
@@ -1359,22 +1359,22 @@
RETURN_NULL();
}
 
-   if (write_len <= 0) {
+   php_stream_from_zval(stream, &zstream);
+   
+   if (argc > 2 && write_len <= 0) {
RETURN_LONG(0);
}
 
-   php_stream_from_zval(stream, &zstream);
-
if (Z_TYPE_P(zstring) == IS_UNICODE) {
+   if (write_len < 0 || write_len > Z_USTRLEN_P(zstring)) {
+   write_len = Z_USTRLEN_P(zstring);
+   }
/* Convert code units to data points */
int32_t write_uchars = 0;
 
U16_FWD_N(Z_USTRVAL_P(zstring), write_uchars, 
Z_USTRLEN_P(zstring), write_len);
write_len = write_uchars;
 
-   if (write_len > Z_USTRLEN_P(zstring)) {
-   write_len = Z_USTRLEN_P(zstring);
-   }
ret = php_stream_write_unicode(stream, Z_USTRVAL_P(zstring), 
write_len);
 
/* Convert data points back to code units */
@@ -1383,7 +1383,7 @@
}
} else {
convert_to_string(zstring);
-   if (write_len > Z_STRLEN_P(zstring)) {
+   if (write_len < 0 || write_len > Z_STRLEN_P(zstring)) {
write_len = Z_STRLEN_P(zstring);
}
 

-- 
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_directory.c

2008-02-04 Thread Marcus Boerger
helly   Mon Feb  4 19:39:07 2008 UTC

  Modified files:  
/php-src/ext/splspl_directory.c 
  Log:
  - Fix/add folding markers
  
http://cvs.php.net/viewvc.cgi/php-src/ext/spl/spl_directory.c?r1=1.147&r2=1.148&diff_format=u
Index: php-src/ext/spl/spl_directory.c
diff -u php-src/ext/spl/spl_directory.c:1.147 
php-src/ext/spl/spl_directory.c:1.148
--- php-src/ext/spl/spl_directory.c:1.147   Mon Feb  4 19:33:03 2008
+++ php-src/ext/spl/spl_directory.c Mon Feb  4 19:39:07 2008
@@ -16,7 +16,7 @@
+--+
  */
 
-/* $Id: spl_directory.c,v 1.147 2008/02/04 19:33:03 helly Exp $ */
+/* $Id: spl_directory.c,v 1.148 2008/02/04 19:39:07 helly Exp $ */
 
 #ifdef HAVE_CONFIG_H
 # include "config.h"
@@ -1337,7 +1337,7 @@
 }
 /* }}} */
 
-/* forward declarations to the iterator handlers */
+/* {{{ forward declarations to the iterator handlers */
 static void spl_filesystem_dir_it_dtor(zend_object_iterator *iter TSRMLS_DC);
 static int spl_filesystem_dir_it_valid(zend_object_iterator *iter TSRMLS_DC);
 static void spl_filesystem_dir_it_current_data(zend_object_iterator *iter, 
zval ***data TSRMLS_DC);
@@ -1354,6 +1354,7 @@
spl_filesystem_dir_it_move_forward,
spl_filesystem_dir_it_rewind
 };
+/* }}} */
 
 /* {{{ spl_ce_dir_get_iterator */
 zend_object_iterator *spl_filesystem_dir_get_iterator(zend_class_entry *ce, 
zval *object, int by_ref TSRMLS_DC)
@@ -1386,7 +1387,7 @@
iterator->intern.data = NULL; /* mark as unused */
 }
 /* }}} */
-   
+
 /* {{{ spl_filesystem_dir_it_valid */
 static int spl_filesystem_dir_it_valid(zend_object_iterator *iter TSRMLS_DC)
 {
@@ -1396,7 +1397,6 @@
 }
 /* }}} */
 
-
 /* {{{ spl_filesystem_dir_it_current_data */
 static void spl_filesystem_dir_it_current_data(zend_object_iterator *iter, 
zval ***data TSRMLS_DC)
 {
@@ -1455,7 +1455,7 @@
iterator->intern.data = NULL; /* mark as unused */
 }
 /* }}} */
-   
+
 /* {{{ spl_filesystem_tree_it_current_data */
 static void spl_filesystem_tree_it_current_data(zend_object_iterator *iter, 
zval ***data TSRMLS_DC)
 {
@@ -1541,7 +1541,7 @@
 }
 /* }}} */
 
-/* iterator handler table */
+/* {{{ iterator handler table */
 zend_object_iterator_funcs spl_filesystem_tree_it_funcs = {
spl_filesystem_tree_it_dtor,
spl_filesystem_dir_it_valid,
@@ -1550,6 +1550,7 @@
spl_filesystem_tree_it_move_forward,
spl_filesystem_tree_it_rewind
 };
+/* }}} */
 
 /* {{{ spl_ce_dir_get_iterator */
 zend_object_iterator *spl_filesystem_tree_get_iterator(zend_class_entry *ce, 
zval *object, int by_ref TSRMLS_DC)
@@ -1610,7 +1611,7 @@
 }
 /* }}} */
 
-/* declare method parameters */
+/* {{{ declare method parameters */
 /* supply a name and default to call by parameter */
 static
 ZEND_BEGIN_ARG_INFO(arginfo_info___construct, 0) 
@@ -1725,6 +1726,7 @@
SPL_ME(GlobIterator, count, NULL,  
ZEND_ACC_PUBLIC)
{NULL, NULL, NULL}
 };
+/* }}} */
 
 static int spl_filesystem_file_read(spl_filesystem_object *intern, int silent 
TSRMLS_DC) /* {{{ */
 {
@@ -1814,12 +1816,12 @@
return result;
 } /* }}} */
 
-#define FileFunctionCall(func_name, pass_num_args, arg2) \
+#define FileFunctionCall(func_name, pass_num_args, arg2) /* {{{ */\
 { \
zend_function *func_ptr; \
zend_hash_find(EG(function_table), #func_name, sizeof(#func_name), 
(void **) &func_ptr); \
spl_filesystem_file_call(intern, func_ptr, pass_num_args, return_value, 
arg2 TSRMLS_CC); \
-}
+} /* }}} */
 
 static int spl_filesystem_file_read_csv(spl_filesystem_object *intern, char 
delimiter, char enclosure, char escape, zval *return_value TSRMLS_DC) /* {{{ */
 {
@@ -2311,7 +2313,6 @@
RETURN_BOOL(!php_stream_flush(intern->u.file.stream));
 } /* }}} */
 
-
 /* {{{ proto int SplFileObject::ftell() U
Return current file position */
 SPL_METHOD(SplFileObject, ftell)
@@ -2634,7 +2635,6 @@
 }
 /* }}} */
 
-
 /*
  * Local variables:
  * tab-width: 4

-- 
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_array.c /ext/spl/tests array_023.phpt bug41528.phpt bug42654.phpt bug42703.phpt spl_autoload_001.phpt spl_autoload_007.phpt spl_autoload_008.phpt

2008-02-04 Thread Marcus Boerger
helly   Mon Feb  4 16:47:06 2008 UTC

  Modified files:  
/php-src/ext/splspl_array.c 
/php-src/ext/spl/tests  array_023.phpt bug41528.phpt bug42654.phpt 
bug42703.phpt spl_autoload_001.phpt 
spl_autoload_007.phpt spl_autoload_008.phpt 
  Log:
  - Fix ArrayObject serializing
  - Fix test expectations
  
  http://cvs.php.net/viewvc.cgi/php-src/ext/spl/spl_array.c?r1=1.136&r2=1.137&diff_format=u
Index: php-src/ext/spl/spl_array.c
diff -u php-src/ext/spl/spl_array.c:1.136 php-src/ext/spl/spl_array.c:1.137
--- php-src/ext/spl/spl_array.c:1.136   Mon Dec 31 07:12:14 2007
+++ php-src/ext/spl/spl_array.c Mon Feb  4 16:47:06 2008
@@ -16,7 +16,7 @@
+--+
  */
 
-/* $Id: spl_array.c,v 1.136 2007/12/31 07:12:14 sebastian Exp $ */
+/* $Id: spl_array.c,v 1.137 2008/02/04 16:47:06 helly Exp $ */
 
 #ifdef HAVE_CONFIG_H
 # include "config.h"
@@ -1483,16 +1483,14 @@
 {
spl_array_object *intern = 
(spl_array_object*)zend_object_store_get_object(getThis() TSRMLS_CC);

-   zstr buf;
-   unsigned int buf_len;
-   UChar *p, *s;
-   zend_uchar buf_type; 
-   
+   char *buf;
+   int buf_len;
+   const unsigned char *p, *s;
php_unserialize_data_t var_hash;
zval *pentry, *pmembers, *pflags = NULL;
long flags;

-   if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "t", &buf, 
&buf_len, &buf_type) == FAILURE) {
+   if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "s", &buf, 
&buf_len) == FAILURE) {
return;
}
 
@@ -1501,8 +1499,7 @@
return;
}
 
-   s = p = (buf_type == IS_UNICODE ? buf.u : (UChar *)buf.s);
-
+   s = p = (const unsigned char*)buf;
PHP_VAR_UNSERIALIZE_INIT(var_hash);
 
if (*p!= 'x' || *++p != ':') {
@@ -1569,7 +1566,7 @@
 
 outexcept:
PHP_VAR_UNSERIALIZE_DESTROY(var_hash);
-   zend_throw_exception_ex(spl_ce_UnexpectedValueException, 0 TSRMLS_CC, 
"Error at offset %ld of %d bytes", (long)((char*)p - (long)(buf_type == 
IS_UNICODE ? buf.u : (UChar *)buf.s)), buf_len);
+   zend_throw_exception_ex(spl_ce_UnexpectedValueException, 0 TSRMLS_CC, 
"Error at offset %ld of %d bytes", (long)((char*)p - (long)buf), buf_len);
return;
 
 } /* }}} */
http://cvs.php.net/viewvc.cgi/php-src/ext/spl/tests/array_023.phpt?r1=1.2&r2=1.3&diff_format=u
Index: php-src/ext/spl/tests/array_023.phpt
diff -u php-src/ext/spl/tests/array_023.phpt:1.2 
php-src/ext/spl/tests/array_023.phpt:1.3
--- php-src/ext/spl/tests/array_023.phpt:1.2Fri Dec 14 04:49:47 2007
+++ php-src/ext/spl/tests/array_023.phptMon Feb  4 16:47:06 2008
@@ -19,14 +19,14 @@
 var_dump($a);
 var_dump($a->var);
 
-class Sláinte extends ArrayObject
+class Bla extends ArrayObject
 {
-public $var = 'tá';
-protected $bar = 'trí';
-private $foo = 'å¹´';
+public $var = 'aaa';
+protected $bar = 'bbb';
+private $foo = 'ccc';
 }
 
-$a = new Sláinte();
+$a = new Bla();
 var_dump($a);
 var_dump($a->var);
 
@@ -61,27 +61,76 @@
   }
 }
 string(1) "a"
-object(Sláinte)#1 (4) {
+object(Bla)#1 (4) {
   ["var"]=>
-  string(3) "tá"
+  string(3) "aaa"
   ["bar":protected]=>
-  string(4) "trí"
-  ["foo":"Sláinte":private]=>
-  string(3) "å¹´"
+  string(3) "bbb"
+  ["foo":"Bla":private]=>
+  string(3) "ccc"
   ["storage":"ArrayObject":private]=>
   array(0) {
   }
 }
-string(3) "tá"
-object(Sláinte)#2 (4) {
+string(3) "aaa"
+object(Bla)#2 (4) {
   ["var"]=>
-  string(3) "tá"
+  string(3) "aaa"
   ["bar":protected]=>
-  string(4) "trí"
-  ["foo":"Sláinte":private]=>
-  string(3) "å¹´"
+  string(3) "bbb"
+  ["foo":"Bla":private]=>
+  string(3) "ccc"
   ["storage":"ArrayObject":private]=>
   array(0) {
   }
 }
-string(3) "tá"
+string(3) "aaa"
+--UEXPECT--
+object(Name)#1 (4) {
+  [u"var"]=>
+  unicode(1) "a"
+  [u"bar":protected]=>
+  unicode(1) "b"
+  [u"foo":u"Name":private]=>
+  unicode(1) "c"
+  [u"storage":u"ArrayObject":private]=>
+  array(0) {
+  }
+}
+unicode(1) "a"
+object(Name)#2 (4) {
+  [u"var"]=>
+  unicode(1) "a"
+  [u"bar":protected]=>
+  unicode(1) "b"
+  [u"foo":u"Name":private]=>
+  unicode(1) "c"
+  [u"storage":u"ArrayObject":private]=>
+  array(0) {
+  }
+}
+unicode(1) "a"
+object(Bla)#1 (4) {
+  [u"var"]=>
+  unicode(3) "aaa"
+  [u"bar":protected]=>
+  unicode(3) "bbb"
+  [u"foo":u"Bla":private]=>
+  unicode(3) "ccc"
+  [u"storage":u"ArrayObject":private]=>
+  array(0) {
+  }
+}
+unicode(3) "aaa"
+object(Bla)#2 (4) {
+  [u"var"]=>
+  unicode(3) "aaa"
+  [u"bar":protected]=>
+  unicode(3) "bbb"
+  [u"foo":u"Bla":private]=>
+  unicode(3) "ccc"
+  [u"storage":u"ArrayObject":private]=>
+  array(0) {
+  }
+}
+unicode(3) "aaa"
http://cvs.php.net/viewvc.cgi/php-src/ext/spl/tests/bug41528.phpt?r1=1.2&r2=1.3&diff_format=u
Index: php-src/ext/spl/tests/bug41528.phpt
diff -u php-src/ext/

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

2008-02-04 Thread Marcus Boerger
helly   Mon Feb  4 15:58:13 2008 UTC

  Modified files:  
/php-src/ext/splphp_spl.c 
  Log:
  - Fix message
  
http://cvs.php.net/viewvc.cgi/php-src/ext/spl/php_spl.c?r1=1.124&r2=1.125&diff_format=u
Index: php-src/ext/spl/php_spl.c
diff -u php-src/ext/spl/php_spl.c:1.124 php-src/ext/spl/php_spl.c:1.125
--- php-src/ext/spl/php_spl.c:1.124 Sat Feb  2 23:02:16 2008
+++ php-src/ext/spl/php_spl.c   Mon Feb  4 15:58:12 2008
@@ -16,7 +16,7 @@
+--+
  */
 
-/* $Id: php_spl.c,v 1.124 2008/02/02 23:02:16 helly Exp $ */
+/* $Id: php_spl.c,v 1.125 2008/02/04 15:58:12 helly Exp $ */
 
 #ifdef HAVE_CONFIG_H
 #include "config.h"
@@ -447,7 +447,7 @@
RETURN_FALSE;
} else if (Z_TYPE_P(zcallable) == IS_STRING || 
Z_TYPE_P(zcallable) == IS_UNICODE) {
if (do_throw) {
-   
zend_throw_exception_ex(spl_ce_LogicException, 0 TSRMLS_CC, "Function '%R' not 
%s, (%s)", Z_TYPE_P(zcallable), Z_UNIVAL_P(zcallable), alfi.func_ptr ? 
"callable" : "found", error);
+   
zend_throw_exception_ex(spl_ce_LogicException, 0 TSRMLS_CC, "Function '%R' not 
%s (%s)", Z_TYPE_P(zcallable), Z_UNIVAL_P(zcallable), alfi.func_ptr ? 
"callable" : "found", error);
}
if (error) {
efree(error);

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



[PHP-CVS] cvs: php-src /ext/mysqli/tests bug35759.phpt /ext/mysqlnd mysqlnd_block_alloc.c mysqlnd_result.c

2008-02-04 Thread Andrey Hristov
andrey  Mon Feb  4 17:32:43 2008 UTC

  Modified files:  
/php-src/ext/mysqli/tests   bug35759.phpt 
/php-src/ext/mysqlndmysqlnd_block_alloc.c mysqlnd_result.c 
  Log:
  Fix a leak and memory warning.
  
  
http://cvs.php.net/viewvc.cgi/php-src/ext/mysqli/tests/bug35759.phpt?r1=1.4&r2=1.5&diff_format=u
Index: php-src/ext/mysqli/tests/bug35759.phpt
diff -u php-src/ext/mysqli/tests/bug35759.phpt:1.4 
php-src/ext/mysqli/tests/bug35759.phpt:1.5
--- php-src/ext/mysqli/tests/bug35759.phpt:1.4  Thu Aug  9 09:43:28 2007
+++ php-src/ext/mysqli/tests/bug35759.phpt  Mon Feb  4 17:32:43 2008
@@ -32,7 +32,9 @@
$stmt = $mysql->prepare("SELECT * FROM blobby");
$stmt->execute();
$stmt->store_result();
-   $params= array_pad(array(), $col_num, "");
+   for ($i = 0; $i < $col_num; $i++) {
+   $params[] = &$col_num;
+   }
call_user_func_array(array($stmt, "bind_result"), $params);
$stmt->fetch();

http://cvs.php.net/viewvc.cgi/php-src/ext/mysqlnd/mysqlnd_block_alloc.c?r1=1.3&r2=1.4&diff_format=u
Index: php-src/ext/mysqlnd/mysqlnd_block_alloc.c
diff -u php-src/ext/mysqlnd/mysqlnd_block_alloc.c:1.3 
php-src/ext/mysqlnd/mysqlnd_block_alloc.c:1.4
--- php-src/ext/mysqlnd/mysqlnd_block_alloc.c:1.3   Tue Jan 29 22:06:16 2008
+++ php-src/ext/mysqlnd/mysqlnd_block_alloc.c   Mon Feb  4 17:32:43 2008
@@ -18,7 +18,7 @@
   +--+
 */
 
-/* $Id: mysqlnd_block_alloc.c,v 1.3 2008/01/29 22:06:16 rrichards Exp $ */
+/* $Id: mysqlnd_block_alloc.c,v 1.4 2008/02/04 17:32:43 andrey Exp $ */
 
 #include "php.h"
 #include "mysqlnd.h"
@@ -186,6 +186,7 @@
/* mnd_free will reference LOCK_access and might crash, depending on 
the caller...*/
mysqlnd_mempool_free_contents(pool TSRMLS_CC);
mnd_free(pool->arena);
+   mnd_free(pool);
DBG_VOID_RETURN;
 }
 /* }}} */
http://cvs.php.net/viewvc.cgi/php-src/ext/mysqlnd/mysqlnd_result.c?r1=1.15&r2=1.16&diff_format=u
Index: php-src/ext/mysqlnd/mysqlnd_result.c
diff -u php-src/ext/mysqlnd/mysqlnd_result.c:1.15 
php-src/ext/mysqlnd/mysqlnd_result.c:1.16
--- php-src/ext/mysqlnd/mysqlnd_result.c:1.15   Tue Jan 29 22:06:16 2008
+++ php-src/ext/mysqlnd/mysqlnd_result.cMon Feb  4 17:32:43 2008
@@ -18,8 +18,7 @@
   +--+
 */
 
-/* $Id: mysqlnd_result.c,v 1.15 2008/01/29 22:06:16 rrichards Exp $ */
-
+/* $Id: mysqlnd_result.c,v 1.16 2008/02/04 17:32:43 andrey Exp $ */
 #include "php.h"
 #include "mysqlnd.h"
 #include "mysqlnd_wireprotocol.h"
@@ -352,8 +351,6 @@
result->row_packet = NULL;
}
 
-   result->conn = NULL;
-
if (result->meta) {
result->meta->m->free_metadata(result->meta, FALSE TSRMLS_CC);
result->meta = NULL;
@@ -375,12 +372,14 @@
 void mysqlnd_internal_free_result(MYSQLND_RES *result TSRMLS_DC)
 {
DBG_ENTER("mysqlnd_internal_free_result");
+
+   result->m.free_result_contents(result TSRMLS_CC);
+
if (result->conn) {
result->conn->m->free_reference(result->conn TSRMLS_CC);
result->conn = NULL;
}
 
-   result->m.free_result_contents(result TSRMLS_CC);
efree(result);
 
DBG_VOID_RETURN;

-- 
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/mysqli/tests bug35759.phpt /ext/mysqlnd mysqlnd_block_alloc.c mysqlnd_result.c

2008-02-04 Thread Andrey Hristov
andrey  Mon Feb  4 17:33:46 2008 UTC

  Modified files:  (Branch: PHP_5_3)
/php-src/ext/mysqli/tests   bug35759.phpt 
/php-src/ext/mysqlndmysqlnd_block_alloc.c mysqlnd_result.c 
  Log:
  Fix a leak, memory warning and failing test case.
  
  
http://cvs.php.net/viewvc.cgi/php-src/ext/mysqli/tests/bug35759.phpt?r1=1.1.2.1.2.1.2.1&r2=1.1.2.1.2.1.2.2&diff_format=u
Index: php-src/ext/mysqli/tests/bug35759.phpt
diff -u php-src/ext/mysqli/tests/bug35759.phpt:1.1.2.1.2.1.2.1 
php-src/ext/mysqli/tests/bug35759.phpt:1.1.2.1.2.1.2.2
--- php-src/ext/mysqli/tests/bug35759.phpt:1.1.2.1.2.1.2.1  Wed Oct 10 
10:10:59 2007
+++ php-src/ext/mysqli/tests/bug35759.phpt  Mon Feb  4 17:33:46 2008
@@ -32,7 +32,9 @@
$stmt = $mysql->prepare("SELECT * FROM blobby");
$stmt->execute();
$stmt->store_result();
-   $params= array_pad(array(), $col_num, "");
+   for ($i = 0; $i < $col_num; $i++) {
+   $params[] = &$col_num;
+   }
call_user_func_array(array($stmt, "bind_result"), $params);
$stmt->fetch();

http://cvs.php.net/viewvc.cgi/php-src/ext/mysqlnd/mysqlnd_block_alloc.c?r1=1.1.2.2&r2=1.1.2.3&diff_format=u
Index: php-src/ext/mysqlnd/mysqlnd_block_alloc.c
diff -u php-src/ext/mysqlnd/mysqlnd_block_alloc.c:1.1.2.2 
php-src/ext/mysqlnd/mysqlnd_block_alloc.c:1.1.2.3
--- php-src/ext/mysqlnd/mysqlnd_block_alloc.c:1.1.2.2   Tue Jan 29 22:06:43 2008
+++ php-src/ext/mysqlnd/mysqlnd_block_alloc.c   Mon Feb  4 17:33:46 2008
@@ -18,7 +18,7 @@
   +--+
 */
 
-/* $Id: mysqlnd_block_alloc.c,v 1.1.2.2 2008/01/29 22:06:43 rrichards Exp $ */
+/* $Id: mysqlnd_block_alloc.c,v 1.1.2.3 2008/02/04 17:33:46 andrey Exp $ */
 
 #include "php.h"
 #include "mysqlnd.h"
@@ -186,6 +186,7 @@
/* mnd_free will reference LOCK_access and might crash, depending on 
the caller...*/
mysqlnd_mempool_free_contents(pool TSRMLS_CC);
mnd_free(pool->arena);
+   mnd_free(pool);
DBG_VOID_RETURN;
 }
 /* }}} */
http://cvs.php.net/viewvc.cgi/php-src/ext/mysqlnd/mysqlnd_result.c?r1=1.4.2.11&r2=1.4.2.12&diff_format=u
Index: php-src/ext/mysqlnd/mysqlnd_result.c
diff -u php-src/ext/mysqlnd/mysqlnd_result.c:1.4.2.11 
php-src/ext/mysqlnd/mysqlnd_result.c:1.4.2.12
--- php-src/ext/mysqlnd/mysqlnd_result.c:1.4.2.11   Tue Jan 29 22:06:43 2008
+++ php-src/ext/mysqlnd/mysqlnd_result.cMon Feb  4 17:33:46 2008
@@ -18,7 +18,7 @@
   +--+
 */
 
-/* $Id: mysqlnd_result.c,v 1.4.2.11 2008/01/29 22:06:43 rrichards Exp $ */
+/* $Id: mysqlnd_result.c,v 1.4.2.12 2008/02/04 17:33:46 andrey Exp $ */
 #include "php.h"
 #include "mysqlnd.h"
 #include "mysqlnd_wireprotocol.h"
@@ -351,8 +351,6 @@
result->row_packet = NULL;
}
 
-   result->conn = NULL;
-
if (result->meta) {
result->meta->m->free_metadata(result->meta, FALSE TSRMLS_CC);
result->meta = NULL;
@@ -374,12 +372,14 @@
 void mysqlnd_internal_free_result(MYSQLND_RES *result TSRMLS_DC)
 {
DBG_ENTER("mysqlnd_internal_free_result");
+
+   result->m.free_result_contents(result TSRMLS_CC);
+
if (result->conn) {
result->conn->m->free_reference(result->conn TSRMLS_CC);
result->conn = NULL;
}
 
-   result->m.free_result_contents(result TSRMLS_CC);
efree(result);
 
DBG_VOID_RETURN;

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



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

2008-02-04 Thread Andrey Hristov
andrey  Mon Feb  4 17:55:51 2008 UTC

  Modified files:  
/php-src/ext/mysqlndmysqlnd.c 
  Log:
  MFB: Simplify unique string generation and plug a leak.
  
  
http://cvs.php.net/viewvc.cgi/php-src/ext/mysqlnd/mysqlnd.c?r1=1.16&r2=1.17&diff_format=u
Index: php-src/ext/mysqlnd/mysqlnd.c
diff -u php-src/ext/mysqlnd/mysqlnd.c:1.16 php-src/ext/mysqlnd/mysqlnd.c:1.17
--- php-src/ext/mysqlnd/mysqlnd.c:1.16  Tue Jan 29 18:13:12 2008
+++ php-src/ext/mysqlnd/mysqlnd.c   Mon Feb  4 17:55:51 2008
@@ -18,7 +18,7 @@
   +--+
 */
 
-/* $Id: mysqlnd.c,v 1.16 2008/01/29 18:13:12 andrey Exp $ */
+/* $Id: mysqlnd.c,v 1.17 2008/02/04 17:55:51 andrey Exp $ */
 #include "php.h"
 #include "mysqlnd.h"
 #include "mysqlnd_wireprotocol.h"
@@ -28,8 +28,6 @@
 #include "mysqlnd_charset.h"
 #include "mysqlnd_debug.h"
 #include "mysqlnd_block_alloc.h"
-#include "ext/standard/basic_functions.h"
-#include "ext/standard/php_lcg.h"
 
 /* the server doesn't support 4byte utf8, but let's make it forward compatible 
*/
 #define MYSQLND_MAX_ALLOWED_USER_LEN   256  /* 64 char * 4byte */
@@ -544,15 +542,6 @@
}
DBG_INF_FMT("transport=%p", transport);
 
-   if (conn->persistent) {
-   struct timeval tv;
-   gettimeofday(&tv, NULL);
-   /* We should generate something unique */
-   hashed_details_len = spprintf(&hashed_details, 0, "[EMAIL 
PROTECTED]@[EMAIL PROTECTED]@[EMAIL PROTECTED]",
- 
transport, user, db, tv.tv_sec, (long int)tv.tv_usec,
- 
php_combined_lcg(TSRMLS_C) * 10);
-   DBG_INF_FMT("hashed_details=%s", hashed_details);
-   } 
 
PACKET_INIT_ALLOCA(greet_packet, PROT_GREET_PACKET);
PACKET_INIT(auth_packet, PROT_AUTH_PACKET, php_mysql_packet_auth *);
@@ -563,6 +552,19 @@
self_alloced = TRUE;
}
 
+   if (conn->persistent) {
+#if 0
+   struct timeval tv;
+   gettimeofday(&tv, NULL);
+   /* We should generate something unique */
+   hashed_details_len = spprintf(&hashed_details, 0, "[EMAIL 
PROTECTED]@[EMAIL PROTECTED]@[EMAIL PROTECTED]",
+ 
transport, user, db, tv.tv_sec, (long int)tv.tv_usec,
+ 
php_combined_lcg(TSRMLS_C) * 10);
+#endif
+   hashed_details_len = spprintf(&hashed_details, 0, "%p", conn);
+   DBG_INF_FMT("hashed_details=%s", hashed_details);
+   } 
+
CONN_SET_STATE(conn, CONN_ALLOCED);
conn->net.packet_no = 0;
 
@@ -584,6 +586,9 @@
DBG_INF_FMT("stream=%p", conn->net.stream);
 
if (errstr || !conn->net.stream) {
+   if (hashed_details) {
+   mnd_efree(hashed_details);
+   }
goto 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/spl spl.php

2008-02-04 Thread Marcus Boerger
helly   Mon Feb  4 20:40:47 2008 UTC

  Modified files:  (Branch: PHP_5_3)
/php-src/ext/splspl.php 
  Log:
  - MFH Update docu
  http://cvs.php.net/viewvc.cgi/php-src/ext/spl/spl.php?r1=1.49.2.11.2.7.2.1&r2=1.49.2.11.2.7.2.2&diff_format=u
Index: php-src/ext/spl/spl.php
diff -u php-src/ext/spl/spl.php:1.49.2.11.2.7.2.1 
php-src/ext/spl/spl.php:1.49.2.11.2.7.2.2
--- php-src/ext/spl/spl.php:1.49.2.11.2.7.2.1   Mon Jan 21 21:55:55 2008
+++ php-src/ext/spl/spl.php Mon Feb  4 20:40:47 2008
@@ -13,25 +13,25 @@
  *
  * SPL - Standard PHP Library
  *
- * SPL is a collection of interfaces and classes that are meant to solve 
- * standard problems and implements some efficient data access interfaces 
- * and classes. You'll find the classes documented using php code in the 
- * file spl.php or in corresponding .inc files in subdirectories examples 
- * and internal. Based on the internal implementations or the files in the 
+ * SPL is a collection of interfaces and classes that are meant to solve
+ * standard problems and implements some efficient data access interfaces
+ * and classes. You'll find the classes documented using php code in the
+ * file spl.php or in corresponding .inc files in subdirectories examples
+ * and internal. Based on the internal implementations or the files in the
  * examples subdirectory there are also some .php files to experiment with.
- * 
- * The .inc files are not included automatically because they are sooner or 
- * later integrated into the extension. That means that you either need to 
- * put the code of examples/autoload.inc into your autoprepend file or that 
+ *
+ * The .inc files are not included automatically because they are sooner or
+ * later integrated into the extension. That means that you either need to
+ * put the code of examples/autoload.inc into your autoprepend file or that
  * you have to point your ini setting auto_prepend_file to that file.
- * 
+ *
  * Below is a list of interfaces/classes already availabel natively through
  * the SPL extension grouped by category.
- * 
+ *
  * 1) Iterators
- * 
+ *
  * SPL offers some advanced iterator algorithms:
- * 
+ *
  * - interface RecursiveIterator extends Iterator
  * - interface OuterIterator extends Iterator
  * - class RecursiveIteratorIterator implements OuterIterator
@@ -48,32 +48,35 @@
  * - class AppendIterator implements OuterIterator
  * - class RegexIterator extends FilterIterator
  * - class RecursiveRegexIterator extends RegexIterator implements 
RecursiveIterator
- * 
+ *
  * 2) Directories and Files
- * 
+ *
  * SPL offers two advanced directory and file handling classes:
- * 
+ *
  * - class SplFileInfo
  * - class DirectoryIterator extends SplFileInfo implements Iterator
- * - class RecursiveDirectoryIterator extends DirectoryIterator implements 
RecursiveIterator
+ * - class filesystemIterator extends DirectoryIterator
+ * - class RecursiveDirectoryIterator extends FilesystemIterator implements 
RecursiveIterator
+ * - class GlobIterator extends FilesystemIterator implements Countable
  * - class SplFileObject extends SplFileInfo implements RecursiveIterator, 
SeekableIterator
- * 
+ * - class SplTempFileObject extends SplFileObject
+ *
  * 3) XML
- * 
+ *
  * SPL offers an advanced XML handling class:
- * 
+ *
  * - class SimpleXMLIterator extends simplexml_element implements 
RecursiveIterator
- * 
+ *
  * 4) Array Overloading
- * 
+ *
  * SPL offers advanced Array overloading:
- * 
+ *
  * - class ArrayObject implements IteratorAggregate, ArrayAccess, Countable
  * - class ArrayIterator implements Iterator, ArrayAccess, Countable, 
SeekableIterator
  * - class RecursiveArrayIterator extends ArrayIterator implements 
RecursiveIterator
- * 
+ *
  * As the above suggest an ArrayObject creates an ArrayIterator when it comes 
to
- * iteration (e.g. ArrayObject instance used inside foreach). 
+ * iteration (e.g. ArrayObject instance used inside foreach).
  *
  * 5) Counting
  *
@@ -81,7 +84,7 @@
  *
  * 6) Exception%s
  *
- * SPL provides a set of standard Exception classes each meant to indicate a 
+ * SPL provides a set of standard Exception classes each meant to indicate a
  * certain problem type.
  *
  * - class LogicException   extends Exception
@@ -115,10 +118,10 @@
  *
  * 9) @ref Examples
  *
- * The classes and interfaces in this group are contained as PHP code in the 
+ * The classes and interfaces in this group are contained as PHP code in the
  * examples subdirectory of ext/SPL. Sooner or later they will be moved to
  * c-code.
- * 
+ *
  * 10) Some articles about SPL:
  * - http://www.phpro.org/tutorials/Introduction-to-SPL.html";>Introduction to 
Standard PHP Library (SPL)
  * - http://www.sitepoint.com/article/php5-standard-library/1";>Introducing PHP 
5's Standard Library
@@ -139,7 +142,7 @@
  * - Debug session 2 http://talks.somabo.de/200509_toronto_iterator_debug_session_1.pps";>[pps],
 http://talks.somabo.de/200509_toronto_iterator_debug_se

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

2008-02-04 Thread Marcus Boerger
helly   Mon Feb  4 20:40:29 2008 UTC

  Modified files:  
/php-src/ext/splspl.php 
  Log:
  - Update docu
  http://cvs.php.net/viewvc.cgi/php-src/ext/spl/spl.php?r1=1.81&r2=1.82&diff_format=u
Index: php-src/ext/spl/spl.php
diff -u php-src/ext/spl/spl.php:1.81 php-src/ext/spl/spl.php:1.82
--- php-src/ext/spl/spl.php:1.81Mon Jan 21 21:54:00 2008
+++ php-src/ext/spl/spl.php Mon Feb  4 20:40:29 2008
@@ -13,25 +13,25 @@
  *
  * SPL - Standard PHP Library
  *
- * SPL is a collection of interfaces and classes that are meant to solve 
- * standard problems and implements some efficient data access interfaces 
- * and classes. You'll find the classes documented using php code in the 
- * file spl.php or in corresponding .inc files in subdirectories examples 
- * and internal. Based on the internal implementations or the files in the 
+ * SPL is a collection of interfaces and classes that are meant to solve
+ * standard problems and implements some efficient data access interfaces
+ * and classes. You'll find the classes documented using php code in the
+ * file spl.php or in corresponding .inc files in subdirectories examples
+ * and internal. Based on the internal implementations or the files in the
  * examples subdirectory there are also some .php files to experiment with.
- * 
- * The .inc files are not included automatically because they are sooner or 
- * later integrated into the extension. That means that you either need to 
- * put the code of examples/autoload.inc into your autoprepend file or that 
+ *
+ * The .inc files are not included automatically because they are sooner or
+ * later integrated into the extension. That means that you either need to
+ * put the code of examples/autoload.inc into your autoprepend file or that
  * you have to point your ini setting auto_prepend_file to that file.
- * 
+ *
  * Below is a list of interfaces/classes already availabel natively through
  * the SPL extension grouped by category.
- * 
+ *
  * 1) Iterators
- * 
+ *
  * SPL offers some advanced iterator algorithms:
- * 
+ *
  * - interface RecursiveIterator extends Iterator
  * - interface OuterIterator extends Iterator
  * - class RecursiveIteratorIterator implements OuterIterator
@@ -48,32 +48,35 @@
  * - class AppendIterator implements OuterIterator
  * - class RegexIterator extends FilterIterator
  * - class RecursiveRegexIterator extends RegexIterator implements 
RecursiveIterator
- * 
+ *
  * 2) Directories and Files
- * 
+ *
  * SPL offers two advanced directory and file handling classes:
- * 
+ *
  * - class SplFileInfo
  * - class DirectoryIterator extends SplFileInfo implements Iterator
- * - class RecursiveDirectoryIterator extends DirectoryIterator implements 
RecursiveIterator
+ * - class FilesystemIterator extends DirectoryIterator
+ * - class RecursiveDirectoryIterator extends FilesystemIterator implements 
RecursiveIterator
+ * - class GlobIterator extends FilesystemIterator implements Countable
  * - class SplFileObject extends SplFileInfo implements RecursiveIterator, 
SeekableIterator
- * 
+ * - class SplTempFileObject extends SplFileObject
+ *
  * 3) XML
- * 
+ *
  * SPL offers an advanced XML handling class:
- * 
+ *
  * - class SimpleXMLIterator extends simplexml_element implements 
RecursiveIterator
- * 
+ *
  * 4) Array Overloading
- * 
+ *
  * SPL offers advanced Array overloading:
- * 
+ *
  * - class ArrayObject implements IteratorAggregate, ArrayAccess, Countable
  * - class ArrayIterator implements Iterator, ArrayAccess, Countable, 
SeekableIterator
  * - class RecursiveArrayIterator extends ArrayIterator implements 
RecursiveIterator
- * 
+ *
  * As the above suggest an ArrayObject creates an ArrayIterator when it comes 
to
- * iteration (e.g. ArrayObject instance used inside foreach). 
+ * iteration (e.g. ArrayObject instance used inside foreach).
  *
  * 5) Counting
  *
@@ -81,7 +84,7 @@
  *
  * 6) Exception%s
  *
- * SPL provides a set of standard Exception classes each meant to indicate a 
+ * SPL provides a set of standard Exception classes each meant to indicate a
  * certain problem type.
  *
  * - class LogicException   extends Exception
@@ -115,10 +118,10 @@
  *
  * 9) @ref Examples
  *
- * The classes and interfaces in this group are contained as PHP code in the 
+ * The classes and interfaces in this group are contained as PHP code in the
  * examples subdirectory of ext/SPL. Sooner or later they will be moved to
  * c-code.
- * 
+ *
  * 10) Some articles about SPL:
  * - http://www.phpro.org/tutorials/Introduction-to-SPL.html";>Introduction to 
Standard PHP Library (SPL)
  * - http://www.sitepoint.com/article/php5-standard-library/1";>Introducing PHP 
5's Standard Library
@@ -139,7 +142,7 @@
  * - Debug session 2 http://talks.somabo.de/200509_toronto_iterator_debug_session_1.pps";>[pps],
 http://talks.somabo.de/200509_toronto_iterator_debug_session_1.pdf";>[pdf],
 http://taks.somabo.de/200411_php_conference_frankfrurt_itera

[PHP-CVS] cvs: php-src(PHP_5_2) / NEWS /ext/gmp gmp.c

2008-02-04 Thread Ilia Alshanetsky
iliaa   Mon Feb  4 21:31:52 2008 UTC

  Modified files:  (Branch: PHP_5_2)
/php-src/ext/gmpgmp.c 
/php-srcNEWS 
  Log:
  
  Revert fix for bug #43981, not yet ready for 5.2
  
http://cvs.php.net/viewvc.cgi/php-src/ext/gmp/gmp.c?r1=1.49.2.2.2.13&r2=1.49.2.2.2.14&diff_format=u
Index: php-src/ext/gmp/gmp.c
diff -u php-src/ext/gmp/gmp.c:1.49.2.2.2.13 php-src/ext/gmp/gmp.c:1.49.2.2.2.14
--- php-src/ext/gmp/gmp.c:1.49.2.2.2.13 Wed Jan 30 18:27:03 2008
+++ php-src/ext/gmp/gmp.c   Mon Feb  4 21:31:52 2008
@@ -552,9 +552,6 @@
if (use_ui && gmp_ui_op) {
if (allow_ui_return) {
long_result = gmp_ui_op(*gmpnum_result, *gmpnum_a, 
(unsigned long)Z_LVAL_PP(b_arg));
-   if (mpz_sgn(*gmpnum_a) == -1) {
-   long_result = -long_result;
-   }
} else {
gmp_ui_op(*gmpnum_result, *gmpnum_a, (unsigned 
long)Z_LVAL_PP(b_arg));
}
http://cvs.php.net/viewvc.cgi/php-src/NEWS?r1=1.2027.2.547.2.1072&r2=1.2027.2.547.2.1073&diff_format=u
Index: php-src/NEWS
diff -u php-src/NEWS:1.2027.2.547.2.1072 php-src/NEWS:1.2027.2.547.2.1073
--- php-src/NEWS:1.2027.2.547.2.1072Mon Feb  4 19:43:34 2008
+++ php-src/NEWSMon Feb  4 21:31:52 2008
@@ -11,8 +11,6 @@
 
 - Fixed bug #44028 (crash inside stream_socket_enable_crypto() when enabling  
   encryption without crypto type). (Ilia)
-- Fixed bug #43981 (gmp_div_r() does not preserve the sign of 1st argument).
-  (Ilia)
 - Fixed bug #43954 (Memory leak when sending the same HTTP status code
   multiple times). (Scott)
 - Fixed bug #43927 (koi8r is missing from html_entity_decode()). 

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



[PHP-CVS] cvs: php-src(PHP_5_3) /ext/standard/tests/general_functions parse_ini_basic.data parse_ini_basic.phpt parse_ini_booleans.data parse_ini_booleans.phpt ZendEngine2 zend_ini_parser.y zend_ini_

2008-02-04 Thread Jani Taskinen
janiMon Feb  4 20:45:20 2008 UTC

  Modified files:  (Branch: PHP_5_3)
/ZendEngine2zend_ini_parser.y zend_ini_scanner.l 
/php-src/ext/standard/tests/general_functions   parse_ini_basic.data 
parse_ini_basic.phpt 
parse_ini_booleans.data 
parse_ini_booleans.phpt 
  Log:
  MFH: - Fixed bugs #43915, #43923 and #44019, a tiny performance issue fixed 
too
  http://cvs.php.net/viewvc.cgi/ZendEngine2/zend_ini_parser.y?r1=1.41.2.2.2.2.2.3&r2=1.41.2.2.2.2.2.4&diff_format=u
Index: ZendEngine2/zend_ini_parser.y
diff -u ZendEngine2/zend_ini_parser.y:1.41.2.2.2.2.2.3 
ZendEngine2/zend_ini_parser.y:1.41.2.2.2.2.2.4
--- ZendEngine2/zend_ini_parser.y:1.41.2.2.2.2.2.3  Mon Dec 31 07:17:04 2007
+++ ZendEngine2/zend_ini_parser.y   Mon Feb  4 20:45:20 2008
@@ -18,7 +18,7 @@
+--+
 */
 
-/* $Id: zend_ini_parser.y,v 1.41.2.2.2.2.2.3 2007/12/31 07:17:04 sebastian Exp 
$ */
+/* $Id: zend_ini_parser.y,v 1.41.2.2.2.2.2.4 2008/02/04 20:45:20 jani Exp $ */
 
 #define DEBUG_CFG_PARSER 0
 
@@ -246,13 +246,16 @@
 
 %}
 
-%expect 1
+%expect 0
 %pure_parser
 
 %token TC_SECTION
 %token TC_RAW
+%token TC_CONSTANT
 %token TC_NUMBER
 %token TC_STRING
+%token TC_WHITESPACE
+%token TC_LABEL
 %token TC_OFFSET
 %token TC_DOLLAR_CURLY
 %token TC_VARNAME
@@ -260,7 +263,7 @@
 %token BOOL_TRUE
 %token BOOL_FALSE
 %token END_OF_LINE
-%token '=' ':' ',' '.' '"' '\'' '^' '+' '-' '/' '*' '%' '$' '~' '<' '>' '?' '@'
+%token '=' ':' ',' '.' '"' '\'' '^' '+' '-' '/' '*' '%' '$' '~' '<' '>' '?' 
'@' '{' '}'
 %left '|' '&'
 %right '~' '!'
 
@@ -279,7 +282,7 @@
ZEND_INI_PARSER_CB(&$2, NULL, NULL, 
ZEND_INI_PARSER_SECTION, ZEND_INI_PARSER_ARG TSRMLS_CC);
free(Z_STRVAL($2));
}
-   |   TC_STRING '=' string_or_value {
+   |   TC_LABEL '=' string_or_value {
 #if DEBUG_CFG_PARSER
printf("NORMAL: '%s' = '%s'\n", Z_STRVAL($1), 
Z_STRVAL($3));
 #endif
@@ -296,32 +299,24 @@
free(Z_STRVAL($2));
free(Z_STRVAL($5));
}
-   |   TC_STRING   { ZEND_INI_PARSER_CB(&$1, NULL, NULL, 
ZEND_INI_PARSER_ENTRY, ZEND_INI_PARSER_ARG TSRMLS_CC); free(Z_STRVAL($1)); }
+   |   TC_LABEL{ ZEND_INI_PARSER_CB(&$1, NULL, NULL, 
ZEND_INI_PARSER_ENTRY, ZEND_INI_PARSER_ARG TSRMLS_CC); free(Z_STRVAL($1)); }
|   END_OF_LINE
 ;
 
 section_string_or_value:
-   TC_RAW  { $$ = 
$1; }
-   |   section_var_list{ $$ = $1; }
-   |   '"' encapsed_list '"'   { $$ = $2; }
+   var_string_list { $$ = $1; }
|   /* empty */ { 
zend_ini_init_string(&$$); }
 ;
 
 string_or_value:
expr{ $$ = 
$1; }
-   |   TC_RAW  { $$ = 
$1; }
-   |   TC_NUMBER   { $$ = 
$1; }
|   BOOL_TRUE   { $$ = 
$1; }
|   BOOL_FALSE  { $$ = 
$1; }
-   |   '"' encapsed_list '"'   { $$ = $2; }
|   END_OF_LINE { 
zend_ini_init_string(&$$); }
 ;
 
 option_offset:
-   TC_NUMBER   { $$ = 
$1; }
-   |   TC_RAW  { $$ = 
$1; }
-   |   var_string_list { $$ = $1; }
-   |   '"' encapsed_list '"'   { $$ = $2; }
+   var_string_list { $$ = $1; }
|   /* empty */ { 
zend_ini_init_string(&$$); }
 ;
 
@@ -331,18 +326,13 @@
|   /* empty */ { 
zend_ini_init_string(&$$); }
 ;
 
-section_var_list:
-   cfg_var_ref { $$ = 
$1; }
-   |   TC_STRING   { $$ = 
$1; }
-   |   section_var_list cfg_var_ref{ zend_ini_add_string(&$$, &$1, 
&$2); free(Z_STRVAL($2)); }
-   |   section_var_list TC_STRING  { 
zend_ini_add_string(&$$, &$1, &$2); free(Z_STRVAL($2)); }
-;
-
 var_string_list:
cfg_var_ref { $$ = 
$1; }
|   constant_string { $$ = $1; }
+ 

[PHP-CVS] cvs: php-src(PHP_5_3) /main main.c

2008-02-04 Thread Jani Taskinen
janiMon Feb  4 20:39:21 2008 UTC

  Modified files:  (Branch: PHP_5_3)
/php-src/main   main.c 
  Log:
  MFH: allow using these constants in php.ini (f.e. PHP_SAPI..)
  
http://cvs.php.net/viewvc.cgi/php-src/main/main.c?r1=1.640.2.23.2.57.2.7&r2=1.640.2.23.2.57.2.8&diff_format=u
Index: php-src/main/main.c
diff -u php-src/main/main.c:1.640.2.23.2.57.2.7 
php-src/main/main.c:1.640.2.23.2.57.2.8
--- php-src/main/main.c:1.640.2.23.2.57.2.7 Tue Jan 22 09:27:48 2008
+++ php-src/main/main.c Mon Feb  4 20:39:21 2008
@@ -18,7 +18,7 @@
+--+
 */
 
-/* $Id: main.c,v 1.640.2.23.2.57.2.7 2008/01/22 09:27:48 dmitry Exp $ */
+/* $Id: main.c,v 1.640.2.23.2.57.2.8 2008/02/04 20:39:21 jani Exp $ */
 
 /* {{{ includes
  */
@@ -1741,6 +1741,30 @@
 
le_index_ptr = zend_register_list_destructors_ex(NULL, NULL, "index 
pointer", 0);
 
+   /* Register constants */
+   REGISTER_MAIN_STRINGL_CONSTANT("PHP_VERSION", PHP_VERSION, 
sizeof(PHP_VERSION)-1, CONST_PERSISTENT | CONST_CS);
+   REGISTER_MAIN_STRINGL_CONSTANT("PHP_OS", php_os, strlen(php_os), 
CONST_PERSISTENT | CONST_CS);
+   REGISTER_MAIN_STRINGL_CONSTANT("PHP_SAPI", sapi_module.name, 
strlen(sapi_module.name), CONST_PERSISTENT | CONST_CS);
+   REGISTER_MAIN_STRINGL_CONSTANT("DEFAULT_INCLUDE_PATH", 
PHP_INCLUDE_PATH, sizeof(PHP_INCLUDE_PATH)-1, CONST_PERSISTENT | CONST_CS);
+   REGISTER_MAIN_STRINGL_CONSTANT("PEAR_INSTALL_DIR", PEAR_INSTALLDIR, 
sizeof(PEAR_INSTALLDIR)-1, CONST_PERSISTENT | CONST_CS);
+   REGISTER_MAIN_STRINGL_CONSTANT("PEAR_EXTENSION_DIR", PHP_EXTENSION_DIR, 
sizeof(PHP_EXTENSION_DIR)-1, CONST_PERSISTENT | CONST_CS);
+   REGISTER_MAIN_STRINGL_CONSTANT("PHP_EXTENSION_DIR", PHP_EXTENSION_DIR, 
sizeof(PHP_EXTENSION_DIR)-1, CONST_PERSISTENT | CONST_CS);
+   REGISTER_MAIN_STRINGL_CONSTANT("PHP_PREFIX", PHP_PREFIX, 
sizeof(PHP_PREFIX)-1, CONST_PERSISTENT | CONST_CS);
+   REGISTER_MAIN_STRINGL_CONSTANT("PHP_BINDIR", PHP_BINDIR, 
sizeof(PHP_BINDIR)-1, CONST_PERSISTENT | CONST_CS);
+   REGISTER_MAIN_STRINGL_CONSTANT("PHP_LIBDIR", PHP_LIBDIR, 
sizeof(PHP_LIBDIR)-1, CONST_PERSISTENT | CONST_CS);
+   REGISTER_MAIN_STRINGL_CONSTANT("PHP_DATADIR", PHP_DATADIR, 
sizeof(PHP_DATADIR)-1, CONST_PERSISTENT | CONST_CS);
+   REGISTER_MAIN_STRINGL_CONSTANT("PHP_SYSCONFDIR", PHP_SYSCONFDIR, 
sizeof(PHP_SYSCONFDIR)-1, CONST_PERSISTENT | CONST_CS);
+   REGISTER_MAIN_STRINGL_CONSTANT("PHP_LOCALSTATEDIR", PHP_LOCALSTATEDIR, 
sizeof(PHP_LOCALSTATEDIR)-1, CONST_PERSISTENT | CONST_CS);
+   REGISTER_MAIN_STRINGL_CONSTANT("PHP_CONFIG_FILE_PATH", 
PHP_CONFIG_FILE_PATH, strlen(PHP_CONFIG_FILE_PATH), CONST_PERSISTENT | 
CONST_CS);
+   REGISTER_MAIN_STRINGL_CONSTANT("PHP_CONFIG_FILE_SCAN_DIR", 
PHP_CONFIG_FILE_SCAN_DIR, sizeof(PHP_CONFIG_FILE_SCAN_DIR)-1, CONST_PERSISTENT 
| CONST_CS);
+   REGISTER_MAIN_STRINGL_CONSTANT("PHP_SHLIB_SUFFIX", PHP_SHLIB_SUFFIX, 
sizeof(PHP_SHLIB_SUFFIX)-1, CONST_PERSISTENT | CONST_CS);
+   REGISTER_MAIN_STRINGL_CONSTANT("PHP_EOL", PHP_EOL, sizeof(PHP_EOL)-1, 
CONST_PERSISTENT | CONST_CS);
+   REGISTER_MAIN_LONG_CONSTANT("PHP_INT_MAX", LONG_MAX, CONST_PERSISTENT | 
CONST_CS);
+   REGISTER_MAIN_LONG_CONSTANT("PHP_INT_SIZE", sizeof(long), 
CONST_PERSISTENT | CONST_CS);
+
+   php_output_register_constants(TSRMLS_C);
+   php_rfc1867_register_constants(TSRMLS_C);
+
/* this will read in php.ini, set up the configuration parameters,
   load zend extensions and register php function extensions
   to be loaded later */
@@ -1781,28 +1805,6 @@
zend_set_utility_values(&zuv);
php_startup_sapi_content_types(TSRMLS_C);
 
-   REGISTER_MAIN_STRINGL_CONSTANT("PHP_VERSION", PHP_VERSION, 
sizeof(PHP_VERSION)-1, CONST_PERSISTENT | CONST_CS);
-   REGISTER_MAIN_STRINGL_CONSTANT("PHP_OS", php_os, strlen(php_os), 
CONST_PERSISTENT | CONST_CS);
-   REGISTER_MAIN_STRINGL_CONSTANT("PHP_SAPI", sapi_module.name, 
strlen(sapi_module.name), CONST_PERSISTENT | CONST_CS);
-   REGISTER_MAIN_STRINGL_CONSTANT("DEFAULT_INCLUDE_PATH", 
PHP_INCLUDE_PATH, sizeof(PHP_INCLUDE_PATH)-1, CONST_PERSISTENT | CONST_CS);
-   REGISTER_MAIN_STRINGL_CONSTANT("PEAR_INSTALL_DIR", PEAR_INSTALLDIR, 
sizeof(PEAR_INSTALLDIR)-1, CONST_PERSISTENT | CONST_CS);
-   REGISTER_MAIN_STRINGL_CONSTANT("PEAR_EXTENSION_DIR", PHP_EXTENSION_DIR, 
sizeof(PHP_EXTENSION_DIR)-1, CONST_PERSISTENT | CONST_CS);
-   REGISTER_MAIN_STRINGL_CONSTANT("PHP_EXTENSION_DIR", PHP_EXTENSION_DIR, 
sizeof(PHP_EXTENSION_DIR)-1, CONST_PERSISTENT | CONST_CS);
-   REGISTER_MAIN_STRINGL_CONSTANT("PHP_PREFIX", PHP_PREFIX, 
sizeof(PHP_PREFIX)-1, CONST_PERSISTENT | CONST_CS);
-   REGISTER_MAIN_STRINGL_CONSTANT("PHP_BINDIR", PHP_BINDIR, 
sizeof(PHP_BINDIR)-1, CONST_PERSISTENT | CONST_CS);
-   REGISTER_MAIN_STRINGL_CONSTANT("PHP_LIBDIR", PHP_LIBDIR, 
sizeof(PHP_LIBDIR)-1, CONST_PERSISTENT

[PHP-CVS] cvs: php-src(PHP_5_2) /ext/spl spl_directory.h

2008-02-04 Thread Marcus Boerger
helly   Mon Feb  4 21:49:44 2008 UTC

  Modified files:  (Branch: PHP_5_2)
/php-src/ext/splspl_directory.h 
  Log:
  - Damnit you flags (wrong commit)
  
http://cvs.php.net/viewvc.cgi/php-src/ext/spl/spl_directory.h?r1=1.12.2.5.2.8&r2=1.12.2.5.2.9&diff_format=u
Index: php-src/ext/spl/spl_directory.h
diff -u php-src/ext/spl/spl_directory.h:1.12.2.5.2.8 
php-src/ext/spl/spl_directory.h:1.12.2.5.2.9
--- php-src/ext/spl/spl_directory.h:1.12.2.5.2.8Mon Feb  4 21:37:55 2008
+++ php-src/ext/spl/spl_directory.h Mon Feb  4 21:49:44 2008
@@ -16,7 +16,7 @@
+--+
  */
 
-/* $Id: spl_directory.h,v 1.12.2.5.2.8 2008/02/04 21:37:55 helly Exp $ */
+/* $Id: spl_directory.h,v 1.12.2.5.2.9 2008/02/04 21:49:44 helly Exp $ */
 
 #ifndef SPL_DIRECTORY_H
 #define SPL_DIRECTORY_H
@@ -99,8 +99,8 @@
 #define SPL_FILE_DIR_CURRENT_MODE_MASK 0x00F0 /* mask 
RecursiveDirectoryTree::current() */
 #define SPL_FILE_DIR_CURRENT(intern,mode)  
((intern->flags&SPL_FILE_DIR_CURRENT_MODE_MASK)==mode)
 
-#define SPL_FILE_DIR_KEY_AS_FILENAME   0x /* make 
RecursiveDirectoryTree::key() return getFilename() */
-#define SPL_FILE_DIR_KEY_AS_PATHNAME   0x0100 /* make 
RecursiveDirectoryTree::key() return getPathname() */
+#define SPL_FILE_DIR_KEY_AS_PATHNAME   0x /* make 
RecursiveDirectoryTree::key() return getPathname() */
+#define SPL_FILE_DIR_KEY_AS_FILENAME   0x0100 /* make 
RecursiveDirectoryTree::key() return getFilename() */
 #define SPL_FILE_DIR_KEY_MODE_MASK 0x0F00 /* mask 
RecursiveDirectoryTree::key() */
 #define SPL_FILE_DIR_KEY(intern,mode)  
((intern->flags&SPL_FILE_DIR_KEY_MODE_MASK)==mode)
 

-- 
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/spl spl.php spl_directory.h /ext/spl/examples tree.php

2008-02-04 Thread Marcus Boerger
helly   Mon Feb  4 21:37:55 2008 UTC

  Modified files:  (Branch: PHP_5_2)
/php-src/ext/splspl.php spl_directory.h 
/php-src/ext/spl/examples   tree.php 
  Log:
  - MFH Really last flag change (got confused with code)
  
http://cvs.php.net/viewvc.cgi/php-src/ext/spl/spl.php?r1=1.49.2.11.2.8&r2=1.49.2.11.2.9&diff_format=u
Index: php-src/ext/spl/spl.php
diff -u php-src/ext/spl/spl.php:1.49.2.11.2.8 
php-src/ext/spl/spl.php:1.49.2.11.2.9
--- php-src/ext/spl/spl.php:1.49.2.11.2.8   Mon Feb  4 20:43:50 2008
+++ php-src/ext/spl/spl.php Mon Feb  4 21:37:55 2008
@@ -1019,8 +1019,8 @@
  */
 class RecursiveDirectoryIterator extends DirectoryIterator implements 
RecursiveIterator
 {
-   const CURRENT_AS_FILEINFO   0x; /* make 
RecursiveDirectoryTree::current() return SplFileInfo */
-   const CURRENT_AS_SELF   0x0010; /* make 
RecursiveDirectoryTree::current() return getSelf() */
+   const CURRENT_AS_SELF   0x; /* make 
RecursiveDirectoryTree::current() return getSelf() */
+   const CURRENT_AS_FILEINFO   0x0010; /* make 
RecursiveDirectoryTree::current() return SplFileInfo */
const CURRENT_AS_PATHNAME   0x0020; /* make 
RecursiveDirectoryTree::current() return getPathname() */
 
const KEY_AS_PATHNAME   0x; /* make 
RecursiveDirectoryTree::key() return getPathname() */
http://cvs.php.net/viewvc.cgi/php-src/ext/spl/spl_directory.h?r1=1.12.2.5.2.7&r2=1.12.2.5.2.8&diff_format=u
Index: php-src/ext/spl/spl_directory.h
diff -u php-src/ext/spl/spl_directory.h:1.12.2.5.2.7 
php-src/ext/spl/spl_directory.h:1.12.2.5.2.8
--- php-src/ext/spl/spl_directory.h:1.12.2.5.2.7Mon Feb  4 20:43:50 2008
+++ php-src/ext/spl/spl_directory.h Mon Feb  4 21:37:55 2008
@@ -16,7 +16,7 @@
+--+
  */
 
-/* $Id: spl_directory.h,v 1.12.2.5.2.7 2008/02/04 20:43:50 helly Exp $ */
+/* $Id: spl_directory.h,v 1.12.2.5.2.8 2008/02/04 21:37:55 helly Exp $ */
 
 #ifndef SPL_DIRECTORY_H
 #define SPL_DIRECTORY_H
@@ -55,7 +55,7 @@
char   *path;
intpath_len;
char   *file_name;
-   intfile_name_len; 
+   intfile_name_len;
SPL_FS_OBJ_TYPEtype;
long   flags;
zend_class_entry   *file_class;
@@ -93,14 +93,14 @@
 #define SPL_FILE_OBJECT_SKIP_EMPTY 0x0006 /* skip empty lines */
 #define SPL_FILE_OBJECT_READ_CSV   0x0008 /* read via fgetcsv */
 
-#define SPL_FILE_DIR_CURRENT_AS_FILEINFO   0x /* make 
RecursiveDirectoryTree::current() return SplFileInfo */
-#define SPL_FILE_DIR_CURRENT_AS_SELF   0x0010 /* make 
RecursiveDirectoryTree::current() return getSelf() */
+#define SPL_FILE_DIR_CURRENT_AS_SELF   0x /* make 
RecursiveDirectoryTree::current() return getSelf() */
+#define SPL_FILE_DIR_CURRENT_AS_FILEINFO   0x0010 /* make 
RecursiveDirectoryTree::current() return SplFileInfo */
 #define SPL_FILE_DIR_CURRENT_AS_PATHNAME   0x0020 /* make 
RecursiveDirectoryTree::current() return getPathname() */
 #define SPL_FILE_DIR_CURRENT_MODE_MASK 0x00F0 /* mask 
RecursiveDirectoryTree::current() */
 #define SPL_FILE_DIR_CURRENT(intern,mode)  
((intern->flags&SPL_FILE_DIR_CURRENT_MODE_MASK)==mode)
 
-#define SPL_FILE_DIR_KEY_AS_PATHNAME   0x /* make 
RecursiveDirectoryTree::key() return getPathname() */
-#define SPL_FILE_DIR_KEY_AS_FILENAME   0x0100 /* make 
RecursiveDirectoryTree::key() return getFilename() */
+#define SPL_FILE_DIR_KEY_AS_FILENAME   0x /* make 
RecursiveDirectoryTree::key() return getFilename() */
+#define SPL_FILE_DIR_KEY_AS_PATHNAME   0x0100 /* make 
RecursiveDirectoryTree::key() return getPathname() */
 #define SPL_FILE_DIR_KEY_MODE_MASK 0x0F00 /* mask 
RecursiveDirectoryTree::key() */
 #define SPL_FILE_DIR_KEY(intern,mode)  
((intern->flags&SPL_FILE_DIR_KEY_MODE_MASK)==mode)
 
http://cvs.php.net/viewvc.cgi/php-src/ext/spl/examples/tree.php?r1=1.12&r2=1.12.4.1&diff_format=u
Index: php-src/ext/spl/examples/tree.php
diff -u php-src/ext/spl/examples/tree.php:1.12 
php-src/ext/spl/examples/tree.php:1.12.4.1
--- php-src/ext/spl/examples/tree.php:1.12  Tue Feb  8 19:10:05 2005
+++ php-src/ext/spl/examples/tree.php   Mon Feb  4 21:37:55 2008
@@ -37,4 +37,4 @@
echo $file . "\n";
 }
 
-?>
\ 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/spl spl.php spl_directory.h /ext/spl/examples tree.php

2008-02-04 Thread Marcus Boerger
helly   Mon Feb  4 21:37:43 2008 UTC

  Modified files:  
/php-src/ext/splspl.php spl_directory.h 
/php-src/ext/spl/examples   tree.php 
  Log:
  - Really last flag change (got confused with code)
  
http://cvs.php.net/viewvc.cgi/php-src/ext/spl/spl.php?r1=1.82&r2=1.83&diff_format=u
Index: php-src/ext/spl/spl.php
diff -u php-src/ext/spl/spl.php:1.82 php-src/ext/spl/spl.php:1.83
--- php-src/ext/spl/spl.php:1.82Mon Feb  4 20:40:29 2008
+++ php-src/ext/spl/spl.php Mon Feb  4 21:37:43 2008
@@ -1030,8 +1030,8 @@
  */
 class RecursiveDirectoryIterator extends DirectoryIterator implements 
RecursiveIterator
 {
-   const CURRENT_AS_FILEINFO   0x; /* make 
RecursiveDirectoryTree::current() return SplFileInfo */
-   const CURRENT_AS_SELF   0x0010; /* make 
RecursiveDirectoryTree::current() return getSelf() */
+   const CURRENT_AS_SELF   0x; /* make 
RecursiveDirectoryTree::current() return getSelf() */
+   const CURRENT_AS_FILEINFO   0x0010; /* make 
RecursiveDirectoryTree::current() return SplFileInfo */
const CURRENT_AS_PATHNAME   0x0020; /* make 
RecursiveDirectoryTree::current() return getPathname() */
 
const KEY_AS_PATHNAME   0x; /* make 
RecursiveDirectoryTree::key() return getPathname() */
http://cvs.php.net/viewvc.cgi/php-src/ext/spl/spl_directory.h?r1=1.40&r2=1.41&diff_format=u
Index: php-src/ext/spl/spl_directory.h
diff -u php-src/ext/spl/spl_directory.h:1.40 
php-src/ext/spl/spl_directory.h:1.41
--- php-src/ext/spl/spl_directory.h:1.40Mon Feb  4 19:33:03 2008
+++ php-src/ext/spl/spl_directory.h Mon Feb  4 21:37:43 2008
@@ -16,7 +16,7 @@
+--+
  */
 
-/* $Id: spl_directory.h,v 1.40 2008/02/04 19:33:03 helly Exp $ */
+/* $Id: spl_directory.h,v 1.41 2008/02/04 21:37:43 helly Exp $ */
 
 #ifndef SPL_DIRECTORY_H
 #define SPL_DIRECTORY_H
@@ -118,8 +118,8 @@
 #define SPL_FILE_OBJECT_SKIP_EMPTY 0x0006 /* skip empty lines */
 #define SPL_FILE_OBJECT_READ_CSV   0x0008 /* read via fgetcsv */
 
-#define SPL_FILE_DIR_CURRENT_AS_FILEINFO   0x /* make 
RecursiveDirectoryTree::current() return SplFileInfo */
-#define SPL_FILE_DIR_CURRENT_AS_SELF   0x0010 /* make 
RecursiveDirectoryTree::current() return getSelf() */
+#define SPL_FILE_DIR_CURRENT_AS_SELF   0x /* make 
RecursiveDirectoryTree::current() return getSelf() */
+#define SPL_FILE_DIR_CURRENT_AS_FILEINFO   0x0010 /* make 
RecursiveDirectoryTree::current() return SplFileInfo */
 #define SPL_FILE_DIR_CURRENT_AS_PATHNAME   0x0020 /* make 
RecursiveDirectoryTree::current() return getPathname() */
 #define SPL_FILE_DIR_CURRENT_MODE_MASK 0x00F0 /* mask 
RecursiveDirectoryTree::current() */
 #define SPL_FILE_DIR_CURRENT(intern,mode)  
((intern->flags&SPL_FILE_DIR_CURRENT_MODE_MASK)==mode)
http://cvs.php.net/viewvc.cgi/php-src/ext/spl/examples/tree.php?r1=1.13&r2=1.14&diff_format=u
Index: php-src/ext/spl/examples/tree.php
diff -u php-src/ext/spl/examples/tree.php:1.13 
php-src/ext/spl/examples/tree.php:1.14
--- php-src/ext/spl/examples/tree.php:1.13  Tue Feb 21 23:21:53 2006
+++ php-src/ext/spl/examples/tree.php   Mon Feb  4 21:37:43 2008
@@ -37,4 +37,4 @@
echo $file . "\n";
 }
 
-?>
\ 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(PHP_5_3) /ext/spl spl.php spl_directory.h /ext/spl/examples tree.php

2008-02-04 Thread Marcus Boerger
helly   Mon Feb  4 21:37:47 2008 UTC

  Modified files:  (Branch: PHP_5_3)
/php-src/ext/splspl.php spl_directory.h 
/php-src/ext/spl/examples   tree.php 
  Log:
  - MFH Really last flag change (got confused with code)
  
http://cvs.php.net/viewvc.cgi/php-src/ext/spl/spl.php?r1=1.49.2.11.2.7.2.2&r2=1.49.2.11.2.7.2.3&diff_format=u
Index: php-src/ext/spl/spl.php
diff -u php-src/ext/spl/spl.php:1.49.2.11.2.7.2.2 
php-src/ext/spl/spl.php:1.49.2.11.2.7.2.3
--- php-src/ext/spl/spl.php:1.49.2.11.2.7.2.2   Mon Feb  4 20:40:47 2008
+++ php-src/ext/spl/spl.php Mon Feb  4 21:37:47 2008
@@ -1030,8 +1030,8 @@
  */
 class RecursiveDirectoryIterator extends DirectoryIterator implements 
RecursiveIterator
 {
-   const CURRENT_AS_FILEINFO   0x; /* make 
RecursiveDirectoryTree::current() return SplFileInfo */
-   const CURRENT_AS_SELF   0x0010; /* make 
RecursiveDirectoryTree::current() return getSelf() */
+   const CURRENT_AS_SELF   0x; /* make 
RecursiveDirectoryTree::current() return getSelf() */
+   const CURRENT_AS_FILEINFO   0x0010; /* make 
RecursiveDirectoryTree::current() return SplFileInfo */
const CURRENT_AS_PATHNAME   0x0020; /* make 
RecursiveDirectoryTree::current() return getPathname() */
 
const KEY_AS_PATHNAME   0x; /* make 
RecursiveDirectoryTree::key() return getPathname() */
http://cvs.php.net/viewvc.cgi/php-src/ext/spl/spl_directory.h?r1=1.12.2.5.2.4.2.6&r2=1.12.2.5.2.4.2.7&diff_format=u
Index: php-src/ext/spl/spl_directory.h
diff -u php-src/ext/spl/spl_directory.h:1.12.2.5.2.4.2.6 
php-src/ext/spl/spl_directory.h:1.12.2.5.2.4.2.7
--- php-src/ext/spl/spl_directory.h:1.12.2.5.2.4.2.6Mon Feb  4 19:33:10 2008
+++ php-src/ext/spl/spl_directory.h Mon Feb  4 21:37:47 2008
@@ -16,7 +16,7 @@
+--+
  */
 
-/* $Id: spl_directory.h,v 1.12.2.5.2.4.2.6 2008/02/04 19:33:10 helly Exp $ */
+/* $Id: spl_directory.h,v 1.12.2.5.2.4.2.7 2008/02/04 21:37:47 helly Exp $ */
 
 #ifndef SPL_DIRECTORY_H
 #define SPL_DIRECTORY_H
@@ -66,7 +66,7 @@
char   *_path;
int_path_len;
char   *file_name;
-   intfile_name_len; 
+   intfile_name_len;
SPL_FS_OBJ_TYPEtype;
long   flags;
zend_class_entry   *file_class;
@@ -116,8 +116,8 @@
 #define SPL_FILE_OBJECT_SKIP_EMPTY 0x0006 /* skip empty lines */
 #define SPL_FILE_OBJECT_READ_CSV   0x0008 /* read via fgetcsv */
 
-#define SPL_FILE_DIR_CURRENT_AS_FILEINFO   0x /* make 
RecursiveDirectoryTree::current() return SplFileInfo */
-#define SPL_FILE_DIR_CURRENT_AS_SELF   0x0010 /* make 
RecursiveDirectoryTree::current() return getSelf() */
+#define SPL_FILE_DIR_CURRENT_AS_SELF   0x /* make 
RecursiveDirectoryTree::current() return getSelf() */
+#define SPL_FILE_DIR_CURRENT_AS_FILEINFO   0x0010 /* make 
RecursiveDirectoryTree::current() return SplFileInfo */
 #define SPL_FILE_DIR_CURRENT_AS_PATHNAME   0x0020 /* make 
RecursiveDirectoryTree::current() return getPathname() */
 #define SPL_FILE_DIR_CURRENT_MODE_MASK 0x00F0 /* mask 
RecursiveDirectoryTree::current() */
 #define SPL_FILE_DIR_CURRENT(intern,mode)  
((intern->flags&SPL_FILE_DIR_CURRENT_MODE_MASK)==mode)
http://cvs.php.net/viewvc.cgi/php-src/ext/spl/examples/tree.php?r1=1.12&r2=1.12.6.1&diff_format=u
Index: php-src/ext/spl/examples/tree.php
diff -u php-src/ext/spl/examples/tree.php:1.12 
php-src/ext/spl/examples/tree.php:1.12.6.1
--- php-src/ext/spl/examples/tree.php:1.12  Tue Feb  8 19:10:05 2005
+++ php-src/ext/spl/examples/tree.php   Mon Feb  4 21:37:47 2008
@@ -37,4 +37,4 @@
echo $file . "\n";
 }
 
-?>
\ 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 /main main.c

2008-02-04 Thread Jani Taskinen
janiMon Feb  4 20:38:42 2008 UTC

  Modified files:  
/php-src/main   main.c 
  Log:
  - Allow using any constants registered by PHP in php.ini too
  
http://cvs.php.net/viewvc.cgi/php-src/main/main.c?r1=1.756&r2=1.757&diff_format=u
Index: php-src/main/main.c
diff -u php-src/main/main.c:1.756 php-src/main/main.c:1.757
--- php-src/main/main.c:1.756   Tue Jan 22 09:29:29 2008
+++ php-src/main/main.c Mon Feb  4 20:38:42 2008
@@ -18,7 +18,7 @@
+--+
 */
 
-/* $Id: main.c,v 1.756 2008/01/22 09:29:29 dmitry Exp $ */
+/* $Id: main.c,v 1.757 2008/02/04 20:38:42 jani Exp $ */
 
 /* {{{ includes
  */
@@ -1862,6 +1862,28 @@
 
le_index_ptr = zend_register_list_destructors_ex(NULL, NULL, "index 
pointer", 0);
 
+   /* Register constants */
+   REGISTER_MAIN_STRINGL_CONSTANT("PHP_VERSION", PHP_VERSION, 
sizeof(PHP_VERSION)-1, CONST_PERSISTENT | CONST_CS);
+   REGISTER_MAIN_STRINGL_CONSTANT("PHP_OS", php_os, strlen(php_os), 
CONST_PERSISTENT | CONST_CS);
+   REGISTER_MAIN_STRINGL_CONSTANT("PHP_SAPI", sapi_module.name, 
strlen(sapi_module.name), CONST_PERSISTENT | CONST_CS);
+   REGISTER_MAIN_STRINGL_CONSTANT("DEFAULT_INCLUDE_PATH", 
PHP_INCLUDE_PATH, sizeof(PHP_INCLUDE_PATH)-1, CONST_PERSISTENT | CONST_CS);
+   REGISTER_MAIN_STRINGL_CONSTANT("PHP_EXTENSION_DIR", PHP_EXTENSION_DIR, 
sizeof(PHP_EXTENSION_DIR)-1, CONST_PERSISTENT | CONST_CS);
+   REGISTER_MAIN_STRINGL_CONSTANT("PHP_PREFIX", PHP_PREFIX, 
sizeof(PHP_PREFIX)-1, CONST_PERSISTENT | CONST_CS);
+   REGISTER_MAIN_STRINGL_CONSTANT("PHP_BINDIR", PHP_BINDIR, 
sizeof(PHP_BINDIR)-1, CONST_PERSISTENT | CONST_CS);
+   REGISTER_MAIN_STRINGL_CONSTANT("PHP_LIBDIR", PHP_LIBDIR, 
sizeof(PHP_LIBDIR)-1, CONST_PERSISTENT | CONST_CS);
+   REGISTER_MAIN_STRINGL_CONSTANT("PHP_DATADIR", PHP_DATADIR, 
sizeof(PHP_DATADIR)-1, CONST_PERSISTENT | CONST_CS);
+   REGISTER_MAIN_STRINGL_CONSTANT("PHP_SYSCONFDIR", PHP_SYSCONFDIR, 
sizeof(PHP_SYSCONFDIR)-1, CONST_PERSISTENT | CONST_CS);
+   REGISTER_MAIN_STRINGL_CONSTANT("PHP_LOCALSTATEDIR", PHP_LOCALSTATEDIR, 
sizeof(PHP_LOCALSTATEDIR)-1, CONST_PERSISTENT | CONST_CS);
+   REGISTER_MAIN_STRINGL_CONSTANT("PHP_CONFIG_FILE_PATH", 
PHP_CONFIG_FILE_PATH, strlen(PHP_CONFIG_FILE_PATH), CONST_PERSISTENT | 
CONST_CS);
+   REGISTER_MAIN_STRINGL_CONSTANT("PHP_CONFIG_FILE_SCAN_DIR", 
PHP_CONFIG_FILE_SCAN_DIR, sizeof(PHP_CONFIG_FILE_SCAN_DIR)-1, CONST_PERSISTENT 
| CONST_CS);
+   REGISTER_MAIN_STRINGL_CONSTANT("PHP_SHLIB_SUFFIX", PHP_SHLIB_SUFFIX, 
sizeof(PHP_SHLIB_SUFFIX)-1, CONST_PERSISTENT | CONST_CS);
+   REGISTER_MAIN_STRINGL_CONSTANT("PHP_EOL", PHP_EOL, sizeof(PHP_EOL)-1, 
CONST_PERSISTENT | CONST_CS);
+   REGISTER_MAIN_LONG_CONSTANT("PHP_INT_MAX", LONG_MAX, CONST_PERSISTENT | 
CONST_CS);
+   REGISTER_MAIN_LONG_CONSTANT("PHP_INT_SIZE", sizeof(long), 
CONST_PERSISTENT | CONST_CS);
+
+   php_output_register_constants(TSRMLS_C);
+   php_rfc1867_register_constants(TSRMLS_C);
+
/* this will read in php.ini, set up the configuration parameters,
   load zend extensions and register php function extensions
   to be loaded later */
@@ -1930,26 +1952,6 @@
zend_set_utility_values(&zuv);
php_startup_sapi_content_types(TSRMLS_C);
 
-   REGISTER_MAIN_STRINGL_CONSTANT("PHP_VERSION", PHP_VERSION, 
sizeof(PHP_VERSION)-1, CONST_PERSISTENT | CONST_CS);
-   REGISTER_MAIN_STRINGL_CONSTANT("PHP_OS", php_os, strlen(php_os), 
CONST_PERSISTENT | CONST_CS);
-   REGISTER_MAIN_STRINGL_CONSTANT("PHP_SAPI", sapi_module.name, 
strlen(sapi_module.name), CONST_PERSISTENT | CONST_CS);
-   REGISTER_MAIN_STRINGL_CONSTANT("DEFAULT_INCLUDE_PATH", 
PHP_INCLUDE_PATH, sizeof(PHP_INCLUDE_PATH)-1, CONST_PERSISTENT | CONST_CS);
-   REGISTER_MAIN_STRINGL_CONSTANT("PHP_EXTENSION_DIR", PHP_EXTENSION_DIR, 
sizeof(PHP_EXTENSION_DIR)-1, CONST_PERSISTENT | CONST_CS);
-   REGISTER_MAIN_STRINGL_CONSTANT("PHP_PREFIX", PHP_PREFIX, 
sizeof(PHP_PREFIX)-1, CONST_PERSISTENT | CONST_CS);
-   REGISTER_MAIN_STRINGL_CONSTANT("PHP_BINDIR", PHP_BINDIR, 
sizeof(PHP_BINDIR)-1, CONST_PERSISTENT | CONST_CS);
-   REGISTER_MAIN_STRINGL_CONSTANT("PHP_LIBDIR", PHP_LIBDIR, 
sizeof(PHP_LIBDIR)-1, CONST_PERSISTENT | CONST_CS);
-   REGISTER_MAIN_STRINGL_CONSTANT("PHP_DATADIR", PHP_DATADIR, 
sizeof(PHP_DATADIR)-1, CONST_PERSISTENT | CONST_CS);
-   REGISTER_MAIN_STRINGL_CONSTANT("PHP_SYSCONFDIR", PHP_SYSCONFDIR, 
sizeof(PHP_SYSCONFDIR)-1, CONST_PERSISTENT | CONST_CS);
-   REGISTER_MAIN_STRINGL_CONSTANT("PHP_LOCALSTATEDIR", PHP_LOCALSTATEDIR, 
sizeof(PHP_LOCALSTATEDIR)-1, CONST_PERSISTENT | CONST_CS);
-   REGISTER_MAIN_STRINGL_CONSTANT("PHP_CONFIG_FILE_PATH", 
PHP_CONFIG_FILE_PATH, strlen(PHP_CONFIG_FILE_PATH), CONST_PERSISTENT | 
CONST_CS);
-   REGISTER_MAIN_STRINGL_CONSTANT("PHP_CONFIG_FILE_SCAN_DIR", 
PHP_CONFIG_FILE_SCAN_DIR, sizeof(PHP_CONFIG_FILE

[PHP-CVS] cvs: php-src(PHP_5_2) /ext/spl spl.php spl_directory.c spl_directory.h

2008-02-04 Thread Marcus Boerger
helly   Mon Feb  4 20:43:51 2008 UTC

  Modified files:  (Branch: PHP_5_2)
/php-src/ext/splspl.php spl_directory.c spl_directory.h 
  Log:
  - MFH Flag handling and documentation
  
  http://cvs.php.net/viewvc.cgi/php-src/ext/spl/spl.php?r1=1.49.2.11.2.7&r2=1.49.2.11.2.8&diff_format=u
Index: php-src/ext/spl/spl.php
diff -u php-src/ext/spl/spl.php:1.49.2.11.2.7 
php-src/ext/spl/spl.php:1.49.2.11.2.8
--- php-src/ext/spl/spl.php:1.49.2.11.2.7   Sun Apr 22 17:13:52 2007
+++ php-src/ext/spl/spl.php Mon Feb  4 20:43:50 2008
@@ -13,25 +13,25 @@
  *
  * SPL - Standard PHP Library
  *
- * SPL is a collection of interfaces and classes that are meant to solve 
- * standard problems and implements some efficient data access interfaces 
- * and classes. You'll find the classes documented using php code in the 
- * file spl.php or in corresponding .inc files in subdirectories examples 
- * and internal. Based on the internal implementations or the files in the 
+ * SPL is a collection of interfaces and classes that are meant to solve
+ * standard problems and implements some efficient data access interfaces
+ * and classes. You'll find the classes documented using php code in the
+ * file spl.php or in corresponding .inc files in subdirectories examples
+ * and internal. Based on the internal implementations or the files in the
  * examples subdirectory there are also some .php files to experiment with.
- * 
- * The .inc files are not included automatically because they are sooner or 
- * later integrated into the extension. That means that you either need to 
- * put the code of examples/autoload.inc into your autoprepend file or that 
+ *
+ * The .inc files are not included automatically because they are sooner or
+ * later integrated into the extension. That means that you either need to
+ * put the code of examples/autoload.inc into your autoprepend file or that
  * you have to point your ini setting auto_prepend_file to that file.
- * 
+ *
  * Below is a list of interfaces/classes already availabel natively through
  * the SPL extension grouped by category.
- * 
+ *
  * 1) Iterators
- * 
+ *
  * SPL offers some advanced iterator algorithms:
- * 
+ *
  * - interface RecursiveIterator extends Iterator
  * - interface OuterIterator extends Iterator
  * - class RecursiveIteratorIterator implements OuterIterator
@@ -48,32 +48,32 @@
  * - class AppendIterator implements OuterIterator
  * - class RegexIterator extends FilterIterator
  * - class RecursiveRegexIterator extends RegexIterator implements 
RecursiveIterator
- * 
+ *
  * 2) Directories and Files
- * 
+ *
  * SPL offers two advanced directory and file handling classes:
- * 
+ *
  * - class SplFileInfo
  * - class DirectoryIterator extends SplFileInfo implements Iterator
  * - class RecursiveDirectoryIterator extends DirectoryIterator implements 
RecursiveIterator
  * - class SplFileObject extends SplFileInfo implements RecursiveIterator, 
SeekableIterator
- * 
+ *
  * 3) XML
- * 
+ *
  * SPL offers an advanced XML handling class:
- * 
+ *
  * - class SimpleXMLIterator extends simplexml_element implements 
RecursiveIterator
- * 
+ *
  * 4) Array Overloading
- * 
+ *
  * SPL offers advanced Array overloading:
- * 
+ *
  * - class ArrayObject implements IteratorAggregate, ArrayAccess, Countable
  * - class ArrayIterator implements Iterator, ArrayAccess, Countable, 
SeekableIterator
  * - class RecursiveArrayIterator extends ArrayIterator implements 
RecursiveIterator
- * 
+ *
  * As the above suggest an ArrayObject creates an ArrayIterator when it comes 
to
- * iteration (e.g. ArrayObject instance used inside foreach). 
+ * iteration (e.g. ArrayObject instance used inside foreach).
  *
  * 5) Counting
  *
@@ -81,7 +81,7 @@
  *
  * 6) Exception%s
  *
- * SPL provides a set of standard Exception classes each meant to indicate a 
+ * SPL provides a set of standard Exception classes each meant to indicate a
  * certain problem type.
  *
  * - class LogicException   extends Exception
@@ -107,10 +107,10 @@
  *
  * 8) @ref Examples
  *
- * The classes and interfaces in this group are contained as PHP code in the 
+ * The classes and interfaces in this group are contained as PHP code in the
  * examples subdirectory of ext/SPL. Sooner or later they will be moved to
  * c-code.
- * 
+ *
  * 9) Some articles about SPL:
  * - http://www.phpro.org/tutorials/Introduction-to-SPL.html";>Introduction to 
Standard PHP Library (SPL)
  * - http://www.sitepoint.com/article/php5-standard-library/1";>Introducing PHP 
5's Standard Library
@@ -131,7 +131,7 @@
  * - Debug session 2 http://talks.somabo.de/200509_toronto_iterator_debug_session_1.pps";>[pps],
 http://talks.somabo.de/200509_toronto_iterator_debug_session_1.pdf";>[pdf],
 http://taks.somabo.de/200411_php_conference_frankfrurt_iterator_debug_session.swf";>[swf]
  * - Debug session 3 http://talks.somabo.de/200509_toronto_iterator_debug_session_2.pps";>[pps],
 http://talks.somabo.de/200509

[PHP-CVS] cvs: php-src /ext/standard/tests/general_functions parse_ini_basic.data parse_ini_basic.phpt parse_ini_booleans.data parse_ini_booleans.phpt ZendEngine2 zend_ini_parser.y zend_ini_scanner.l

2008-02-04 Thread Jani Taskinen
janiMon Feb  4 20:45:16 2008 UTC

  Modified files:  
/ZendEngine2zend_ini_parser.y zend_ini_scanner.l 
/php-src/ext/standard/tests/general_functions   parse_ini_basic.data 
parse_ini_basic.phpt 
parse_ini_booleans.data 
parse_ini_booleans.phpt 
  Log:
  - Fixed bugs #43915, #43923 and #44019, a tiny performance issue fixed too
  
  http://cvs.php.net/viewvc.cgi/ZendEngine2/zend_ini_parser.y?r1=1.49&r2=1.50&diff_format=u
Index: ZendEngine2/zend_ini_parser.y
diff -u ZendEngine2/zend_ini_parser.y:1.49 ZendEngine2/zend_ini_parser.y:1.50
--- ZendEngine2/zend_ini_parser.y:1.49  Mon Dec 31 07:12:07 2007
+++ ZendEngine2/zend_ini_parser.y   Mon Feb  4 20:45:15 2008
@@ -18,7 +18,7 @@
+--+
 */
 
-/* $Id: zend_ini_parser.y,v 1.49 2007/12/31 07:12:07 sebastian Exp $ */
+/* $Id: zend_ini_parser.y,v 1.50 2008/02/04 20:45:15 jani Exp $ */
 
 #define DEBUG_CFG_PARSER 0
 
@@ -246,13 +246,16 @@
 
 %}
 
-%expect 1
+%expect 0
 %pure_parser
 
 %token TC_SECTION
 %token TC_RAW
+%token TC_CONSTANT
 %token TC_NUMBER
 %token TC_STRING
+%token TC_WHITESPACE
+%token TC_LABEL
 %token TC_OFFSET
 %token TC_DOLLAR_CURLY
 %token TC_VARNAME
@@ -260,7 +263,7 @@
 %token BOOL_TRUE
 %token BOOL_FALSE
 %token END_OF_LINE
-%token '=' ':' ',' '.' '"' '\'' '^' '+' '-' '/' '*' '%' '$' '~' '<' '>' '?' '@'
+%token '=' ':' ',' '.' '"' '\'' '^' '+' '-' '/' '*' '%' '$' '~' '<' '>' '?' 
'@' '{' '}'
 %left '|' '&'
 %right '~' '!'
 
@@ -279,7 +282,7 @@
ZEND_INI_PARSER_CB(&$2, NULL, NULL, 
ZEND_INI_PARSER_SECTION, ZEND_INI_PARSER_ARG TSRMLS_CC);
free(Z_STRVAL($2));
}
-   |   TC_STRING '=' string_or_value {
+   |   TC_LABEL '=' string_or_value {
 #if DEBUG_CFG_PARSER
printf("NORMAL: '%s' = '%s'\n", Z_STRVAL($1), 
Z_STRVAL($3));
 #endif
@@ -296,32 +299,24 @@
free(Z_STRVAL($2));
free(Z_STRVAL($5));
}
-   |   TC_STRING   { ZEND_INI_PARSER_CB(&$1, NULL, NULL, 
ZEND_INI_PARSER_ENTRY, ZEND_INI_PARSER_ARG TSRMLS_CC); free(Z_STRVAL($1)); }
+   |   TC_LABEL{ ZEND_INI_PARSER_CB(&$1, NULL, NULL, 
ZEND_INI_PARSER_ENTRY, ZEND_INI_PARSER_ARG TSRMLS_CC); free(Z_STRVAL($1)); }
|   END_OF_LINE
 ;
 
 section_string_or_value:
-   TC_RAW  { $$ = 
$1; }
-   |   section_var_list{ $$ = $1; }
-   |   '"' encapsed_list '"'   { $$ = $2; }
+   var_string_list { $$ = $1; }
|   /* empty */ { 
zend_ini_init_string(&$$); }
 ;
 
 string_or_value:
expr{ $$ = 
$1; }
-   |   TC_RAW  { $$ = 
$1; }
-   |   TC_NUMBER   { $$ = 
$1; }
|   BOOL_TRUE   { $$ = 
$1; }
|   BOOL_FALSE  { $$ = 
$1; }
-   |   '"' encapsed_list '"'   { $$ = $2; }
|   END_OF_LINE { 
zend_ini_init_string(&$$); }
 ;
 
 option_offset:
-   TC_NUMBER   { $$ = 
$1; }
-   |   TC_RAW  { $$ = 
$1; }
-   |   var_string_list { $$ = $1; }
-   |   '"' encapsed_list '"'   { $$ = $2; }
+   var_string_list { $$ = $1; }
|   /* empty */ { 
zend_ini_init_string(&$$); }
 ;
 
@@ -331,18 +326,13 @@
|   /* empty */ { 
zend_ini_init_string(&$$); }
 ;
 
-section_var_list:
-   cfg_var_ref { $$ = 
$1; }
-   |   TC_STRING   { $$ = 
$1; }
-   |   section_var_list cfg_var_ref{ zend_ini_add_string(&$$, &$1, 
&$2); free(Z_STRVAL($2)); }
-   |   section_var_list TC_STRING  { 
zend_ini_add_string(&$$, &$1, &$2); free(Z_STRVAL($2)); }
-;
-
 var_string_list:
cfg_var_ref { $$ = 
$1; }
|   constant_string { $$ = $1; }
+   |   '"' encapsed_list '"'   { $$ = $2; }
|   var_string_list cfg_var_ref