Re: Fwd: [PHP-CVS] cvs: php-src /ext/gd gd.c gd_ctx.c /ext/ircg ircg.c /ext/mbstring php_mbregex.c /ext/msql php_msql.c /ext/mssql php_mssql.c
/ext/mysql php_mysql.c /ext/mysqli mysqli_api.c /ext/oci8 oci8.c /ext/odbc php_odbc.c /ext/pcre p
| From: | Wez Furlong | Date: | Mon, 19 Jul 2004 09:08:15 +0000 |
| Subject: | Re: Fwd: [PHP-CVS] cvs: php-src /ext/gd gd.c gd_ctx.c /ext/ircg ircg.c /ext/mbstring php_mbregex.c /ext/msql php_msql.c /ext/mssql php_mssql.c /ext/mysql php_mysql.c /ext/mysqli mysqli_api.c /ext/oci8 oci8.c /ext/odbc php_odbc.c /ext/pcre p |
||
| References: | 1 | Groups: | php.internals |
| Request: | Send a blank email to internals+get-11337@lists.php.net to get a copy of this message | ||
Please bump the API number for this, as PECL extensions need to check
it and still build with 5.0 and with HEAD.
--Wez.
On Mon, 19 Jul 2004 00:27:10 -0700, Andi Gutmans <andi@zend.com> wrote:
> Just a short clarification. Code which requires "" should use just that, e.g.:
> add_property_string(return_value,
> "table",(msql_field->table?msql_field->table:""), 1);
> You can see that it's being duplicated anyway.
>
> Code which really requires an emalloc'ed empty string should use
> STR_EMPTY_ALLOC()
>
> Important to note especially for maintainers who will hopefully check that
> I didn't break anything.
> Andi
>
> >From: "Andi Gutmans" <andi@php.net>
> >To: php-cvs@lists.php.net
> >Date: Mon, 19 Jul 2004 07:19:52 -0000
> >X-Security: message sanitized on mail.zend.com
> > See
> > http://www.impsec.org/email-tools/sanitizer-intro.html
> > for details. $Revision: 1.143 $Date: 2004-04-10 09:05:42-07
> >Old-Subject: [PHP-CVS] cvs: php-src /ext/gd gd.c gd_ctx.c /ext/ircg
> >ircg.c /ext/mbstring php_mbregex.c /ext/msql php_msql.c /ext/mssql
> >php_mssql.c /ext/mysql php_mysql.c /ext/mysqli mysqli_api.c /ext/oci8
> >oci8.c /ext/odbc php_odbc.c /ext/pcre php_pcre.c /ext/pgsql
> >pgsql.c /ext/session session.c /ext/standard file.c math.c reg.c
> >string.c var_unserializer.c var_unserializer.re /ext/sybase
> >php_sybase_db.c /ext/sybase_ct php_sybase_ct.c /ext/wddx wddx.c /main
> >php_ini.c safe_mode.c /sapi/apache mod_php5.c /sapi/apache2filter
> >php_functions.c sapi_apache2.c /sapi/apache2handler php_functions.c
> >sapi_apache2.c /sapi/apache_hooks mod_php5.c
> >Subject: [PHP-CVS] cvs: php-src /ext/gd gd.c gd_ctx.c /ext/ircg
> >ircg.c /ext/mbstring php_mbregex.c /ext/msql php_msql.c /ext/mssql
> >php_mssql.c /ext/mysql php_mysql.c /ext/mysqli mysqli_api.c /ext/oci8
> >oci8.c /ext/odbc php_odbc.c /ext/pcre ph
> >X-Bogosity: No, tests=bogofilter, spamicity=0.000000, version=0.13.6.2
> >
> >andi Mon Jul 19 03:19:52 2004 EDT
> >
> > Modified files:
> > /php-src/ext/gd gd.c gd_ctx.c
> > /php-src/ext/ircg ircg.c
> > /php-src/ext/mbstring php_mbregex.c
> > /php-src/ext/msql php_msql.c
> > /php-src/ext/mssql php_mssql.c
> > /php-src/ext/mysql php_mysql.c
> > /php-src/ext/mysqli mysqli_api.c
> > /php-src/ext/oci8 oci8.c
> > /php-src/ext/odbc php_odbc.c
> > /php-src/ext/pcre php_pcre.c
> > /php-src/ext/pgsql pgsql.c
> > /php-src/ext/session session.c
> > /php-src/ext/standard file.c math.c reg.c string.c
> > var_unserializer.c var_unserializer.re
> > /php-src/ext/sybase php_sybase_db.c
> > /php-src/ext/sybase_ct php_sybase_ct.c
> > /php-src/ext/wddx wddx.c
> > /php-src/main php_ini.c safe_mode.c
> > /php-src/sapi/apache mod_php5.c
> > /php-src/sapi/apache2filter php_functions.c sapi_apache2.c
> > /php-src/sapi/apache2handler php_functions.c sapi_apache2.c
> > /php-src/sapi/apache_hooks mod_php5.c
> > Log:
> > - Nuke empty_string. It is a reminanent from the time where RETURN_FALSE()
> > used to return "" and not bool(false). It's not worth keeping it
> > because
> > STR_FREE() and zval_dtor() always have to check for it and it slows down
> > the general case. In addition, it seems that empty_string has been abused
> > quite a lot, and was used not only for setting zval's but generally in
> > PHP code instead of "", which wasn't the intention. Last but not least,
> > nuking empty_string should improve stability as I doubt every place
> > correctly checked if they are not mistakenly erealloc()'ing it or
> > calling efree() on it.
> > NOTE: Some code is probably broken. Each extension maintainer should
> > check and see that my changes are OK. Also, I haven't had time to touch
> > PECL yet. Will try and do it tomorrow.
> >
> >
> >--
> >PHP CVS Mailing List (http://www.php.net/)
> >To unsubscribe, visit: http://www.php.net/unsub.php
>
>
>