Re: [PHP-DEV] Streams constify API change in master leads to compilation warning for extensions

2013-10-03 Thread Michael Wallner
On 2 October 2013 20:41, Jakub Zelenka bu...@php.net wrote: Hi, I was wondering why stream API has been changed in this commit: https://github.com/php/php-src/commit/92d27ccb0574f901a107409a7fec92888fa2b82f Basically all char pointers have been constified. The thing is that this commit

Re: [PHP-DEV] Streams constify API change in master leads to compilation warning for extensions

2013-10-03 Thread Remi Collet
Le 02/10/2013 20:41, Jakub Zelenka a écrit : Hi, I was wondering why stream API has been changed in this commit: https://github.com/php/php-src/commit/92d27ccb0574f901a107409a7fec92888fa2b82f Basically all char pointers have been constified. The thing is that this commit leads to

Re: [PHP-DEV] Streams constify API change in master leads to compilation warning for extensions

2013-10-03 Thread Jakub Zelenka
-PHPAPI php_stream_wrapper *php_stream_locate_url_wrapper (const char *path, char **path_for_open, int options TSRMLS_DC); +PHPAPI php_stream_wrapper *php_stream_locate_url_wrapper (const char *path, const char **path_for_open, int options TSRMLS_DC); While is absolutly safe (and often

Re: [PHP-DEV] Streams constify API change in master leads to compilation warning for extensions

2013-10-03 Thread Johannes Schlüter
On Wed, 2013-10-02 at 23:01 -0400, William Bartlett wrote: My understanding is that the const triggers some optimizations because the compiler better understands how the variables are used. There's not really much win. In most cases the generated code is exactly the same.*) Such changes are

[PHP-DEV] Streams constify API change in master leads to compilation warning for extensions

2013-10-02 Thread Jakub Zelenka
Hi, I was wondering why stream API has been changed in this commit: https://github.com/php/php-src/commit/92d27ccb0574f901a107409a7fec92888fa2b82f Basically all char pointers have been constified. The thing is that this commit leads to compilation warning for many extensions. In my case I use

Re: [PHP-DEV] Streams constify API change in master leads to compilation warning for extensions

2013-10-02 Thread William Bartlett
My understanding is that the const triggers some optimizations because the compiler better understands how the variables are used. I'm not sure what degree of a difference it makes, but I'm always a fan of using const if it's appropriate. Perhaps your effort is better spent modifying the

Re: [PHP-DEV] Streams constify API change in master leads to compilation warning for extensions

2013-10-02 Thread Remi Collet
Le 02/10/2013 20:41, Jakub Zelenka a écrit : Hi, I was wondering why stream API has been changed in this commit: https://github.com/php/php-src/commit/92d27ccb0574f901a107409a7fec92888fa2b82f Basically all char pointers have been constified. The thing is that this commit leads to