Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:11337 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 41336 invoked by uid 1010); 19 Jul 2004 09:08:16 -0000 Delivered-To: ezmlm-scan-internals@lists.php.net Delivered-To: ezmlm-internals@lists.php.net Received: (qmail 41236 invoked from network); 19 Jul 2004 09:08:16 -0000 Received: from unknown (HELO mproxy.gmail.com) (216.239.56.249) by pb1.pair.com with SMTP; 19 Jul 2004 09:08:16 -0000 Received: by mproxy.gmail.com with SMTP id w29so4227807cwb for ; Mon, 19 Jul 2004 02:08:15 -0700 (PDT) Received: by 10.11.99.74 with SMTP id w74mr144673cwb; Mon, 19 Jul 2004 02:08:15 -0700 (PDT) Message-ID: <4e89b42604071902086ccb4c48@mail.gmail.com> Date: Mon, 19 Jul 2004 10:08:15 +0100 To: Andi Gutmans Cc: internals@lists.php.net In-Reply-To: <5.1.0.14.2.20040719002507.036279f8@127.0.0.1> Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit References: <5.1.0.14.2.20040719002507.036279f8@127.0.0.1> Subject: Re: [PHP-DEV] 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: kingwez@gmail.com (Wez Furlong) 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 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" > >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 > > >