[PHP-CVS] cvs: php-src(PHP_5_3) / NEWS /ext/standard basic_functions.c
felipe Mon Apr 27 12:52:32 2009 UTC Modified files: (Branch: PHP_5_3) /php-src/ext/standard basic_functions.c /php-srcNEWS Log: - MFH: Fixed bug #48087 (call_user_method() invalid free of arguments) http://cvs.php.net/viewvc.cgi/php-src/ext/standard/basic_functions.c?r1=1.725.2.31.2.64.2.87r2=1.725.2.31.2.64.2.88diff_format=u Index: php-src/ext/standard/basic_functions.c diff -u php-src/ext/standard/basic_functions.c:1.725.2.31.2.64.2.87 php-src/ext/standard/basic_functions.c:1.725.2.31.2.64.2.88 --- php-src/ext/standard/basic_functions.c:1.725.2.31.2.64.2.87 Fri Mar 27 02:32:56 2009 +++ php-src/ext/standard/basic_functions.c Mon Apr 27 12:52:31 2009 @@ -18,7 +18,7 @@ +--+ */ -/* $Id: basic_functions.c,v 1.725.2.31.2.64.2.87 2009/03/27 02:32:56 lbarnaud Exp $ */ +/* $Id: basic_functions.c,v 1.725.2.31.2.64.2.88 2009/04/27 12:52:31 felipe Exp $ */ #include php.h #include php_streams.h @@ -4780,7 +4780,9 @@ } else { php_error_docref(NULL TSRMLS_CC, E_WARNING, Unable to call %s(), Z_STRVAL_P(callback)); } - efree(params); + if (n_params) { + efree(params); + } } /* }}} */ http://cvs.php.net/viewvc.cgi/php-src/NEWS?r1=1.2027.2.547.2.965.2.567r2=1.2027.2.547.2.965.2.568diff_format=u Index: php-src/NEWS diff -u php-src/NEWS:1.2027.2.547.2.965.2.567 php-src/NEWS:1.2027.2.547.2.965.2.568 --- php-src/NEWS:1.2027.2.547.2.965.2.567 Thu Apr 23 13:26:09 2009 +++ php-src/NEWSMon Apr 27 12:52:31 2009 @@ -12,6 +12,7 @@ disable this behaviour using http=array(auto_decode=0) in stream context. (Dmitry) +- Fixed bug #48087 (call_user_method() invalid free of arguments). (Felipe) - Fixed bug #48060 (pdo_pgsql - large objects are returned as empty). (Matteo) - Fixed bug #48023 (spl_autoload_register didn't store closures). (Etienne) - Fixed bug #48004 (Error handler prevents creation of default object). -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-CVS] cvs: php-src(PHP_5_3) / NEWS /ext/standard basic_functions.c /main SAPI.h main.c /sapi/cgi cgi_main.c /sapi/cli php_cli.c /sapi/embed php_embed.c
Hi! Why? I'm not aware of any dl()-related problems in FastCGI. FastCGI is like all other long-running SAPIs, so can't it have the same problems httpd has? -- Stanislav Malyshev, Zend Software Architect s...@zend.com http://www.zend.com/ (408)253-8829 MSN: s...@zend.com -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-CVS] cvs: php-src(PHP_5_3) / NEWS /ext/standard basic_functions.c /main SAPI.h main.c /sapi/cgi cgi_main.c /sapi/cli php_cli.c /sapi/embed php_embed.c
Why? I'm not aware of any dl()-related problems in FastCGI. FastCGI is like all other long-running SAPIs, so can't it have the same problems httpd has? OK that's confused me... I thought the problem with dl() was purely in threaded SAPIs? - otherwise surely it should've been dropped for CLI forever ago? What did I miss? - Steph ps Happy new year Stas ;) -- Stanislav Malyshev, Zend Software Architect s...@zend.com http://www.zend.com/ (408)253-8829 MSN: s...@zend.com -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-CVS] cvs: php-src(PHP_5_3) / NEWS /ext/standard basic_functions.c /main SAPI.h main.c /sapi/cgi cgi_main.c /sapi/cli php_cli.c /sapi/embed php_embed.c
On 02.01.2009 07:47, Andi Gutmans wrote: Hi Marcus, I think dl() should also be disabled for FastCGI. Why? I'm not aware of any dl()-related problems in FastCGI. -- Wbr, Antony Dovgal -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-CVS] cvs: php-src(PHP_5_3) / NEWS /ext/standard basic_functions.c /main SAPI.h main.c /sapi/cgi cgi_main.c /sapi/cli php_cli.c /sapi/embed php_embed.c
Hello Andi, my main goal was to get rid of dl() for apache and alike modules and get the c level API changes in. For FastCGI I guess you are right, but I would appreciate if Dmitry could look into it. As far as I understand the only thing we have to do is to pass the function table containing the dl() only if we are not in FastCGI mode. So basically if ther is no -b command line flag. marcus Friday, January 2, 2009, 5:47:09 AM, you wrote: Hi Marcus, I think dl() should also be disabled for FastCGI. It may require a bit of reordering of the code to make this work but I think it's the right thing. If you bump into any problems then maybe Dmitry could help out but he's on vacation for the next couple of weeks. Thanks! Andi -Original Message- From: Marcus Boerger [mailto:he...@php.net] Sent: Wednesday, December 31, 2008 6:27 AM To: php-cvs@lists.php.net; php...@lists.php.net Subject: [PHP-CVS] cvs: php-src(PHP_5_3) / NEWS /ext/standard basic_functions.c /main SAPI.h main.c /sapi/cgi cgi_main.c /sapi/cli php_cli.c /sapi/embed php_embed.c helly Wed Dec 31 14:27:10 2008 UTC Modified files: (Branch: PHP_5_3) /php-srcNEWS /php-src/ext/standard basic_functions.c /php-src/main SAPI.h main.c /php-src/sapi/cgi cgi_main.c /php-src/sapi/cli php_cli.c /php-src/sapi/embed php_embed.c Log: MFH - Changed dl() to be disabled by default. Enabled only when explicitly registered by the SAPI layer. Enabled only with CLI, CGI and EMBED. (Dmitry) [DOC] http://cvs.php.net/viewvc.cgi/php-src/NEWS?r1=1.2027.2.547.2.965.2.428r 2=1.2027.2.547.2.965.2.429diff_format=u Index: php-src/NEWS diff -u php-src/NEWS:1.2027.2.547.2.965.2.428 php-src/NEWS:1.2027.2.547.2.965.2.429 --- php-src/NEWS:1.2027.2.547.2.965.2.428 Tue Dec 30 23:34:29 2008 +++ php-src/NEWSWed Dec 31 14:27:08 2008 @@ -6,6 +6,8 @@ - Deprecated session_register(), session_unregister() and session_is_registered(). (Hannes) +- Changed dl() to be disabled by default. Enabled only when explicitly + registered by the SAPI layer. Enabled only with CLI, CGI and EMBED. (Dmitry) - Changed opendir(), dir() and scandir() to use default context when no context argument is passed. (Sara) - Changed open_basedir to allow tightening in runtime contexts. (Sara) http://cvs.php.net/viewvc.cgi/php-src/ext/standard/basic_functions.c?r1= 1.725.2.31.2.64.2.79r2=1.725.2.31.2.64.2.80diff_format=u Index: php-src/ext/standard/basic_functions.c diff -u php-src/ext/standard/basic_functions.c:1.725.2.31.2.64.2.79 php-src/ext/standard/basic_functions.c:1.725.2.31.2.64.2.80 --- php-src/ext/standard/basic_functions.c:1.725.2.31.2.64.2.79 Wed Dec 31 11:15:44 2008 +++ php-src/ext/standard/basic_functions.c Wed Dec 31 14:27:09 2008 @@ -18,7 +18,7 @@ +--+ */ -/* $Id: basic_functions.c,v 1.725.2.31.2.64.2.79 2008/12/31 11:15:44 sebastian Exp $ */ +/* $Id: basic_functions.c,v 1.725.2.31.2.64.2.80 2008/12/31 14:27:09 helly Exp $ */ #include php.h #include php_streams.h @@ -3025,9 +3025,6 @@ PHP_FE(is_scalar, arginfo_is_scalar) PHP_FE(is_callable, arginfo_is_callable) - /* functions from dl.c */ - PHP_FE(dl, arginfo_dl) - /* functions from file.c */ PHP_FE(pclose, arginfo_pclose) PHP_FE(popen, arginfo_popen) http://cvs.php.net/viewvc.cgi/php-src/main/SAPI.h?r1=1.114.2.1.2.3.2.5r 2=1.114.2.1.2.3.2.6diff_format=u Index: php-src/main/SAPI.h diff -u php-src/main/SAPI.h:1.114.2.1.2.3.2.5 php-src/main/SAPI.h:1.114.2.1.2.3.2.6 --- php-src/main/SAPI.h:1.114.2.1.2.3.2.5 Wed Dec 31 11:15:47 2008 +++ php-src/main/SAPI.h Wed Dec 31 14:27:09 2008 @@ -16,7 +16,7 @@ +--+ */ -/* $Id: SAPI.h,v 1.114.2.1.2.3.2.5 2008/12/31 11:15:47 sebastian Exp $ */ +/* $Id: SAPI.h,v 1.114.2.1.2.3.2.6 2008/12/31 14:27:09 helly Exp $ */ #ifndef SAPI_H #define SAPI_H @@ -264,6 +264,7 @@ int phpinfo_as_text; char *ini_entries; + const zend_function_entry *additional_functions; }; http://cvs.php.net/viewvc.cgi/php-src/main/main.c?r1=1.640.2.23.2.57.2.4 0r2=1.640.2.23.2.57.2.41diff_format=u Index: php-src/main/main.c diff -u php-src/main/main.c:1.640.2.23.2.57.2.40 php-src/main/main.c:1.640.2.23.2.57.2.41 --- php-src/main/main.c:1.640.2.23.2.57.2.40Wed Dec 31 14:05:22 2008 +++ php-src/main/main.c Wed Dec 31 14:27:09 2008 @@ -18,7 +18,7 @@ +--+ */ -/* $Id: main.c,v 1.640.2.23.2.57.2.40 2008/12/31 14:05:22 helly Exp $ */ +/* $Id: main.c,v 1.640.2.23.2.57.2.41 2008/12/31 14:27:09 helly Exp $ */ /* {{{ includes */ @@ -1910,6 +1910,15
RE: [PHP-CVS] cvs: php-src(PHP_5_3) / NEWS /ext/standard basic_functions.c /main SAPI.h main.c /sapi/cgi cgi_main.c /sapi/cli php_cli.c /sapi/embed php_embed.c
Ok will ask him to take a look when he's back. Cheers, Andi -Original Message- From: Marcus Boerger [mailto:he...@php.net] Sent: Friday, January 02, 2009 4:04 AM To: Andi Gutmans Cc: Marcus Boerger; php-cvs@lists.php.net Subject: Re: [PHP-CVS] cvs: php-src(PHP_5_3) / NEWS /ext/standard basic_functions.c /main SAPI.h main.c /sapi/cgi cgi_main.c /sapi/cli php_cli.c /sapi/embed php_embed.c Hello Andi, my main goal was to get rid of dl() for apache and alike modules and get the c level API changes in. For FastCGI I guess you are right, but I would appreciate if Dmitry could look into it. As far as I understand the only thing we have to do is to pass the function table containing the dl() only if we are not in FastCGI mode. So basically if ther is no -b command line flag. marcus Friday, January 2, 2009, 5:47:09 AM, you wrote: Hi Marcus, I think dl() should also be disabled for FastCGI. It may require a bit of reordering of the code to make this work but I think it's the right thing. If you bump into any problems then maybe Dmitry could help out but he's on vacation for the next couple of weeks. Thanks! Andi -Original Message- From: Marcus Boerger [mailto:he...@php.net] Sent: Wednesday, December 31, 2008 6:27 AM To: php-cvs@lists.php.net; php...@lists.php.net Subject: [PHP-CVS] cvs: php-src(PHP_5_3) / NEWS /ext/standard basic_functions.c /main SAPI.h main.c /sapi/cgi cgi_main.c /sapi/cli php_cli.c /sapi/embed php_embed.c helly Wed Dec 31 14:27:10 2008 UTC Modified files: (Branch: PHP_5_3) /php-srcNEWS /php-src/ext/standard basic_functions.c /php-src/main SAPI.h main.c /php-src/sapi/cgi cgi_main.c /php-src/sapi/cli php_cli.c /php-src/sapi/embed php_embed.c Log: MFH - Changed dl() to be disabled by default. Enabled only when explicitly registered by the SAPI layer. Enabled only with CLI, CGI and EMBED. (Dmitry) [DOC] http://cvs.php.net/viewvc.cgi/php-src/NEWS?r1=1.2027.2.547.2.965.2.428r 2=1.2027.2.547.2.965.2.429diff_format=u Index: php-src/NEWS diff -u php-src/NEWS:1.2027.2.547.2.965.2.428 php-src/NEWS:1.2027.2.547.2.965.2.429 --- php-src/NEWS:1.2027.2.547.2.965.2.428 Tue Dec 30 23:34:29 2008 +++ php-src/NEWSWed Dec 31 14:27:08 2008 @@ -6,6 +6,8 @@ - Deprecated session_register(), session_unregister() and session_is_registered(). (Hannes) +- Changed dl() to be disabled by default. Enabled only when explicitly + registered by the SAPI layer. Enabled only with CLI, CGI and EMBED. (Dmitry) - Changed opendir(), dir() and scandir() to use default context when no context argument is passed. (Sara) - Changed open_basedir to allow tightening in runtime contexts. (Sara) http://cvs.php.net/viewvc.cgi/php-src/ext/standard/basic_functions.c?r1= 1.725.2.31.2.64.2.79r2=1.725.2.31.2.64.2.80diff_format=u Index: php-src/ext/standard/basic_functions.c diff -u php-src/ext/standard/basic_functions.c:1.725.2.31.2.64.2.79 php-src/ext/standard/basic_functions.c:1.725.2.31.2.64.2.80 --- php-src/ext/standard/basic_functions.c:1.725.2.31.2.64.2.79 Wed Dec 31 11:15:44 2008 +++ php-src/ext/standard/basic_functions.c Wed Dec 31 14:27:09 2008 @@ -18,7 +18,7 @@ +--+ */ -/* $Id: basic_functions.c,v 1.725.2.31.2.64.2.79 2008/12/31 11:15:44 sebastian Exp $ */ +/* $Id: basic_functions.c,v 1.725.2.31.2.64.2.80 2008/12/31 14:27:09 helly Exp $ */ #include php.h #include php_streams.h @@ -3025,9 +3025,6 @@ PHP_FE(is_scalar, arginfo_is_scalar) PHP_FE(is_callable, arginfo_is_callable) - /* functions from dl.c */ - PHP_FE(dl, arginfo_dl) - /* functions from file.c */ PHP_FE(pclose, arginfo_pclose) PHP_FE(popen, arginfo_popen) http://cvs.php.net/viewvc.cgi/php-src/main/SAPI.h?r1=1.114.2.1.2.3.2.5r 2=1.114.2.1.2.3.2.6diff_format=u Index: php-src/main/SAPI.h diff -u php-src/main/SAPI.h:1.114.2.1.2.3.2.5 php-src/main/SAPI.h:1.114.2.1.2.3.2.6 --- php-src/main/SAPI.h:1.114.2.1.2.3.2.5 Wed Dec 31 11:15:47 2008 +++ php-src/main/SAPI.h Wed Dec 31 14:27:09 2008 @@ -16,7 +16,7 @@ +--+ */ -/* $Id: SAPI.h,v 1.114.2.1.2.3.2.5 2008/12/31 11:15:47 sebastian Exp $ */ +/* $Id: SAPI.h,v 1.114.2.1.2.3.2.6 2008/12/31 14:27:09 helly Exp $ */ #ifndef SAPI_H #define SAPI_H @@ -264,6 +264,7 @@ int phpinfo_as_text; char *ini_entries; + const zend_function_entry *additional_functions; }; http://cvs.php.net/viewvc.cgi/php-src/main/main.c?r1=1.640.2.23.2.57.2.4 0r2=1.640.2.23.2.57.2.41diff_format=u Index: php-src/main/main.c diff -u php-src/main/main.c
RE: [PHP-CVS] cvs: php-src(PHP_5_3) / NEWS /ext/standard basic_functions.c /main SAPI.h main.c /sapi/cgi cgi_main.c /sapi/cli php_cli.c /sapi/embed php_embed.c
Hi Marcus, I think dl() should also be disabled for FastCGI. It may require a bit of reordering of the code to make this work but I think it's the right thing. If you bump into any problems then maybe Dmitry could help out but he's on vacation for the next couple of weeks. Thanks! Andi -Original Message- From: Marcus Boerger [mailto:he...@php.net] Sent: Wednesday, December 31, 2008 6:27 AM To: php-cvs@lists.php.net; php...@lists.php.net Subject: [PHP-CVS] cvs: php-src(PHP_5_3) / NEWS /ext/standard basic_functions.c /main SAPI.h main.c /sapi/cgi cgi_main.c /sapi/cli php_cli.c /sapi/embed php_embed.c helly Wed Dec 31 14:27:10 2008 UTC Modified files: (Branch: PHP_5_3) /php-srcNEWS /php-src/ext/standard basic_functions.c /php-src/main SAPI.h main.c /php-src/sapi/cgi cgi_main.c /php-src/sapi/cli php_cli.c /php-src/sapi/embed php_embed.c Log: MFH - Changed dl() to be disabled by default. Enabled only when explicitly registered by the SAPI layer. Enabled only with CLI, CGI and EMBED. (Dmitry) [DOC] http://cvs.php.net/viewvc.cgi/php-src/NEWS?r1=1.2027.2.547.2.965.2.428r 2=1.2027.2.547.2.965.2.429diff_format=u Index: php-src/NEWS diff -u php-src/NEWS:1.2027.2.547.2.965.2.428 php-src/NEWS:1.2027.2.547.2.965.2.429 --- php-src/NEWS:1.2027.2.547.2.965.2.428 Tue Dec 30 23:34:29 2008 +++ php-src/NEWSWed Dec 31 14:27:08 2008 @@ -6,6 +6,8 @@ - Deprecated session_register(), session_unregister() and session_is_registered(). (Hannes) +- Changed dl() to be disabled by default. Enabled only when explicitly + registered by the SAPI layer. Enabled only with CLI, CGI and EMBED. (Dmitry) - Changed opendir(), dir() and scandir() to use default context when no context argument is passed. (Sara) - Changed open_basedir to allow tightening in runtime contexts. (Sara) http://cvs.php.net/viewvc.cgi/php-src/ext/standard/basic_functions.c?r1= 1.725.2.31.2.64.2.79r2=1.725.2.31.2.64.2.80diff_format=u Index: php-src/ext/standard/basic_functions.c diff -u php-src/ext/standard/basic_functions.c:1.725.2.31.2.64.2.79 php-src/ext/standard/basic_functions.c:1.725.2.31.2.64.2.80 --- php-src/ext/standard/basic_functions.c:1.725.2.31.2.64.2.79 Wed Dec 31 11:15:44 2008 +++ php-src/ext/standard/basic_functions.c Wed Dec 31 14:27:09 2008 @@ -18,7 +18,7 @@ +--+ */ -/* $Id: basic_functions.c,v 1.725.2.31.2.64.2.79 2008/12/31 11:15:44 sebastian Exp $ */ +/* $Id: basic_functions.c,v 1.725.2.31.2.64.2.80 2008/12/31 14:27:09 helly Exp $ */ #include php.h #include php_streams.h @@ -3025,9 +3025,6 @@ PHP_FE(is_scalar, arginfo_is_scalar) PHP_FE(is_callable, arginfo_is_callable) - /* functions from dl.c */ - PHP_FE(dl, arginfo_dl) - /* functions from file.c */ PHP_FE(pclose, arginfo_pclose) PHP_FE(popen, arginfo_popen) http://cvs.php.net/viewvc.cgi/php-src/main/SAPI.h?r1=1.114.2.1.2.3.2.5r 2=1.114.2.1.2.3.2.6diff_format=u Index: php-src/main/SAPI.h diff -u php-src/main/SAPI.h:1.114.2.1.2.3.2.5 php-src/main/SAPI.h:1.114.2.1.2.3.2.6 --- php-src/main/SAPI.h:1.114.2.1.2.3.2.5 Wed Dec 31 11:15:47 2008 +++ php-src/main/SAPI.h Wed Dec 31 14:27:09 2008 @@ -16,7 +16,7 @@ +--+ */ -/* $Id: SAPI.h,v 1.114.2.1.2.3.2.5 2008/12/31 11:15:47 sebastian Exp $ */ +/* $Id: SAPI.h,v 1.114.2.1.2.3.2.6 2008/12/31 14:27:09 helly Exp $ */ #ifndef SAPI_H #define SAPI_H @@ -264,6 +264,7 @@ int phpinfo_as_text; char *ini_entries; + const zend_function_entry *additional_functions; }; http://cvs.php.net/viewvc.cgi/php-src/main/main.c?r1=1.640.2.23.2.57.2.4 0r2=1.640.2.23.2.57.2.41diff_format=u Index: php-src/main/main.c diff -u php-src/main/main.c:1.640.2.23.2.57.2.40 php-src/main/main.c:1.640.2.23.2.57.2.41 --- php-src/main/main.c:1.640.2.23.2.57.2.40Wed Dec 31 14:05:22 2008 +++ php-src/main/main.c Wed Dec 31 14:27:09 2008 @@ -18,7 +18,7 @@ +--+ */ -/* $Id: main.c,v 1.640.2.23.2.57.2.40 2008/12/31 14:05:22 helly Exp $ */ +/* $Id: main.c,v 1.640.2.23.2.57.2.41 2008/12/31 14:27:09 helly Exp $ */ /* {{{ includes */ @@ -1910,6 +1910,15 @@ /* start Zend extensions */ zend_startup_extensions(); + /* register additional functions */ + if (sapi_module.additional_functions) { + if (zend_hash_find(module_registry, standard, sizeof(standard), (void**)module)==SUCCESS) { + EG(current_module) = module; + zend_register_functions(NULL, sapi_module.additional_functions, NULL, MODULE_PERSISTENT TSRMLS_CC); + EG(current_module) = NULL; + } + } + /* make core report what it should */ if (zend_hash_find
[PHP-CVS] cvs: php-src(PHP_5_3) / NEWS /ext/standard basic_functions.c /main SAPI.h main.c /sapi/cgi cgi_main.c /sapi/cli php_cli.c /sapi/embed php_embed.c
helly Wed Dec 31 14:27:10 2008 UTC Modified files: (Branch: PHP_5_3) /php-srcNEWS /php-src/ext/standard basic_functions.c /php-src/main SAPI.h main.c /php-src/sapi/cgi cgi_main.c /php-src/sapi/cli php_cli.c /php-src/sapi/embed php_embed.c Log: MFH - Changed dl() to be disabled by default. Enabled only when explicitly registered by the SAPI layer. Enabled only with CLI, CGI and EMBED. (Dmitry) [DOC] http://cvs.php.net/viewvc.cgi/php-src/NEWS?r1=1.2027.2.547.2.965.2.428r2=1.2027.2.547.2.965.2.429diff_format=u Index: php-src/NEWS diff -u php-src/NEWS:1.2027.2.547.2.965.2.428 php-src/NEWS:1.2027.2.547.2.965.2.429 --- php-src/NEWS:1.2027.2.547.2.965.2.428 Tue Dec 30 23:34:29 2008 +++ php-src/NEWSWed Dec 31 14:27:08 2008 @@ -6,6 +6,8 @@ - Deprecated session_register(), session_unregister() and session_is_registered(). (Hannes) +- Changed dl() to be disabled by default. Enabled only when explicitly + registered by the SAPI layer. Enabled only with CLI, CGI and EMBED. (Dmitry) - Changed opendir(), dir() and scandir() to use default context when no context argument is passed. (Sara) - Changed open_basedir to allow tightening in runtime contexts. (Sara) http://cvs.php.net/viewvc.cgi/php-src/ext/standard/basic_functions.c?r1=1.725.2.31.2.64.2.79r2=1.725.2.31.2.64.2.80diff_format=u Index: php-src/ext/standard/basic_functions.c diff -u php-src/ext/standard/basic_functions.c:1.725.2.31.2.64.2.79 php-src/ext/standard/basic_functions.c:1.725.2.31.2.64.2.80 --- php-src/ext/standard/basic_functions.c:1.725.2.31.2.64.2.79 Wed Dec 31 11:15:44 2008 +++ php-src/ext/standard/basic_functions.c Wed Dec 31 14:27:09 2008 @@ -18,7 +18,7 @@ +--+ */ -/* $Id: basic_functions.c,v 1.725.2.31.2.64.2.79 2008/12/31 11:15:44 sebastian Exp $ */ +/* $Id: basic_functions.c,v 1.725.2.31.2.64.2.80 2008/12/31 14:27:09 helly Exp $ */ #include php.h #include php_streams.h @@ -3025,9 +3025,6 @@ PHP_FE(is_scalar, arginfo_is_scalar) PHP_FE(is_callable, arginfo_is_callable) - /* functions from dl.c */ - PHP_FE(dl, arginfo_dl) - /* functions from file.c */ PHP_FE(pclose, arginfo_pclose) PHP_FE(popen, arginfo_popen) http://cvs.php.net/viewvc.cgi/php-src/main/SAPI.h?r1=1.114.2.1.2.3.2.5r2=1.114.2.1.2.3.2.6diff_format=u Index: php-src/main/SAPI.h diff -u php-src/main/SAPI.h:1.114.2.1.2.3.2.5 php-src/main/SAPI.h:1.114.2.1.2.3.2.6 --- php-src/main/SAPI.h:1.114.2.1.2.3.2.5 Wed Dec 31 11:15:47 2008 +++ php-src/main/SAPI.h Wed Dec 31 14:27:09 2008 @@ -16,7 +16,7 @@ +--+ */ -/* $Id: SAPI.h,v 1.114.2.1.2.3.2.5 2008/12/31 11:15:47 sebastian Exp $ */ +/* $Id: SAPI.h,v 1.114.2.1.2.3.2.6 2008/12/31 14:27:09 helly Exp $ */ #ifndef SAPI_H #define SAPI_H @@ -264,6 +264,7 @@ int phpinfo_as_text; char *ini_entries; + const zend_function_entry *additional_functions; }; http://cvs.php.net/viewvc.cgi/php-src/main/main.c?r1=1.640.2.23.2.57.2.40r2=1.640.2.23.2.57.2.41diff_format=u Index: php-src/main/main.c diff -u php-src/main/main.c:1.640.2.23.2.57.2.40 php-src/main/main.c:1.640.2.23.2.57.2.41 --- php-src/main/main.c:1.640.2.23.2.57.2.40Wed Dec 31 14:05:22 2008 +++ php-src/main/main.c Wed Dec 31 14:27:09 2008 @@ -18,7 +18,7 @@ +--+ */ -/* $Id: main.c,v 1.640.2.23.2.57.2.40 2008/12/31 14:05:22 helly Exp $ */ +/* $Id: main.c,v 1.640.2.23.2.57.2.41 2008/12/31 14:27:09 helly Exp $ */ /* {{{ includes */ @@ -1910,6 +1910,15 @@ /* start Zend extensions */ zend_startup_extensions(); + /* register additional functions */ + if (sapi_module.additional_functions) { + if (zend_hash_find(module_registry, standard, sizeof(standard), (void**)module)==SUCCESS) { + EG(current_module) = module; + zend_register_functions(NULL, sapi_module.additional_functions, NULL, MODULE_PERSISTENT TSRMLS_CC); + EG(current_module) = NULL; + } + } + /* make core report what it should */ if (zend_hash_find(module_registry, core,
Re: [PHP-CVS] cvs: php-src(PHP_5_3) / NEWS /ext/standard basic_functions.c /main SAPI.h main.c /sapi/cgi cgi_main.c /sapi/cli php_cli.c /sapi/embed php_embed.c
hi Marcus, On Wed, Dec 31, 2008 at 3:27 PM, Marcus Boerger he...@php.net wrote: arginfo_popen) http://cvs.php.net/viewvc.cgi/php-src/main/SAPI.h?r1=1.114.2.1.2.3.2.5r2=1.114.2.1.2.3.2.6diff_format=u Index: php-src/main/SAPI.h diff -u php-src/main/SAPI.h:1.114.2.1.2.3.2.5 php-src/main/SAPI.h:1.114.2.1.2.3.2.6 --- php-src/main/SAPI.h:1.114.2.1.2.3.2.5 Wed Dec 31 11:15:47 2008 +++ php-src/main/SAPI.h Wed Dec 31 14:27:09 2008 @@ -16,7 +16,7 @@ +--+ */ -/* $Id: SAPI.h,v 1.114.2.1.2.3.2.5 2008/12/31 11:15:47 sebastian Exp $ */ +/* $Id: SAPI.h,v 1.114.2.1.2.3.2.6 2008/12/31 14:27:09 helly Exp $ */ #ifndef SAPI_H #define SAPI_H @@ -264,6 +264,7 @@ int phpinfo_as_text; char *ini_entries; + const zend_function_entry *additional_functions; }; This addition breaks the builds, zend_function_entry is not defined at this point and breaks as long as one includes SAPI.h (like ext/filter). Should zend_API.h not included in zend.h? or do you want to manually include it in mainco? Cheers, -- Pierre http://blog.thepimp.net | http://www.libgd.org -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php-src(PHP_5_3) / NEWS /ext/standard basic_functions.c head.c head.h /main SAPI.c SAPI.h /sapi/apache mod_php5.c /sapi/apache2handler sapi_apache2.c /sapi/cgi/tests 011.phpt /sap
lbarnaudThu Nov 13 10:14:04 2008 UTC Added files: (Branch: PHP_5_3) /php-src/sapi/cgi/tests 011.phpt Modified files: /php-srcNEWS /php-src/ext/standard basic_functions.c head.c head.h /php-src/main SAPI.c SAPI.h /php-src/sapi/apachemod_php5.c /php-src/sapi/apache2handlersapi_apache2.c /php-src/sapi/cli php_cli.c Log: Added header_remove() (chsc at peytz dotdk, Arnaud) [DOC] proto void header_remove([string header_name]) Removes an HTTP header previously set using header() The header_name parameter is optionnal, all headers are removed if it is not set [SAPIs] The header_handler callback in sapi_module_struct has been changed, it now take a new argument. When it is set to SAPI_HEADER_DELETE, sapi_header-header is the name of an header, header_handler has to delete it. When it is set to SAPI_HEADER_DELETE_ALL, header_handler has to delete all headers. When sapi_header_op_enum is SAPI_HEADER_ADD or _REPLACE, sapi_header-header is in the form Name: value, header_handler has to add or replace the given header. In all cases, header_handler must not free sapi_header or sapi_header-header. SAPI_HEADER_ADD must be returned if the header has been added or replaced, or 0 in other cases. http://cvs.php.net/viewvc.cgi/php-src/NEWS?r1=1.2027.2.547.2.965.2.375r2=1.2027.2.547.2.965.2.376diff_format=u Index: php-src/NEWS diff -u php-src/NEWS:1.2027.2.547.2.965.2.375 php-src/NEWS:1.2027.2.547.2.965.2.376 --- php-src/NEWS:1.2027.2.547.2.965.2.375 Thu Nov 13 05:47:47 2008 +++ php-src/NEWSThu Nov 13 10:14:03 2008 @@ -10,6 +10,7 @@ parameter validation. (Felipe) - Changed openssl info to show the shared library version number. (Scott) +- Added header_remove() function. (chsc at peytz dot dk, Arnaud) - Added stream_context_get_params() function. (Arnaud) - Added optional parameter new to sybase_connect() (Timm) - Added parse_ini_string() function. (grange at lemonde dot fr, Arnaud) http://cvs.php.net/viewvc.cgi/php-src/ext/standard/basic_functions.c?r1=1.725.2.31.2.64.2.70r2=1.725.2.31.2.64.2.71diff_format=u Index: php-src/ext/standard/basic_functions.c diff -u php-src/ext/standard/basic_functions.c:1.725.2.31.2.64.2.70 php-src/ext/standard/basic_functions.c:1.725.2.31.2.64.2.71 --- php-src/ext/standard/basic_functions.c:1.725.2.31.2.64.2.70 Thu Nov 13 05:47:47 2008 +++ php-src/ext/standard/basic_functions.c Thu Nov 13 10:14:03 2008 @@ -18,7 +18,7 @@ +--+ */ -/* $Id: basic_functions.c,v 1.725.2.31.2.64.2.70 2008/11/13 05:47:47 lbarnaud Exp $ */ +/* $Id: basic_functions.c,v 1.725.2.31.2.64.2.71 2008/11/13 10:14:03 lbarnaud Exp $ */ #include php.h #include php_streams.h @@ -1692,6 +1692,11 @@ ZEND_END_ARG_INFO() static +ZEND_BEGIN_ARG_INFO_EX(arginfo_header_remove, 0, 0, 0) + ZEND_ARG_INFO(0, name) +ZEND_END_ARG_INFO() + +static ZEND_BEGIN_ARG_INFO_EX(arginfo_setcookie, 0, 0, 1) ZEND_ARG_INFO(0, name) ZEND_ARG_INFO(0, value) @@ -3455,6 +3460,7 @@ PHP_FE(setcookie, arginfo_setcookie) PHP_FE(setrawcookie, arginfo_setrawcookie) PHP_FE(header, arginfo_header) + PHP_FE(header_remove, arginfo_header_remove) PHP_FE(headers_sent, arginfo_headers_sent) PHP_FE(headers_list, arginfo_headers_list) http://cvs.php.net/viewvc.cgi/php-src/ext/standard/head.c?r1=1.84.2.1.2.7.2.5r2=1.84.2.1.2.7.2.6diff_format=u Index: php-src/ext/standard/head.c diff -u php-src/ext/standard/head.c:1.84.2.1.2.7.2.5 php-src/ext/standard/head.c:1.84.2.1.2.7.2.6 --- php-src/ext/standard/head.c:1.84.2.1.2.7.2.5Tue Oct 21 22:08:37 2008 +++ php-src/ext/standard/head.c Thu Nov 13 10:14:04 2008 @@ -15,7 +15,7 @@ | Author: Rasmus Lerdorf [EMAIL PROTECTED]| +--+ */ -/* $Id: head.c,v 1.84.2.1.2.7.2.5 2008/10/21 22:08:37 lbarnaud Exp $ */ +/* $Id: head.c,v 1.84.2.1.2.7.2.6 2008/11/13 10:14:04 lbarnaud Exp $ */ #include stdio.h
[PHP-CVS] cvs: php-src(PHP_5_3) / NEWS /ext/standard basic_functions.c streamsfuncs.c streamsfuncs.h /ext/standard/tests/streams stream_context_get_params_001.phpt
lbarnaudThu Nov 13 05:47:48 2008 UTC Added files: (Branch: PHP_5_3) /php-src/ext/standard/tests/streams stream_context_get_params_001.phpt Modified files: /php-src/ext/standard basic_functions.c streamsfuncs.c streamsfuncs.h /php-srcNEWS Log: MFH: Added stream_context_get_params() http://cvs.php.net/viewvc.cgi/php-src/ext/standard/basic_functions.c?r1=1.725.2.31.2.64.2.69r2=1.725.2.31.2.64.2.70diff_format=u Index: php-src/ext/standard/basic_functions.c diff -u php-src/ext/standard/basic_functions.c:1.725.2.31.2.64.2.69 php-src/ext/standard/basic_functions.c:1.725.2.31.2.64.2.70 --- php-src/ext/standard/basic_functions.c:1.725.2.31.2.64.2.69 Wed Nov 5 21:35:02 2008 +++ php-src/ext/standard/basic_functions.c Thu Nov 13 05:47:47 2008 @@ -18,7 +18,7 @@ +--+ */ -/* $Id: basic_functions.c,v 1.725.2.31.2.64.2.69 2008/11/05 21:35:02 lbarnaud Exp $ */ +/* $Id: basic_functions.c,v 1.725.2.31.2.64.2.70 2008/11/13 05:47:47 lbarnaud Exp $ */ #include php.h #include php_streams.h @@ -2402,6 +2402,11 @@ ZEND_END_ARG_INFO() static +ZEND_BEGIN_ARG_INFO_EX(arginfo_stream_context_get_params, 0, ZEND_RETURN_VALUE, 1) + ZEND_ARG_INFO(0, stream_or_context) +ZEND_END_ARG_INFO() + +static ZEND_BEGIN_ARG_INFO_EX(arginfo_stream_context_get_default, 0, 0, 0) ZEND_ARG_INFO(0, options) /* ARRAY_INFO(0, options, 1) */ ZEND_END_ARG_INFO() @@ -3540,6 +3545,7 @@ PHP_FE(stream_select, arginfo_stream_select) PHP_FE(stream_context_create, arginfo_stream_context_create) PHP_FE(stream_context_set_params, arginfo_stream_context_set_params) + PHP_FE(stream_context_get_params, arginfo_stream_context_get_params) PHP_FE(stream_context_set_option, arginfo_stream_context_set_option) PHP_FE(stream_context_get_options, arginfo_stream_context_get_options) PHP_FE(stream_context_get_default, arginfo_stream_context_get_default) http://cvs.php.net/viewvc.cgi/php-src/ext/standard/streamsfuncs.c?r1=1.58.2.6.2.15.2.29r2=1.58.2.6.2.15.2.30diff_format=u Index: php-src/ext/standard/streamsfuncs.c diff -u php-src/ext/standard/streamsfuncs.c:1.58.2.6.2.15.2.29 php-src/ext/standard/streamsfuncs.c:1.58.2.6.2.15.2.30 --- php-src/ext/standard/streamsfuncs.c:1.58.2.6.2.15.2.29 Tue Nov 4 16:46:03 2008 +++ php-src/ext/standard/streamsfuncs.c Thu Nov 13 05:47:47 2008 @@ -17,7 +17,7 @@ +--+ */ -/* $Id: streamsfuncs.c,v 1.58.2.6.2.15.2.29 2008/11/04 16:46:03 lbarnaud Exp $ */ +/* $Id: streamsfuncs.c,v 1.58.2.6.2.15.2.30 2008/11/13 05:47:47 lbarnaud Exp $ */ #include php.h #include php_globals.h @@ -1038,6 +1038,34 @@ } /* }}} */ +/* {{{ proto bool stream_context_get_params(resource context|resource stream) + Get parameters of a file context */ +PHP_FUNCTION(stream_context_get_params) +{ + zval *zcontext, *options; + php_stream_context *context; + + if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, r, zcontext) == FAILURE) { + RETURN_FALSE; + } + + context = decode_context_param(zcontext TSRMLS_CC); + if (!context) { + php_error_docref(NULL TSRMLS_CC, E_WARNING, Invalid stream/context parameter); + RETURN_FALSE; + } + + array_init(return_value); + if (context-notifier context-notifier-ptr context-notifier-func == user_space_stream_notifier) { + add_assoc_zval_ex(return_value, ZEND_STRS(notification), context-notifier-ptr); + Z_ADDREF_P(context-notifier-ptr); + } + ALLOC_INIT_ZVAL(options); + ZVAL_ZVAL(options, context-options, 1, 0); + add_assoc_zval_ex(return_value, ZEND_STRS(options), options); +} +/* }}} */ + /* {{{ proto resource stream_context_get_default([array options]) Get a handle on the default file/stream context and optionally set parameters */ PHP_FUNCTION(stream_context_get_default) http://cvs.php.net/viewvc.cgi/php-src/ext/standard/streamsfuncs.h?r1=1.13.2.1.2.4.2.3r2=1.13.2.1.2.4.2.4diff_format=u Index: php-src/ext/standard/streamsfuncs.h diff -u php-src/ext/standard/streamsfuncs.h:1.13.2.1.2.4.2.3
[PHP-CVS] cvs: php-src(PHP_5_3) / NEWS /ext/standard basic_functions.c basic_functions.h /ext/standard/tests/general_functions parse_ini_string_001.phpt parse_ini_string_002.phpt ZendEngine2 zend_i
lbarnaudWed Nov 5 21:35:03 2008 UTC Added files: (Branch: PHP_5_3) /php-src/ext/standard/tests/general_functions parse_ini_string_001.phpt parse_ini_string_002.phpt Modified files: /php-srcNEWS /ZendEngine2zend_ini_scanner.l /php-src/ext/standard basic_functions.c basic_functions.h Log: MFH: Added parse_ini_string() function (grange at lemonde dot fr, Arnaud) [DOC] new function parse_ini_string() proto array parse_ini_string(string ini_string [, bool process_sections [, int scanner_mode]]) Same as parse_ini_file() except that it takes a string instead of a filename. http://cvs.php.net/viewvc.cgi/php-src/NEWS?r1=1.2027.2.547.2.965.2.363r2=1.2027.2.547.2.965.2.364diff_format=u Index: php-src/NEWS diff -u php-src/NEWS:1.2027.2.547.2.965.2.363 php-src/NEWS:1.2027.2.547.2.965.2.364 --- php-src/NEWS:1.2027.2.547.2.965.2.363 Tue Nov 4 23:01:13 2008 +++ php-src/NEWSWed Nov 5 21:35:01 2008 @@ -10,6 +10,7 @@ parameter validation. (Felipe) - Changed openssl info to show the shared library version number. (Scott) +- Added parse_ini_string() function. (grange at lemonde dot fr, Arnaud) - Added str_getcsv() function. (Sara) - Added ability to send user defined HTTP headers with SOAP request. (Brian J.France, Dmitry) http://cvs.php.net/viewvc.cgi/ZendEngine2/zend_ini_scanner.l?r1=1.41.2.2.2.2.2.12r2=1.41.2.2.2.2.2.13diff_format=u Index: ZendEngine2/zend_ini_scanner.l diff -u ZendEngine2/zend_ini_scanner.l:1.41.2.2.2.2.2.12 ZendEngine2/zend_ini_scanner.l:1.41.2.2.2.2.2.13 --- ZendEngine2/zend_ini_scanner.l:1.41.2.2.2.2.2.12Sun Nov 2 23:36:10 2008 +++ ZendEngine2/zend_ini_scanner.l Wed Nov 5 21:35:02 2008 @@ -20,7 +20,7 @@ +--+ */ -/* $Id: zend_ini_scanner.l,v 1.41.2.2.2.2.2.12 2008/11/02 23:36:10 lbarnaud Exp $ */ +/* $Id: zend_ini_scanner.l,v 1.41.2.2.2.2.2.13 2008/11/05 21:35:02 lbarnaud Exp $ */ #include errno.h #include zend.h @@ -188,7 +188,7 @@ */ char *zend_ini_scanner_get_filename(TSRMLS_D) { - return ini_filename; + return ini_filename ? ini_filename : Unknown; } /* }}} */ @@ -481,7 +481,7 @@ } INITIAL{TABS_AND_SPACES}*[#][^\r\n]*{NEWLINE} { /* #Comment */ - zend_error(E_DEPRECATED, Comments starting with '#' are deprecated in %s on line %d, ini_filename, SCNG(lineno)); + zend_error(E_DEPRECATED, Comments starting with '#' are deprecated in %s on line %d, zend_ini_scanner_get_filename(TSRMLS_C), SCNG(lineno)); BEGIN(INITIAL); SCNG(lineno)++; return END_OF_LINE; http://cvs.php.net/viewvc.cgi/php-src/ext/standard/basic_functions.c?r1=1.725.2.31.2.64.2.68r2=1.725.2.31.2.64.2.69diff_format=u Index: php-src/ext/standard/basic_functions.c diff -u php-src/ext/standard/basic_functions.c:1.725.2.31.2.64.2.68 php-src/ext/standard/basic_functions.c:1.725.2.31.2.64.2.69 --- php-src/ext/standard/basic_functions.c:1.725.2.31.2.64.2.68 Sun Nov 2 21:19:37 2008 +++ php-src/ext/standard/basic_functions.c Wed Nov 5 21:35:02 2008 @@ -18,7 +18,7 @@ +--+ */ -/* $Id: basic_functions.c,v 1.725.2.31.2.64.2.68 2008/11/02 21:19:37 felipe Exp $ */ +/* $Id: basic_functions.c,v 1.725.2.31.2.64.2.69 2008/11/05 21:35:02 lbarnaud Exp $ */ #include php.h #include php_streams.h @@ -989,6 +989,13 @@ ZEND_ARG_INFO(0, scanner_mode) ZEND_END_ARG_INFO() +static +ZEND_BEGIN_ARG_INFO_EX(arginfo_parse_ini_string, 0, 0, 1) +ZEND_ARG_INFO(0, ini_string) +ZEND_ARG_INFO(0, process_sections) +ZEND_ARG_INFO(0, scanner_mode) +ZEND_END_ARG_INFO() + #if ZEND_DEBUG static ZEND_BEGIN_ARG_INFO(arginfo_config_get_hash, 0) @@ -3450,6 +3457,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) + PHP_FE(parse_ini_string, arginfo_parse_ini_string) #if ZEND_DEBUG PHP_FE(config_get_hash, arginfo_config_get_hash) #endif @@ -6372,6 +6380,43 @@ } /* }}} */ +/* {{{ proto array parse_ini_string(string ini_string [, bool process_sections [, int scanner_mode]]) + Parse configuration string */
[PHP-CVS] cvs: php-src(PHP_5_3) / NEWS /ext/standard basic_functions.c streamsfuncs.c streamsfuncs.h
bjori Sat Aug 16 10:57:56 2008 UTC Modified files: (Branch: PHP_5_3) /php-srcNEWS /php-src/ext/standard basic_functions.c streamsfuncs.c streamsfuncs.h Log: MFH: [DOC] Added stream_context_set_default() function. (Davey Shafik) http://cvs.php.net/viewvc.cgi/php-src/NEWS?r1=1.2027.2.547.2.965.2.271r2=1.2027.2.547.2.965.2.272diff_format=u Index: php-src/NEWS diff -u php-src/NEWS:1.2027.2.547.2.965.2.271 php-src/NEWS:1.2027.2.547.2.965.2.272 --- php-src/NEWS:1.2027.2.547.2.965.2.271 Fri Aug 15 19:31:04 2008 +++ php-src/NEWSSat Aug 16 10:57:54 2008 @@ -12,6 +12,7 @@ - Added litespeed SAPI module. (George Wang) - Added ext/hash support to ext/session's ID generator. (Sara) - Added quoted_printable_encode() function. (Tony) +- Added stream_context_set_default() function. (Davey Shafik) - Added optional is_xhtml parameter to nl2br() which makes the function output br when false and br / when true (FR #34381). (Kalle) http://cvs.php.net/viewvc.cgi/php-src/ext/standard/basic_functions.c?r1=1.725.2.31.2.64.2.50r2=1.725.2.31.2.64.2.51diff_format=u Index: php-src/ext/standard/basic_functions.c diff -u php-src/ext/standard/basic_functions.c:1.725.2.31.2.64.2.50 php-src/ext/standard/basic_functions.c:1.725.2.31.2.64.2.51 --- php-src/ext/standard/basic_functions.c:1.725.2.31.2.64.2.50 Thu Aug 14 10:12:19 2008 +++ php-src/ext/standard/basic_functions.c Sat Aug 16 10:57:56 2008 @@ -18,7 +18,7 @@ +--+ */ -/* $Id: basic_functions.c,v 1.725.2.31.2.64.2.50 2008/08/14 10:12:19 tony2001 Exp $ */ +/* $Id: basic_functions.c,v 1.725.2.31.2.64.2.51 2008/08/16 10:57:56 bjori Exp $ */ #include php.h #include php_streams.h @@ -2396,6 +2396,11 @@ ZEND_END_ARG_INFO() static +ZEND_BEGIN_ARG_INFO(arginfo_stream_context_set_default, 0) + ZEND_ARG_INFO(0, options) +ZEND_END_ARG_INFO() + +static ZEND_BEGIN_ARG_INFO_EX(arginfo_stream_context_create, 0, 0, 0) ZEND_ARG_INFO(0, options) /* ARRAY_INFO(0, options, 1) */ ZEND_END_ARG_INFO() @@ -3520,6 +3525,7 @@ PHP_FE(stream_context_set_option, arginfo_stream_context_set_option) PHP_FE(stream_context_get_options, arginfo_stream_context_get_options) PHP_FE(stream_context_get_default, arginfo_stream_context_get_default) + PHP_FE(stream_context_set_default, arginfo_stream_context_set_default) PHP_FE(stream_filter_prepend, arginfo_stream_filter_prepend) PHP_FE(stream_filter_append, arginfo_stream_filter_append) PHP_FE(stream_filter_remove, arginfo_stream_filter_remove) http://cvs.php.net/viewvc.cgi/php-src/ext/standard/streamsfuncs.c?r1=1.58.2.6.2.15.2.19r2=1.58.2.6.2.15.2.20diff_format=u Index: php-src/ext/standard/streamsfuncs.c diff -u php-src/ext/standard/streamsfuncs.c:1.58.2.6.2.15.2.19 php-src/ext/standard/streamsfuncs.c:1.58.2.6.2.15.2.20 --- php-src/ext/standard/streamsfuncs.c:1.58.2.6.2.15.2.19 Wed Jul 23 11:25:14 2008 +++ php-src/ext/standard/streamsfuncs.c Sat Aug 16 10:57:56 2008 @@ -17,7 +17,7 @@ +--+ */ -/* $Id: streamsfuncs.c,v 1.58.2.6.2.15.2.19 2008/07/23 11:25:14 tony2001 Exp $ */ +/* $Id: streamsfuncs.c,v 1.58.2.6.2.15.2.20 2008/08/16 10:57:56 bjori Exp $ */ #include php.h #include php_globals.h @@ -1047,6 +1047,28 @@ } /* }}} */ +/* {{{ proto resource stream_context_set_default(array options) + Set default file/stream context, returns the context as a resource */ +PHP_FUNCTION(stream_context_set_default) +{ + zval *options = NULL; + php_stream_context *context; + + if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, a, options) == FAILURE) { + return; + } + + if (FG(default_context) == NULL) { + FG(default_context) = php_stream_context_alloc(); + } + context = FG(default_context); + + parse_context_options(context, options TSRMLS_CC); + + php_stream_context_to_zval(context, return_value); +} +/* }}} */ + /* {{{ proto resource stream_context_create([array options[, array params]]) Create a file context and optionally set parameters */ PHP_FUNCTION(stream_context_create)
Re: [PHP-CVS] cvs: php-src(PHP_5_3) / NEWS /ext/standard basic_functions.c string.c
On Thu, Aug 14, 2008 at 04:56, Kalle Sommer Nielsen [EMAIL PROTECTED] wrote: kalle Thu Aug 14 02:56:23 2008 UTC Modified files: (Branch: PHP_5_3) /php-srcNEWS /php-src/ext/standard basic_functions.c string.c Log: MFH: Implemented feature request #34381 (nl2br() should have an option for XHTML/HTML compatible BR element) http://cvs.php.net/viewvc.cgi/php-src/NEWS?r1=1.2027.2.547.2.965.2.266r2=1.2027.2.547.2.965.2.267diff_format=u Index: php-src/NEWS diff -u php-src/NEWS:1.2027.2.547.2.965.2.266 php-src/NEWS:1.2027.2.547.2.965.2.267 --- php-src/NEWS:1.2027.2.547.2.965.2.266 Wed Aug 13 11:20:25 2008 +++ php-src/NEWSThu Aug 14 02:56:22 2008 @@ -12,6 +12,9 @@ - Added litespeed SAPI module. (George Wang) - Added ext/hash support to ext/session's ID generator. (Sara) +- Implemented feature request #34381 (nl2br() should have an option for + XHTML/HTML compatible BR element) (Kalle) Cool. And nice that you documented it right away.. but remember to add it to the scratchpad so it will be included in the upgrade guide. http://cvs.php.net/viewvc.cgi/php-src/ext/standard/basic_functions.c?r1=1.725.2.31.2.64.2.46r2=1.725.2.31.2.64.2.47diff_format=u Index: php-src/ext/standard/basic_functions.c diff -u php-src/ext/standard/basic_functions.c:1.725.2.31.2.64.2.46 php-src/ext/standard/basic_functions.c:1.725.2.31.2.64.2.47 --- php-src/ext/standard/basic_functions.c:1.725.2.31.2.64.2.46 Thu Aug 7 09:25:32 2008 +++ php-src/ext/standard/basic_functions.c Thu Aug 14 02:56:22 2008 @@ -18,7 +18,7 @@ +--+ */ -/* $Id: basic_functions.c,v 1.725.2.31.2.64.2.46 2008/08/07 09:25:32 lbarnaud Exp $ */ +/* $Id: basic_functions.c,v 1.725.2.31.2.64.2.47 2008/08/14 02:56:22 kalle Exp $ */ #include php.h #include php_streams.h @@ -2739,6 +2739,7 @@ static ZEND_BEGIN_ARG_INFO(arginfo_nl2br, 0) ZEND_ARG_INFO(0, str) + ZEND_ARG_INFO(0, is_xhtml) This is wrong. is_xhtml is optional. it should be ZEND_BEGIN_ARG_INFO(arginfo_nl2br, 0, 0, 1) -Hannes -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php-src(PHP_5_3) / NEWS /ext/standard basic_functions.c string.c
kalle Thu Aug 14 02:56:23 2008 UTC Modified files: (Branch: PHP_5_3) /php-srcNEWS /php-src/ext/standard basic_functions.c string.c Log: MFH: Implemented feature request #34381 (nl2br() should have an option for XHTML/HTML compatible BR element) http://cvs.php.net/viewvc.cgi/php-src/NEWS?r1=1.2027.2.547.2.965.2.266r2=1.2027.2.547.2.965.2.267diff_format=u Index: php-src/NEWS diff -u php-src/NEWS:1.2027.2.547.2.965.2.266 php-src/NEWS:1.2027.2.547.2.965.2.267 --- php-src/NEWS:1.2027.2.547.2.965.2.266 Wed Aug 13 11:20:25 2008 +++ php-src/NEWSThu Aug 14 02:56:22 2008 @@ -12,6 +12,9 @@ - Added litespeed SAPI module. (George Wang) - Added ext/hash support to ext/session's ID generator. (Sara) +- Implemented feature request #34381 (nl2br() should have an option for + XHTML/HTML compatible BR element) (Kalle) + - Fixed a bug causing miscalculations with the last weekday of n month relative time string. (Derick) http://cvs.php.net/viewvc.cgi/php-src/ext/standard/basic_functions.c?r1=1.725.2.31.2.64.2.46r2=1.725.2.31.2.64.2.47diff_format=u Index: php-src/ext/standard/basic_functions.c diff -u php-src/ext/standard/basic_functions.c:1.725.2.31.2.64.2.46 php-src/ext/standard/basic_functions.c:1.725.2.31.2.64.2.47 --- php-src/ext/standard/basic_functions.c:1.725.2.31.2.64.2.46 Thu Aug 7 09:25:32 2008 +++ php-src/ext/standard/basic_functions.c Thu Aug 14 02:56:22 2008 @@ -18,7 +18,7 @@ +--+ */ -/* $Id: basic_functions.c,v 1.725.2.31.2.64.2.46 2008/08/07 09:25:32 lbarnaud Exp $ */ +/* $Id: basic_functions.c,v 1.725.2.31.2.64.2.47 2008/08/14 02:56:22 kalle Exp $ */ #include php.h #include php_streams.h @@ -2739,6 +2739,7 @@ static ZEND_BEGIN_ARG_INFO(arginfo_nl2br, 0) ZEND_ARG_INFO(0, str) + ZEND_ARG_INFO(0, is_xhtml) ZEND_END_ARG_INFO() static http://cvs.php.net/viewvc.cgi/php-src/ext/standard/string.c?r1=1.445.2.14.2.69.2.33r2=1.445.2.14.2.69.2.34diff_format=u Index: php-src/ext/standard/string.c diff -u php-src/ext/standard/string.c:1.445.2.14.2.69.2.33 php-src/ext/standard/string.c:1.445.2.14.2.69.2.34 --- php-src/ext/standard/string.c:1.445.2.14.2.69.2.33 Thu Jul 31 14:20:40 2008 +++ php-src/ext/standard/string.c Thu Aug 14 02:56:23 2008 @@ -18,7 +18,7 @@ +--+ */ -/* $Id: string.c,v 1.445.2.14.2.69.2.33 2008/07/31 14:20:40 ohill Exp $ */ +/* $Id: string.c,v 1.445.2.14.2.69.2.34 2008/08/14 02:56:23 kalle Exp $ */ /* Synced with php 3.0 revision 1.193 1999-06-16 [ssb] */ @@ -3887,18 +3887,19 @@ } /* }}} */ -/* {{{ proto string nl2br(string str) +/* {{{ proto string nl2br(string str [, bool is_xhtml]) Converts newlines to HTML line breaks */ PHP_FUNCTION(nl2br) { - /* in brief this inserts br / before matched regexp \n\r?|\r\n? */ - char*tmp, *str; - int new_length; - char*end, *target; - int repl_cnt = 0; - int str_len; + /* in brief this inserts br / or br before matched regexp \n\r?|\r\n? */ + char*tmp, *str; + int new_length; + char*end, *target; + int repl_cnt = 0; + int str_len; + zend_bool is_xhtml = 1; - if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, s, str, str_len) == FAILURE) { + if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, s|b, str, str_len, is_xhtml) == FAILURE) { return; } @@ -3927,7 +3928,12 @@ RETURN_STRINGL(str, str_len, 1); } - new_length = str_len + repl_cnt * (sizeof(br /) - 1); + if (is_xhtml) { + new_length = str_len + repl_cnt * (sizeof(br /) - 1); + } else { + new_length = str_len + repl_cnt * (sizeof(br) - 1); + } + tmp = target = emalloc(new_length + 1); while (str end) { @@ -3937,8 +3943,12 @@ *target++ = ''; *target++ = 'b'; *target++ = 'r'; - *target++ = ' '; - *target++ = '/'; + + if (is_xhtml) { + *target++ = ' '; + *target++ = '/'; + } + *target++ = ''; if ((*str == '\r' *(str+1) == '\n') || (*str == '\n' *(str+1) == '\r')) { -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php-src(PHP_5_3) / NEWS /ext/standard basic_functions.c filestat.c php_filestat.h /ext/standard/tests/file bug39367.phpt clearstatcache_001.phpt clearstatcache_error.phpt /main/strea
lbarnaudThu Aug 7 09:25:33 2008 UTC Added files: (Branch: PHP_5_3) /php-src/ext/standard/tests/fileclearstatcache_001.phpt Modified files: /php-srcNEWS /php-src/ext/standard basic_functions.c filestat.c php_filestat.h /php-src/ext/standard/tests/filebug39367.phpt clearstatcache_error.phpt /php-src/main/streams plain_wrapper.c Log: MFH: Added clear_realpath_cache and filename parameters to clearstatcache() (Jani, Arnaud) [DOC] clearstatcache() now defaults to not affect the realpath cache. clearstatcache() now takes two optionnal parameters, clear_realpath_cache to clear the realpath cache (defaults to false), and filename to clear only the given filename from the cache. http://cvs.php.net/viewvc.cgi/php-src/NEWS?r1=1.2027.2.547.2.965.2.253r2=1.2027.2.547.2.965.2.254diff_format=u Index: php-src/NEWS diff -u php-src/NEWS:1.2027.2.547.2.965.2.253 php-src/NEWS:1.2027.2.547.2.965.2.254 --- php-src/NEWS:1.2027.2.547.2.965.2.253 Wed Aug 6 21:31:45 2008 +++ php-src/NEWSThu Aug 7 09:25:32 2008 @@ -2,6 +2,8 @@ ||| ?? ??? 200?, PHP 5.3.0 Alpha 2 - Removed shebang line check from CGI sapi (it is checked by scanner) (Dmitry) +- Added clear_realpath_cache and filename parameters to clearstatcache() (Jani, + Arnaud) - Added litespeed SAPI module. (George Wang) - Added ext/hash support to ext/session's ID generator. (Sara) http://cvs.php.net/viewvc.cgi/php-src/ext/standard/basic_functions.c?r1=1.725.2.31.2.64.2.45r2=1.725.2.31.2.64.2.46diff_format=u Index: php-src/ext/standard/basic_functions.c diff -u php-src/ext/standard/basic_functions.c:1.725.2.31.2.64.2.45 php-src/ext/standard/basic_functions.c:1.725.2.31.2.64.2.46 --- php-src/ext/standard/basic_functions.c:1.725.2.31.2.64.2.45 Sun Aug 3 12:15:55 2008 +++ php-src/ext/standard/basic_functions.c Thu Aug 7 09:25:32 2008 @@ -18,7 +18,7 @@ +--+ */ -/* $Id: basic_functions.c,v 1.725.2.31.2.64.2.45 2008/08/03 12:15:55 jani Exp $ */ +/* $Id: basic_functions.c,v 1.725.2.31.2.64.2.46 2008/08/07 09:25:32 lbarnaud Exp $ */ #include php.h #include php_streams.h @@ -1507,7 +1507,9 @@ #endif static -ZEND_BEGIN_ARG_INFO(arginfo_clearstatcache, 0) +ZEND_BEGIN_ARG_INFO_EX(arginfo_clearstatcache, 0, 0, 0) + ZEND_ARG_INFO(0, clear_realpath_cache) + ZEND_ARG_INFO(0, filename) ZEND_END_ARG_INFO() static http://cvs.php.net/viewvc.cgi/php-src/ext/standard/filestat.c?r1=1.136.2.8.2.14.2.6r2=1.136.2.8.2.14.2.7diff_format=u Index: php-src/ext/standard/filestat.c diff -u php-src/ext/standard/filestat.c:1.136.2.8.2.14.2.6 php-src/ext/standard/filestat.c:1.136.2.8.2.14.2.7 --- php-src/ext/standard/filestat.c:1.136.2.8.2.14.2.6 Mon Mar 10 22:12:36 2008 +++ php-src/ext/standard/filestat.c Thu Aug 7 09:25:33 2008 @@ -16,7 +16,7 @@ +--+ */ -/* $Id: filestat.c,v 1.136.2.8.2.14.2.6 2008/03/10 22:12:36 felipe Exp $ */ +/* $Id: filestat.c,v 1.136.2.8.2.14.2.7 2008/08/07 09:25:33 lbarnaud Exp $ */ #include php.h #include safe_mode.h @@ -712,8 +712,11 @@ /* {{{ php_clear_stat_cache() */ -PHPAPI void php_clear_stat_cache(TSRMLS_D) +PHPAPI void php_clear_stat_cache(zend_bool clear_realpath_cache, const char *filename, int filename_len TSRMLS_DC) { + /* always clear CurrentStatFile and CurrentLStatFile even if filename is not NULL +* as it may contains outdated data (e.g. nlink for a directory when deleting a file +* in this directory, as shown by lstat_stat_variation9.phpt) */ if (BG(CurrentStatFile)) { efree(BG(CurrentStatFile)); BG(CurrentStatFile) = NULL; @@ -722,18 +725,29 @@ efree(BG(CurrentLStatFile)); BG(CurrentLStatFile) = NULL; } - realpath_cache_clean(TSRMLS_C); + if (clear_realpath_cache) { + if (filename != NULL) { + realpath_cache_del(filename, filename_len TSRMLS_CC); + } else { + realpath_cache_clean(TSRMLS_C); + } + } } /* }}} */ -/* {{{ proto void clearstatcache(void) +/* {{{ proto void clearstatcache([bool clear_realpath_cache[, string filename]]) Clear file stat cache */ PHP_FUNCTION(clearstatcache) { - if (zend_parse_parameters_none() == FAILURE) { + zend_bool clear_realpath_cache = 0; + char *filename = NULL; + intfilename_len; + + if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, |bs, clear_realpath_cache, filename, filename_len) == FAILURE) { return; } - php_clear_stat_cache(TSRMLS_C); + +
[PHP-CVS] cvs: php-src(PHP_5_3) / NEWS /ext/standard basic_functions.c math.c php_math.h /ext/standard/tests/math acosh_basic.phpt acosh_error.phpt acosh_variation.phpt asinh_basic.phpt asinh_error.
kalle Mon May 5 07:29:42 2008 UTC Modified files: (Branch: PHP_5_3) /php-srcNEWS /php-src/ext/standard basic_functions.c math.c php_math.h /php-src/ext/standard/tests/mathacosh_basic.phpt acosh_error.phpt acosh_variation.phpt asinh_basic.phpt asinh_error.phpt asinh_variation.phpt atanh_basic.phpt atanh_error.phpt atanh_variation.phpt Log: Merge PHP_5_3 - Implemented Windows support for asinh(), acosh(), atanh(), log1p() and expm1() [DOC] Merge_5_3 http://cvs.php.net/viewvc.cgi/php-src/NEWS?r1=1.2027.2.547.2.965.2.173r2=1.2027.2.547.2.965.2.174diff_format=u Index: php-src/NEWS diff -u php-src/NEWS:1.2027.2.547.2.965.2.173 php-src/NEWS:1.2027.2.547.2.965.2.174 --- php-src/NEWS:1.2027.2.547.2.965.2.173 Sun May 4 20:52:36 2008 +++ php-src/NEWSMon May 5 07:29:41 2008 @@ -1,4 +1,4 @@ -PHPNEWS +PHP NEWS ||| ?? ??? 20??, PHP 5.3.0 - Removed the experimental RPL (master/slave) functions from mysqli. (Andrey) @@ -106,6 +106,7 @@ - Added request_order INI variable to control specifically $_REQUEST behavior. (Stas) - Added forward_static_call(_array) to complete LSB. (Mike Lively) +- Added Windows support for asinh(), acosh(), atanh(), log1p() and expm1() (Kalle) - Improved PHP runtime speed and memory usage: . Lazy EG(active_symbol_table) initialization. (Dmitry) http://cvs.php.net/viewvc.cgi/php-src/ext/standard/basic_functions.c?r1=1.725.2.31.2.64.2.29r2=1.725.2.31.2.64.2.30diff_format=u Index: php-src/ext/standard/basic_functions.c diff -u php-src/ext/standard/basic_functions.c:1.725.2.31.2.64.2.29 php-src/ext/standard/basic_functions.c:1.725.2.31.2.64.2.30 --- php-src/ext/standard/basic_functions.c:1.725.2.31.2.64.2.29 Mon Apr 21 14:32:57 2008 +++ php-src/ext/standard/basic_functions.c Mon May 5 07:29:41 2008 @@ -18,7 +18,7 @@ +--+ */ -/* $Id: basic_functions.c,v 1.725.2.31.2.64.2.29 2008/04/21 14:32:57 iliaa Exp $ */ +/* $Id: basic_functions.c,v 1.725.2.31.2.64.2.30 2008/05/05 07:29:41 kalle Exp $ */ #include php.h #include php_streams.h @@ -1933,26 +1933,20 @@ ZEND_ARG_INFO(0, number) ZEND_END_ARG_INFO() -#ifdef HAVE_ASINH static ZEND_BEGIN_ARG_INFO(arginfo_asinh, 0) ZEND_ARG_INFO(0, number) ZEND_END_ARG_INFO() -#endif -#ifdef HAVE_ACOSH static ZEND_BEGIN_ARG_INFO(arginfo_acosh, 0) ZEND_ARG_INFO(0, number) ZEND_END_ARG_INFO() -#endif -#ifdef HAVE_ATANH static ZEND_BEGIN_ARG_INFO(arginfo_atanh, 0) ZEND_ARG_INFO(0, number) ZEND_END_ARG_INFO() -#endif static ZEND_BEGIN_ARG_INFO(arginfo_pi, 0) @@ -1984,19 +1978,15 @@ ZEND_ARG_INFO(0, number) ZEND_END_ARG_INFO() -#if !defined(PHP_WIN32) !defined(NETWARE) static ZEND_BEGIN_ARG_INFO(arginfo_expm1, 0) ZEND_ARG_INFO(0, number) ZEND_END_ARG_INFO() -# ifdef HAVE_LOG1P static ZEND_BEGIN_ARG_INFO(arginfo_log1p, 0) ZEND_ARG_INFO(0, number) ZEND_END_ARG_INFO() -# endif -#endif /* !defined(PHP_WIN32) !defined(NETWARE) */ static ZEND_BEGIN_ARG_INFO_EX(arginfo_log, 0, 0, 1) @@ -3291,23 +3281,10 @@ PHP_FE(sinh, arginfo_sinh) PHP_FE(cosh, arginfo_cosh) PHP_FE(tanh, arginfo_tanh) - -#ifdef HAVE_ASINH PHP_FE(asinh, arginfo_asinh) -#endif -#ifdef HAVE_ACOSH PHP_FE(acosh, arginfo_acosh) -#endif -#ifdef HAVE_ATANH - PHP_FE(atanh, arginfo_atanh) -#endif -#if !defined(PHP_WIN32) !defined(NETWARE) PHP_FE(expm1, arginfo_expm1) -# ifdef HAVE_LOG1P PHP_FE(log1p, arginfo_log1p) -# endif -#endif - PHP_FE(pi,
[PHP-CVS] cvs: php-src(PHP_5_3) / NEWS /ext/standard basic_functions.c basic_functions.h /ext/standard/tests/class_object forward_static_call_001.phpt forward_static_call_002.phpt forward_static_cal
colder Mon Apr 7 10:44:59 2008 UTC Added files: (Branch: PHP_5_3) /php-src/ext/standard/tests/class_object forward_static_call_001.phpt forward_static_call_002.phpt forward_static_call_003.phpt Modified files: /php-srcNEWS /php-src/ext/standard basic_functions.c basic_functions.h Log: MFH: Implement forward_static_call(_array) to complete LSB. Patch by Mike Lively http://cvs.php.net/viewvc.cgi/php-src/NEWS?r1=1.2027.2.547.2.965.2.154r2=1.2027.2.547.2.965.2.155diff_format=u Index: php-src/NEWS diff -u php-src/NEWS:1.2027.2.547.2.965.2.154 php-src/NEWS:1.2027.2.547.2.965.2.155 --- php-src/NEWS:1.2027.2.547.2.965.2.154 Sat Apr 5 23:50:21 2008 +++ php-src/NEWSMon Apr 7 10:44:59 2008 @@ -86,6 +86,7 @@ - Added PREG_BAD_UTF8_OFFSET_ERROR constant. (Nuno) - Added request_order INI variable to control specifically $_REQUEST behavior. (Stas) +- Added forward_static_call(_array) to complete LSB. (Mike Lively) - Improved PHP runtime speed and memory usage: . Replaced flex based scanner with re2c based scanner. (Marcus, Nuno, Scott) http://cvs.php.net/viewvc.cgi/php-src/ext/standard/basic_functions.c?r1=1.725.2.31.2.64.2.23r2=1.725.2.31.2.64.2.24diff_format=u Index: php-src/ext/standard/basic_functions.c diff -u php-src/ext/standard/basic_functions.c:1.725.2.31.2.64.2.23 php-src/ext/standard/basic_functions.c:1.725.2.31.2.64.2.24 --- php-src/ext/standard/basic_functions.c:1.725.2.31.2.64.2.23 Thu Mar 20 00:52:46 2008 +++ php-src/ext/standard/basic_functions.c Mon Apr 7 10:44:59 2008 @@ -18,7 +18,7 @@ +--+ */ -/* $Id: basic_functions.c,v 1.725.2.31.2.64.2.23 2008/03/20 00:52:46 dsp Exp $ */ +/* $Id: basic_functions.c,v 1.725.2.31.2.64.2.24 2008/04/07 10:44:59 colder Exp $ */ #include php.h #include php_streams.h @@ -811,6 +811,19 @@ ZEND_END_ARG_INFO() static +ZEND_BEGIN_ARG_INFO_EX(arginfo_forward_static_call, 0, 0, 1) + ZEND_ARG_INFO(0, function_name) + ZEND_ARG_INFO(0, parameter) + ZEND_ARG_INFO(0, ...) +ZEND_END_ARG_INFO() + +static +ZEND_BEGIN_ARG_INFO_EX(arginfo_forward_static_call_array, 0, 0, 2) + ZEND_ARG_INFO(0, function_name) + ZEND_ARG_INFO(0, parameters) /* ARRAY_INFO(0, parameters, 1) */ +ZEND_END_ARG_INFO() + +static ZEND_BEGIN_ARG_INFO(arginfo_register_shutdown_function, 0) ZEND_ARG_INFO(0, function_name) ZEND_END_ARG_INFO() @@ -3364,6 +3377,8 @@ PHP_FE(call_user_func_array, arginfo_call_user_func_array) PHP_DEP_FE(call_user_method, arginfo_call_user_method) PHP_DEP_FE(call_user_method_array, arginfo_call_user_method_array) + PHP_FE(forward_static_call, arginfo_forward_static_call) + PHP_FE(forward_static_call_array, arginfo_forward_static_call_array) PHP_FE(serialize, arginfo_serialize) PHP_FE(unserialize, arginfo_unserialize) @@ -5228,6 +5243,67 @@ } /* }}} */ +/* {{{ proto mixed forward_static_call(mixed function_name [, mixed parmeter] [, mixed ...]) U + Call a user function which is the first parameter */ +PHP_FUNCTION(forward_static_call) +{ + zval *retval_ptr = NULL; + zend_fcall_info fci; + zend_fcall_info_cache fci_cache; + + if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, f*, fci, fci_cache, fci.params, fci.param_count) == FAILURE) { + return; + } + + if (!EG(active_op_array)-scope) { + zend_error(E_ERROR, Cannot call forward_static_call() when no class scope is active); + } + + fci.retval_ptr_ptr = retval_ptr; + + if (EG(called_scope) + instanceof_function(EG(called_scope), fci_cache.calling_scope TSRMLS_CC)) { + fci_cache.calling_scope = EG(called_scope); + } + + if (zend_call_function(fci, fci_cache TSRMLS_CC) == SUCCESS fci.retval_ptr_ptr *fci.retval_ptr_ptr) { + COPY_PZVAL_TO_ZVAL(*return_value, *fci.retval_ptr_ptr); + } + + if (fci.params) { + efree(fci.params); + } +} +/* }}} */ + +/* {{{ proto mixed call_user_func_array(string
[PHP-CVS] cvs: php-src(PHP_5_3) / NEWS /ext/standard basic_functions.c streamsfuncs.c streamsfuncs.h /ext/standard/tests/file stream_supports_lock.phpt
johannesTue Nov 20 22:17:01 2007 UTC Added files: (Branch: PHP_5_3) /php-src/ext/standard/tests/filestream_supports_lock.phpt Modified files: /php-src/ext/standard streamsfuncs.c streamsfuncs.h basic_functions.c /php-srcNEWS Log: MFH: Add stream_supports_lock() function (Benjamin Schulz) http://cvs.php.net/viewvc.cgi/php-src/ext/standard/streamsfuncs.c?r1=1.58.2.6.2.15.2.5r2=1.58.2.6.2.15.2.6diff_format=u Index: php-src/ext/standard/streamsfuncs.c diff -u php-src/ext/standard/streamsfuncs.c:1.58.2.6.2.15.2.5 php-src/ext/standard/streamsfuncs.c:1.58.2.6.2.15.2.6 --- php-src/ext/standard/streamsfuncs.c:1.58.2.6.2.15.2.5 Thu Nov 8 13:29:25 2007 +++ php-src/ext/standard/streamsfuncs.c Tue Nov 20 22:17:00 2007 @@ -17,7 +17,7 @@ +--+ */ -/* $Id: streamsfuncs.c,v 1.58.2.6.2.15.2.5 2007/11/08 13:29:25 dmitry Exp $ */ +/* $Id: streamsfuncs.c,v 1.58.2.6.2.15.2.6 2007/11/20 22:17:00 johannes Exp $ */ #include php.h #include php_globals.h @@ -1375,6 +1375,26 @@ } /* }}} */ +/* {{{ proto bool stream_supports_lock(resource stream) + Tells wether the stream supports locking through flock(). */ +PHP_FUNCTION(stream_supports_lock) +{ + php_stream *stream; + zval *zsrc; + + if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, r, zsrc) == FAILURE) { + RETURN_FALSE; + } + + php_stream_from_zval(stream, zsrc); + + if (!php_stream_supports_lock(stream)) { + RETURN_FALSE; + } + + RETURN_TRUE; +} + #ifdef HAVE_SHUTDOWN /* {{{ proto int stream_socket_shutdown(resource stream, int how) causes all or part of a full-duplex connection on the socket associated http://cvs.php.net/viewvc.cgi/php-src/ext/standard/streamsfuncs.h?r1=1.13.2.1.2.4r2=1.13.2.1.2.4.2.1diff_format=u Index: php-src/ext/standard/streamsfuncs.h diff -u php-src/ext/standard/streamsfuncs.h:1.13.2.1.2.4 php-src/ext/standard/streamsfuncs.h:1.13.2.1.2.4.2.1 --- php-src/ext/standard/streamsfuncs.h:1.13.2.1.2.4Mon Jul 9 17:27:24 2007 +++ php-src/ext/standard/streamsfuncs.h Tue Nov 20 22:17:00 2007 @@ -16,7 +16,7 @@ +--+ */ -/* $Id: streamsfuncs.h,v 1.13.2.1.2.4 2007/07/09 17:27:24 dmitry Exp $ */ +/* $Id: streamsfuncs.h,v 1.13.2.1.2.4.2.1 2007/11/20 22:17:00 johannes Exp $ */ /* Flags for stream_socket_client */ #define PHP_STREAM_CLIENT_PERSISTENT 1 @@ -56,6 +56,7 @@ PHP_FUNCTION(stream_socket_shutdown); PHP_FUNCTION(stream_socket_pair); PHP_FUNCTION(stream_is_local); +PHP_FUNCTION(stream_supports_lock); /* * Local variables: http://cvs.php.net/viewvc.cgi/php-src/ext/standard/basic_functions.c?r1=1.725.2.31.2.64.2.12r2=1.725.2.31.2.64.2.13diff_format=u Index: php-src/ext/standard/basic_functions.c diff -u php-src/ext/standard/basic_functions.c:1.725.2.31.2.64.2.12 php-src/ext/standard/basic_functions.c:1.725.2.31.2.64.2.13 --- php-src/ext/standard/basic_functions.c:1.725.2.31.2.64.2.12 Thu Nov 15 13:13:21 2007 +++ php-src/ext/standard/basic_functions.c Tue Nov 20 22:17:00 2007 @@ -17,7 +17,7 @@ +--+ */ -/* $Id: basic_functions.c,v 1.725.2.31.2.64.2.12 2007/11/15 13:13:21 bjori Exp $ */ +/* $Id: basic_functions.c,v 1.725.2.31.2.64.2.13 2007/11/20 22:17:00 johannes Exp $ */ #include php.h #include php_streams.h @@ -2319,6 +2319,11 @@ ZEND_END_ARG_INFO() static +ZEND_BEGIN_ARG_INFO_EX(arginfo_stream_supports_lock, 0, 0, 1) +ZEND_ARG_INFO(0, stream) +ZEND_END_ARG_INFO() + +static ZEND_BEGIN_ARG_INFO_EX(arginfo_stream_select, 0, 0, 4) ZEND_ARG_INFO(1, read_streams) /* ARRAY_INFO(1, read_streams, 1) */ ZEND_ARG_INFO(1, write_streams) /* ARRAY_INFO(1, write_streams, 1) */ @@ -3493,6 +3498,7 @@ #endif PHP_FE(stream_copy_to_stream, arginfo_stream_copy_to_stream) PHP_FE(stream_get_contents, arginfo_stream_get_contents) + PHP_FE(stream_supports_lock, arginfo_stream_supports_lock) PHP_FE(fgetcsv, arginfo_fgetcsv) PHP_FE(fputcsv, arginfo_fputcsv) PHP_FE(flock, arginfo_flock)
[PHP-CVS] cvs: php-src(PHP_5_3) / NEWS /ext/standard basic_functions.c /main/streams plain_wrapper.c
helly Tue Nov 6 12:12:58 2007 UTC Modified files: (Branch: PHP_5_3) /php-srcNEWS /php-src/main/streams plain_wrapper.c /php-src/ext/standard basic_functions.c Log: - MFH Add glob stream wrapper [DOC] The glob stream wrapper allows stuff like this: php -r '$it = new DirectoryIterator(glob://ext/spl/*.c); foreach($it as $f) var_dump($f);' http://cvs.php.net/viewvc.cgi/php-src/NEWS?r1=1.2027.2.547.2.965.2.42r2=1.2027.2.547.2.965.2.43diff_format=u Index: php-src/NEWS diff -u php-src/NEWS:1.2027.2.547.2.965.2.42 php-src/NEWS:1.2027.2.547.2.965.2.43 --- php-src/NEWS:1.2027.2.547.2.965.2.42Tue Nov 6 09:45:37 2007 +++ php-src/NEWSTue Nov 6 12:12:58 2007 @@ -1,6 +1,7 @@ PHPNEWS ||| ?? ??? 20??, PHP 5.3.0 +- Added glob stream. (Marcus) - Added 3 Firebird specific attributes that can be set via PDO::setAttribute() to control formatting of date/timestamp columns: PDO::FB_ATTR_DATE_FORMAT, PDO::FB_ATTR_TIME_FORMAT and PDO::FB_ATTR_TIMESTAMP_FORMAT. http://cvs.php.net/viewvc.cgi/php-src/main/streams/plain_wrapper.c?r1=1.52.2.6.2.23.2.2r2=1.52.2.6.2.23.2.3diff_format=u Index: php-src/main/streams/plain_wrapper.c diff -u php-src/main/streams/plain_wrapper.c:1.52.2.6.2.23.2.2 php-src/main/streams/plain_wrapper.c:1.52.2.6.2.23.2.3 --- php-src/main/streams/plain_wrapper.c:1.52.2.6.2.23.2.2 Thu Nov 1 17:32:44 2007 +++ php-src/main/streams/plain_wrapper.cTue Nov 6 12:12:58 2007 @@ -16,7 +16,7 @@ +--+ */ -/* $Id: plain_wrapper.c,v 1.52.2.6.2.23.2.2 2007/11/01 17:32:44 jani Exp $ */ +/* $Id: plain_wrapper.c,v 1.52.2.6.2.23.2.3 2007/11/06 12:12:58 helly Exp $ */ #include php.h #include php_globals.h @@ -338,7 +338,7 @@ so script can retry if desired */ ret = read(data-fd, buf, count); } - + stream-eof = (ret == 0 || (ret == (size_t)-1 errno != EWOULDBLOCK errno != EINTR errno != EBADF)); } else { @@ -843,6 +843,10 @@ DIR *dir = NULL; php_stream *stream = NULL; + if (options STREAM_USE_GLOB_DIR_OPEN) { + return php_glob_stream_wrapper.wops-dir_opener(php_glob_stream_wrapper, path, mode, options, opened_path, context STREAMS_REL_CC TSRMLS_CC); + } + if (((options STREAM_DISABLE_OPEN_BASEDIR) == 0) php_check_open_basedir(path TSRMLS_CC)) { return NULL; } http://cvs.php.net/viewvc.cgi/php-src/ext/standard/basic_functions.c?r1=1.725.2.31.2.64.2.9r2=1.725.2.31.2.64.2.10diff_format=u Index: php-src/ext/standard/basic_functions.c diff -u php-src/ext/standard/basic_functions.c:1.725.2.31.2.64.2.9 php-src/ext/standard/basic_functions.c:1.725.2.31.2.64.2.10 --- php-src/ext/standard/basic_functions.c:1.725.2.31.2.64.2.9 Fri Nov 2 19:40:38 2007 +++ php-src/ext/standard/basic_functions.c Tue Nov 6 12:12:58 2007 @@ -17,7 +17,7 @@ +--+ */ -/* $Id: basic_functions.c,v 1.725.2.31.2.64.2.9 2007/11/02 19:40:38 jani Exp $ */ +/* $Id: basic_functions.c,v 1.725.2.31.2.64.2.10 2007/11/06 12:12:58 helly Exp $ */ #include php.h #include php_streams.h @@ -4026,6 +4026,7 @@ php_register_url_stream_wrapper(php, php_stream_php_wrapper TSRMLS_CC); php_register_url_stream_wrapper(file, php_plain_files_wrapper TSRMLS_CC); + php_register_url_stream_wrapper(glob, php_glob_stream_wrapper TSRMLS_CC); php_register_url_stream_wrapper(data, php_stream_rfc2397_wrapper TSRMLS_CC); #ifndef PHP_CURL_URL_WRAPPERS php_register_url_stream_wrapper(http, php_stream_http_wrapper TSRMLS_CC); -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php