Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:11335 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 51226 invoked by uid 1010); 19 Jul 2004 07:27:41 -0000 Delivered-To: ezmlm-scan-internals@lists.php.net Delivered-To: ezmlm-internals@lists.php.net Received: (qmail 51147 invoked from network); 19 Jul 2004 07:27:40 -0000 Received: from unknown (HELO mail.zend.com) (80.74.107.235) by pb1.pair.com with SMTP; 19 Jul 2004 07:27:40 -0000 Received: (qmail 4898 invoked from network); 19 Jul 2004 07:27:28 -0000 Received: from localhost (HELO AndiNotebook.zend.com) (127.0.0.1) by localhost with SMTP; 19 Jul 2004 07:27:28 -0000 Message-ID: <5.1.0.14.2.20040719002507.036279f8@127.0.0.1> X-Sender: andi@127.0.0.1 X-Mailer: QUALCOMM Windows Eudora Version 5.1 Date: Mon, 19 Jul 2004 00:27:10 -0700 To: internals@lists.php.net Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="=====================_225161234==_" Subject: 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 ph From: andi@zend.com (Andi Gutmans) --=====================_225161234==_ Content-Type: text/plain; charset="us-ascii"; format=flowed 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 --=====================_225161234==_ Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Content-Disposition: attachment; filename="andi-20040719031952.txt" http://cvs.php.net/diff.php/php-src/ext/gd/gd.c?r1=3D1.294&r2=3D1.295&ty=3Du Index: php-src/ext/gd/gd.c diff -u php-src/ext/gd/gd.c:1.294 php-src/ext/gd/gd.c:1.295 --- php-src/ext/gd/gd.c:1.294 Thu May 20 19:37:59 2004 +++ php-src/ext/gd/gd.c Mon Jul 19 03:19:37 2004 @@ -18,7 +18,7 @@ +----------------------------------------------------------------------+ */ =20 -/* $Id: gd.c,v 1.294 2004/05/20 23:37:59 iliaa Exp $ */ +/* $Id: gd.c,v 1.295 2004/07/19 07:19:37 andi Exp $ */ =20 /* gd 1.2 is copyright 1994, 1995, Quest Protein Database Center, Cold Spring Harbor Labs. */ @@ -1709,7 +1709,7 @@ } =20 if ((argc =3D=3D 2) || (argc > 2 && Z_STRLEN_PP(file))) { - if (!fn || fn =3D=3D empty_string || php_check_open_basedir(fn= TSRMLS_CC)) { + if (!fn || php_check_open_basedir(fn TSRMLS_CC)) { php_error_docref(NULL TSRMLS_CC, E_WARNING, "Invalid filename '%s'",= fn); RETURN_FALSE; } @@ -3825,13 +3825,13 @@ } =20 /* Check origin file */ - if (!fn_org || fn_org =3D=3D empty_string || php_check_open_basedir(fn_org= TSRMLS_CC)) { + if (!fn_org || php_check_open_basedir(fn_org TSRMLS_CC)) { php_error_docref(NULL TSRMLS_CC, E_WARNING, "Invalid origin filename= '%s'", fn_org); RETURN_FALSE; } =20 /* Check destination file */ - if (!fn_dest || fn_dest =3D=3D empty_string ||= php_check_open_basedir(fn_dest TSRMLS_CC)) { + if (!fn_dest || php_check_open_basedir(fn_dest TSRMLS_CC)) { php_error_docref(NULL TSRMLS_CC, E_WARNING, "Invalid destination filename= '%s'", fn_dest); RETURN_FALSE; } http://cvs.php.net/diff.php/php-src/ext/gd/gd_ctx.c?r1=3D1.20&r2=3D1.21&ty= =3Du Index: php-src/ext/gd/gd_ctx.c diff -u php-src/ext/gd/gd_ctx.c:1.20 php-src/ext/gd/gd_ctx.c:1.21 --- php-src/ext/gd/gd_ctx.c:1.20 Wed Jan 28 11:25:12 2004 +++ php-src/ext/gd/gd_ctx.c Mon Jul 19 03:19:38 2004 @@ -16,7 +16,7 @@ +----------------------------------------------------------------------+ */ =20 -/* $Id: gd_ctx.c,v 1.20 2004/01/28 16:25:12 martin Exp $ */ +/* $Id: gd_ctx.c,v 1.21 2004/07/19 07:19:38 andi Exp $ */ =20 #include "php_gd.h" =20 @@ -82,7 +82,7 @@ } =20 if ((argc =3D=3D 2) || (argc > 2 && Z_STRLEN_PP(file))) { - if (!fn || fn =3D=3D empty_string || php_check_open_basedir(fn= TSRMLS_CC)) { + if (!fn || php_check_open_basedir(fn TSRMLS_CC)) { php_error_docref(NULL TSRMLS_CC, E_WARNING, "Invalid filename '%s'",= fn); RETURN_FALSE; } http://cvs.php.net/diff.php/php-src/ext/ircg/ircg.c?r1=3D1.200&r2=3D1.201&ty= =3Du Index: php-src/ext/ircg/ircg.c diff -u php-src/ext/ircg/ircg.c:1.200 php-src/ext/ircg/ircg.c:1.201 --- php-src/ext/ircg/ircg.c:1.200 Thu Jan 8 03:15:52 2004 +++ php-src/ext/ircg/ircg.c Mon Jul 19 03:19:38 2004 @@ -16,7 +16,7 @@ +----------------------------------------------------------------------+ */ =20 -/* $Id: ircg.c,v 1.200 2004/01/08 08:15:52 andi Exp $ */ +/* $Id: ircg.c,v 1.201 2004/07/19 07:19:38 andi Exp $ */ =20 /* {{{ includes */ =20 @@ -2322,7 +2322,7 @@ #define ADD_PARA() do { \ if (para.len) smart_str_0(¶); \ add_next_index_stringl(return_value, \ - para.len =3D=3D 0 ? empty_string : para.c, \ + para.len =3D=3D 0 ? STR_EMPTY_ALLOC() : para.c, \ para.len, 0); \ para.len =3D 0; \ para.c =3D 0; \ http://cvs.php.net/diff.php/php-src/ext/mbstring/php_mbregex.c?r1=3D1.48&r2= =3D1.49&ty=3Du Index: php-src/ext/mbstring/php_mbregex.c diff -u php-src/ext/mbstring/php_mbregex.c:1.48= php-src/ext/mbstring/php_mbregex.c:1.49 --- php-src/ext/mbstring/php_mbregex.c:1.48 Sat Feb 28 15:45:23 2004 +++ php-src/ext/mbstring/php_mbregex.c Mon Jul 19 03:19:38 2004 @@ -16,7 +16,7 @@ +----------------------------------------------------------------------+ */ =20 -/* $Id: php_mbregex.c,v 1.48 2004/02/28 20:45:23 moriyoshi Exp $ */ +/* $Id: php_mbregex.c,v 1.49 2004/07/19 07:19:38 andi Exp $ */ =20 =20 #ifdef HAVE_CONFIG_H @@ -864,7 +864,7 @@ if (n > 0) { add_next_index_stringl(return_value, pos, n, 1); } else { - add_next_index_stringl(return_value, empty_string, 0, 1); + add_next_index_stringl(return_value, "", 0, 1); } } /* }}} */ http://cvs.php.net/diff.php/php-src/ext/msql/php_msql.c?r1=3D1.57&r2=3D1.58&= ty=3Du Index: php-src/ext/msql/php_msql.c diff -u php-src/ext/msql/php_msql.c:1.57 php-src/ext/msql/php_msql.c:1.58 --- php-src/ext/msql/php_msql.c:1.57 Thu Jan 8 03:16:11 2004 +++ php-src/ext/msql/php_msql.c Mon Jul 19 03:19:38 2004 @@ -16,7 +16,7 @@ +----------------------------------------------------------------------+ */ =20 -/* $Id: php_msql.c,v 1.57 2004/01/08 08:16:11 andi Exp $ */ +/* $Id: php_msql.c,v 1.58 2004/07/19 07:19:38 andi Exp $ */ =20 #ifdef HAVE_CONFIG_H #include "config.h" @@ -959,7 +959,7 @@ } } else { /* - add_get_index_stringl(return_value, i, empty_string, 0, (void **)= &pval_ptr, 1); + add_get_index_stringl(return_value, i, "", 0, (void **) &pval_ptr, 1); */ } } @@ -1097,8 +1097,8 @@ } object_init(return_value); =20 - add_property_string(return_value,= "name",(msql_field->name?msql_field->name:empty_string), 1); - add_property_string(return_value,= "table",(msql_field->table?msql_field->table:empty_string), 1); + add_property_string(return_value,= "name",(msql_field->name?msql_field->name:""), 1); + add_property_string(return_value,= "table",(msql_field->table?msql_field->table:""), 1); add_property_long(return_value,= "not_null",IS_NOT_NULL(msql_field->flags)); #if MSQL1 add_property_long(return_value,= "primary_key",(msql_field->flags&PRI_KEY_FLAG?1:0)); http://cvs.php.net/diff.php/php-src/ext/mssql/php_mssql.c?r1=3D1.137&r2=3D1.= 138&ty=3Du Index: php-src/ext/mssql/php_mssql.c diff -u php-src/ext/mssql/php_mssql.c:1.137= php-src/ext/mssql/php_mssql.c:1.138 --- php-src/ext/mssql/php_mssql.c:1.137 Sat Jul 10 03:46:08 2004 +++ php-src/ext/mssql/php_mssql.c Mon Jul 19 03:19:39 2004 @@ -16,7 +16,7 @@ +----------------------------------------------------------------------+ */ =20 -/* $Id: php_mssql.c,v 1.137 2004/07/10 07:46:08 andi Exp $ */ +/* $Id: php_mssql.c,v 1.138 2004/07/19 07:19:39 andi Exp $ */ =20 #ifdef COMPILE_DL_MSSQL #define HAVE_MSSQL 1 @@ -333,7 +333,7 @@ MS_SQL_G(default_link) =3D -1; MS_SQL_G(num_links) =3D MS_SQL_G(num_persistent); MS_SQL_G(appname) =3D estrndup("PHP 5", 5); - MS_SQL_G(server_message) =3D empty_string; + MS_SQL_G(server_message) =3D NULL; MS_SQL_G(min_error_severity) =3D MS_SQL_G(cfg_min_error_severity); MS_SQL_G(min_message_severity) =3D MS_SQL_G(cfg_min_message_severity); if (MS_SQL_G(connect_timeout) < 1) MS_SQL_G(connect_timeout) =3D 1; @@ -1045,7 +1045,7 @@ result->fields[i].column_source =3D estrdup(source); } else { - result->fields[i].column_source =3D empty_string; + result->fields[i].column_source =3D STR_EMPTY_ALLOC(); } =20 column_types[i] =3D coltype(i+1); @@ -1267,7 +1267,7 @@ RETURN_STRING(MS_SQL_G(server_message),1); } else { - RETURN_STRING(empty_string,1); + RETURN_STRING("",1); } } =20 http://cvs.php.net/diff.php/php-src/ext/mysql/php_mysql.c?r1=3D1.209&r2=3D1.= 210&ty=3Du Index: php-src/ext/mysql/php_mysql.c diff -u php-src/ext/mysql/php_mysql.c:1.209= php-src/ext/mysql/php_mysql.c:1.210 --- php-src/ext/mysql/php_mysql.c:1.209 Fri Jun 4 11:26:54 2004 +++ php-src/ext/mysql/php_mysql.c Mon Jul 19 03:19:39 2004 @@ -18,7 +18,7 @@ +----------------------------------------------------------------------+ */ =20 -/* $Id: php_mysql.c,v 1.209 2004/06/04 15:26:54 iliaa Exp $ */ +/* $Id: php_mysql.c,v 1.210 2004/07/19 07:19:39 andi Exp $ */ =20 /* TODO: * @@ -2245,9 +2245,9 @@ } object_init(return_value); =20 - add_property_string(return_value,= "name",(mysql_field->name?mysql_field->name:empty_string), 1); - add_property_string(return_value,= "table",(mysql_field->table?mysql_field->table:empty_string), 1); - add_property_string(return_value,= "def",(mysql_field->def?mysql_field->def:empty_string), 1); + add_property_string(return_value,= "name",(mysql_field->name?mysql_field->name:""), 1); + add_property_string(return_value,= "table",(mysql_field->table?mysql_field->table:""), 1); + add_property_string(return_value,= "def",(mysql_field->def?mysql_field->def:""), 1); add_property_long(return_value, "max_length", mysql_field->max_length); add_property_long(return_value, "not_null",= IS_NOT_NULL(mysql_field->flags)?1:0); add_property_long(return_value, "primary_key",= IS_PRI_KEY(mysql_field->flags)?1:0); http://cvs.php.net/diff.php/php-src/ext/mysqli/mysqli_api.c?r1=3D1.88&r2=3D1= .89&ty=3Du Index: php-src/ext/mysqli/mysqli_api.c diff -u php-src/ext/mysqli/mysqli_api.c:1.88= php-src/ext/mysqli/mysqli_api.c:1.89 --- php-src/ext/mysqli/mysqli_api.c:1.88 Sat Jul 17 06:48:28 2004 +++ php-src/ext/mysqli/mysqli_api.c Mon Jul 19 03:19:40 2004 @@ -15,7 +15,7 @@ | Author: Georg Richter | +----------------------------------------------------------------------+ =20 - $Id: mysqli_api.c,v 1.88 2004/07/17 10:48:28 georg Exp $=20 + $Id: mysqli_api.c,v 1.89 2004/07/19 07:19:40 andi Exp $=20 */ =20 #ifdef HAVE_CONFIG_H @@ -906,7 +906,7 @@ } MYSQLI_FETCH_RESOURCE(mysql, MY_MYSQL *, &mysql_link, "mysqli_link"); =20 - RETURN_STRING((mysql->mysql->host_info) ? mysql->mysql->host_info := empty_string, 1); + RETURN_STRING((mysql->mysql->host_info) ? mysql->mysql->host_info : "",= 1); } /* }}} */ =20 @@ -971,7 +971,7 @@ } MYSQLI_FETCH_RESOURCE(mysql, MY_MYSQL *, &mysql_link, "mysqli_link"); =20 - RETURN_STRING((mysql->mysql->info) ? mysql->mysql->info : empty_string,= 1); + RETURN_STRING((mysql->mysql->info) ? mysql->mysql->info : "", 1); } /* }}} */ =20 http://cvs.php.net/diff.php/php-src/ext/oci8/oci8.c?r1=3D1.257&r2=3D1.258&ty= =3Du Index: php-src/ext/oci8/oci8.c diff -u php-src/ext/oci8/oci8.c:1.257 php-src/ext/oci8/oci8.c:1.258 --- php-src/ext/oci8/oci8.c:1.257 Thu Jul 15 07:00:14 2004 +++ php-src/ext/oci8/oci8.c Mon Jul 19 03:19:40 2004 @@ -22,7 +22,7=20@@ +----------------------------------------------------------------------+ */ =20 -/* $Id: oci8.c,v 1.257 2004/07/15 11:00:14 tony2001 Exp $ */ +/* $Id: oci8.c,v 1.258 2004/07/19 07:19:40 andi Exp $ */ =20 /* TODO list: * @@ -786,7 +786,7 @@ =20 php_info_print_table_start(); php_info_print_table_row(2, "OCI8 Support", "enabled"); - php_info_print_table_row(2, "Revision", "$Revision: 1.257 $"); + php_info_print_table_row(2, "Revision", "$Revision: 1.258 $"); =20 sprintf(buf, "%ld", num_persistent); php_info_print_table_row(2, "Active Persistent Links", buf); @@ -880,12 +880,12 @@ =20 if (bind->indicator =3D=3D -1) { /* NULL */ zval *val =3D bind->zval; - if (Z_TYPE_P(val) =3D=3D IS_STRING && (Z_STRVAL_P(val) !=3D= empty_string)) { + if (Z_TYPE_P(val) =3D=3D IS_STRING)) { *Z_STRVAL_P(val) =3D '\0'; /* XXX avoid warning in debug mode */ } zval_dtor(val); ZVAL_NULL(val); - } else if (Z_TYPE_P(bind->zval) =3D=3D IS_STRING &&= (Z_STRVAL_P(bind->zval) !=3D empty_string)) { + } else if (Z_TYPE_P(bind->zval) =3D=3D IS_STRING) { Z_STRVAL_P(bind->zval) =3D erealloc(Z_STRVAL_P(bind->zval),= Z_STRLEN_P(bind->zval)+1); Z_STRVAL_P(bind->zval)[ Z_STRLEN_P(bind->zval) ] =3D '\0'; } http://cvs.php.net/diff.php/php-src/ext/odbc/php_odbc.c?r1=3D1.179&r2=3D1.18= 0&ty=3Du Index: php-src/ext/odbc/php_odbc.c diff -u php-src/ext/odbc/php_odbc.c:1.179 php-src/ext/odbc/php_odbc.c:1.180 --- php-src/ext/odbc/php_odbc.c:1.179 Thu Jul 15 11:09:12 2004 +++ php-src/ext/odbc/php_odbc.c Mon Jul 19 03:19:41 2004 @@ -20,7 +20,7 @@ +----------------------------------------------------------------------+ */ =20 -/* $Id: php_odbc.c,v 1.179 2004/07/15 15:09:12 kalowsky Exp $ */ +/* $Id: php_odbc.c,v 1.180 2004/07/19 07:19:41 andi Exp $ */ =20 #ifdef HAVE_CONFIG_H #include "config.h" @@ -1421,13 +1421,13 @@ case SQL_VARBINARY: case SQL_LONGVARBINARY: if (result->binmode <=3D 0) { - Z_STRVAL_P(tmp) =3D empty_string; + Z_STRVAL_P(tmp) =3D STR_EMPTY_ALLOC(); break; } if (result->binmode =3D=3D 1) sql_c_type =3D SQL_C_BINARY; case SQL_LONGVARCHAR: if (IS_SQL_LONG(result->values[i].coltype) && result->longreadlen <=3D= 0) { - Z_STRVAL_P(tmp) =3D empty_string; + Z_STRVAL_P(tmp) =3D STR_EMPTY_ALLOC(); break; } if (buf =3D=3D NULL) buf =3D emalloc(result->longreadlen + 1); @@ -1580,13 +1580,13 @@ case SQL_VARBINARY: case SQL_LONGVARBINARY: if (result->binmode <=3D 0) { - Z_STRVAL_P(tmp) =3D empty_string; + Z_STRVAL_P(tmp) =3D STR_EMPTY_ALLOC(); break; } if (result->binmode =3D=3D 1) sql_c_type =3D SQL_C_BINARY;=20 case SQL_LONGVARCHAR: if (IS_SQL_LONG(result->values[i].coltype) && result->longreadlen <=3D= 0) { - Z_STRVAL_P(tmp) =3D empty_string; + Z_STRVAL_P(tmp) =3D STR_EMPTY_ALLOC(); break; } =20 http://cvs.php.net/diff.php/php-src/ext/pcre/php_pcre.c?r1=3D1.157&r2=3D1.15= 8&ty=3Du Index: php-src/ext/pcre/php_pcre.c diff -u php-src/ext/pcre/php_pcre.c:1.157 php-src/ext/pcre/php_pcre.c:1.158 --- php-src/ext/pcre/php_pcre.c:1.157 Tue Jun 22 18:21:58 2004 +++ php-src/ext/pcre/php_pcre.c Mon Jul 19 03:19:42 2004 @@ -16,7 +16,7 @@ +----------------------------------------------------------------------+ */ =20 -/* $Id: php_pcre.c,v 1.157 2004/06/22 22:21:58 andrei Exp $ */ +/* $Id: php_pcre.c,v 1.158 2004/07/19 07:19:42 andi Exp $ */ =20 #ifdef HAVE_CONFIG_H #include "config.h" @@ -511,7 +511,7 @@ */ if (count < num_subpats) { for (; i < num_subpats; i++) { - add_next_index_string(match_sets[i], empty_string, 1); + add_next_index_string(match_sets[i], "", 1); } } } else { @@ -734,7 +734,7 @@ esc_match_len =3D 0; } } else { - esc_match =3D empty_string; + esc_match =3D ""; esc_match_len =3D 0; match_len =3D 0; } @@ -1005,7 +1005,8 @@ =20 /* Make sure we're dealing with strings. */=09 convert_to_string_ex(subject); - ZVAL_STRINGL(&empty_replace, empty_string, 0, 0); + /* FIXME: This might need to be changed to STR_EMPTY_ALLOC(). Check if= this zval could be dtor()'ed somehow */ + ZVAL_STRINGL(&empty_replace, "", 0, 0); =09 /* If regex is an array */ if (Z_TYPE_P(regex) =3D=3D IS_ARRAY) { @@ -1389,7 +1390,7 @@ =20 /* Nothing to do if we got an empty string */ if (in_str =3D=3D in_str_end) { - RETVAL_STRINGL(empty_string, 0, 0); + RETVAL_STRINGL("", 0, 1); } =20 if (ZEND_NUM_ARGS() =3D=3D 2) { http://cvs.php.net/diff.php/php-src/ext/pgsql/pgsql.c?r1=3D1.311&r2=3D1.312&= ty=3Du Index: php-src/ext/pgsql/pgsql.c diff -u php-src/ext/pgsql/pgsql.c:1.311 php-src/ext/pgsql/pgsql.c:1.312 --- php-src/ext/pgsql/pgsql.c:1.311 Wed May 12 12:49:47 2004 +++ php-src/ext/pgsql/pgsql.c Mon Jul 19 03:19:42 2004 @@ -19,7 +19,7 @@ +----------------------------------------------------------------------+ */ =20 -/* $Id: pgsql.c,v 1.311 2004/05/12 16:49:47 iliaa Exp $ */ +/* $Id: pgsql.c,v 1.312 2004/07/19 07:19:42 andi Exp $ */ =20 #include =20 @@ -1214,7 +1214,7 @@ PQclear(result); } smart_str_free(&str); - return empty_string; + return STR_EMPTY_ALLOC(); } num_rows =3D PQntuples(result); oid_offset =3D PQfnumber(result,"oid"); @@ -1786,7 +1786,7 @@ if (Z_STRVAL_P(return_value)) { RETURN_STRING(Z_STRVAL_P(return_value), 1); } - RETURN_STRING(empty_string, 0); + RETURN_STRING("", 1); #endif } /* }}} */ http://cvs.php.net/diff.php/php-src/ext/session/session.c?r1=3D1.391&r2=3D1.= 392&ty=3Du Index: php-src/ext/session/session.c diff -u php-src/ext/session/session.c:1.391= php-src/ext/session/session.c:1.392 --- php-src/ext/session/session.c:1.391 Sat Jul 10 03:46:08 2004 +++ php-src/ext/session/session.c Mon Jul 19 03:19:43 2004 @@ -17,7 +17,7 @@ +----------------------------------------------------------------------+ */ =20 -/* $Id: session.c,v 1.391 2004/07/10 07:46:08 andi Exp $ */ +/* $Id: session.c,v 1.392 2004/07/19 07:19:43 andi Exp $ */ =20 #ifdef HAVE_CONFIG_H #include "config.h" @@ -1060,7 +1060,7 @@ smart_str_0(&var); REGISTER_STRINGL_CONSTANT("SID", var.c, var.len, 0); } else { - REGISTER_STRINGL_CONSTANT("SID", empty_string, 0, 0); + REGISTER_STRINGL_CONSTANT("SID", "", 0, 1); } =20 if (PS(apply_trans_sid)) { @@ -1370,13 +1370,16 @@ { zval **p_name; int ac =3D ZEND_NUM_ARGS(); - char *old =3D empty_string; + char *old; =20 if (ac < 0 || ac > 1 || zend_get_parameters_ex(ac, &p_name) =3D=3D= FAILURE) WRONG_PARAM_COUNT; =20 - if (PS(id)) + if (PS(id)) { old =3D estrdup(PS(id)); + } else { + old =3D STR_EMPTY_ALLOC(); + } =20 if (ac =3D=3D 1) { convert_to_string_ex(p_name); http://cvs.php.net/diff.php/php-src/ext/standard/file.c?r1=3D1.382&r2=3D1.38= 3&ty=3Du Index: php-src/ext/standard/file.c diff -u php-src/ext/standard/file.c:1.382 php-src/ext/standard/file.c:1.383 --- php-src/ext/standard/file.c:1.382 Wed Jun 16 19:57:25 2004 +++ php-src/ext/standard/file.c Mon Jul 19 03:19:44 2004 @@ -21,7 +21,7 @@ +----------------------------------------------------------------------+ */ =20 -/* $Id: file.c,v 1.382 2004/06/16 23:57:25 abies Exp $ */ +/* $Id: file.c,v 1.383 2004/07/19 07:19:44 andi Exp $ */ =20 /* Synced with php 3.0 revision 1.218 1999-06-16 [ssb] */ =20 @@ -416,7 +416,7 @@ if (have_content) { add_assoc_string(return_value, name, value, 0);=20 } else { - add_assoc_string(return_value, name, empty_string, 0); + add_assoc_string(return_value, name, "", 0); } =20 efree(name); http://cvs.php.net/diff.php/php-src/ext/standard/math.c?r1=3D1.115&r2=3D1.11= 6&ty=3Du Index: php-src/ext/standard/math.c diff -u php-src/ext/standard/math.c:1.115 php-src/ext/standard/math.c:1.116 --- php-src/ext/standard/math.c:1.115 Thu Jun 10 15:38:24 2004 +++ php-src/ext/standard/math.c Mon Jul 19 03:19:44 2004 @@ -19,7 +19,7 @@ +----------------------------------------------------------------------+ */ =20 -/* $Id: math.c,v 1.115 2004/06/10 19:38:24 iliaa Exp $ */ +/* $Id: math.c,v 1.116 2004/07/19 07:19:44 andi Exp $ */ =20 #include "php.h" #include "php_math.h" @@ -791,7 +791,7 @@ unsigned long value; =20 if (Z_TYPE_P(arg) !=3D IS_LONG || base < 2 || base > 36) { - return empty_string; + return STR_EMPTY_ALLOC(); } =20 value =3D Z_LVAL_P(arg); @@ -820,7 +820,7 @@ static char digits[] =3D "0123456789abcdefghijklmnopqrstuvwxyz"; =20 if ((Z_TYPE_P(arg) !=3D IS_LONG && Z_TYPE_P(arg) !=3D IS_DOUBLE) || base <= 2 || base > 36) { - return empty_string; + return STR_EMPTY_ALLOC(); } =20 if (Z_TYPE_P(arg) =3D=3D IS_DOUBLE) { @@ -831,7 +831,7 @@ /* Don't try to convert +/- infinity */ if (fvalue =3D=3D HUGE_VAL || fvalue =3D=3D -HUGE_VAL) { php_error_docref(NULL TSRMLS_CC, E_WARNING, "Number too large"); - return empty_string; + return STR_EMPTY_ALLOC(); } =20 end =3D ptr =3D buf + sizeof(buf) - 1; http://cvs.php.net/diff.php/php-src/ext/standard/reg.c?r1=3D1.78&r2=3D1.79&t= y=3Du Index: php-src/ext/standard/reg.c diff -u php-src/ext/standard/reg.c:1.78 php-src/ext/standard/reg.c:1.79 --- php-src/ext/standard/reg.c:1.78 Thu Jan 8 03:17:34 2004 +++ php-src/ext/standard/reg.c Mon Jul 19 03:19:45 2004 @@ -17,7 +17,7 @@ | Jaakko Hyv=E4tti = |=20 +----------------------------------------------------------------------+ */ -/* $Id: reg.c,v 1.78 2004/01/08 08:17:34 andi Exp $ */ +/* $Id: reg.c,v 1.79 2004/07/19 07:19:45 andi Exp $ */ =20 #include #include @@ -428,7 +428,7 @@ if (Z_STRVAL_PP(arg_pattern) && Z_STRLEN_PP(arg_pattern)) pattern =3D estrndup(Z_STRVAL_PP(arg_pattern),= Z_STRLEN_PP(arg_pattern)); else - pattern =3D empty_string; + pattern =3D STR_EMPTY_ALLOC(); } else { convert_to_long_ex(arg_pattern); pattern =3D emalloc(2); @@ -440,7 +440,7 @@ if (Z_STRVAL_PP(arg_replace) && Z_STRLEN_PP(arg_replace)) replace =3D estrndup(Z_STRVAL_PP(arg_replace),= Z_STRLEN_PP(arg_replace)); else - replace =3D empty_string; + replace =3D STR_EMPTY_ALLOC(); } else { convert_to_long_ex(arg_replace); replace =3D emalloc(2); @@ -452,7 +452,7 @@ if (Z_STRVAL_PP(arg_string) && Z_STRLEN_PP(arg_string)) string =3D estrndup(Z_STRVAL_PP(arg_string), Z_STRLEN_PP(arg_string)); else - string =3D empty_string; + string =3D STR_EMPTY_ALLOC(); =20 /* do the actual work */ ret =3D php_reg_replace(pattern, replace, string, icase, 1); @@ -527,7 +527,7 @@ while ((count =3D=3D -1 || count > 1) && !(err =3D regexec(&re, strp, 1,= subs, 0))) { if (subs[0].rm_so =3D=3D 0 && subs[0].rm_eo) { /* match is at start of string, return empty string */ - add_next_index_stringl(return_value, empty_string, 0, 1); + add_next_index_stringl(return_value, "", 0, 1); /* skip ahead the length of the regex match */ strp +=3D subs[0].rm_eo; } else if (subs[0].rm_so =3D=3D 0 && subs[0].rm_eo =3D=3D 0) { http://cvs.php.net/diff.php/php-src/ext/standard/string.c?r1=3D1.421&r2=3D1.= 422&ty=3Du Index: php-src/ext/standard/string.c diff -u php-src/ext/standard/string.c:1.421= php-src/ext/standard/string.c:1.422 --- php-src/ext/standard/string.c:1.421 Sun Jul 18 07:34:28 2004 +++ php-src/ext/standard/string.c Mon Jul 19 03:19:45 2004 @@ -18,7 +18,7 @@ +----------------------------------------------------------------------+ */ =20 -/* $Id: string.c,v 1.421 2004/07/18 11:34:28 andrey Exp $ */ +/* $Id: string.c,v 1.422 2004/07/19 07:19:45 andi Exp $ */ =20 /* Synced with php 3.0 revision 1.193 1999-06-16 [ssb] */ =20 @@ -3206,7 +3206,7 @@ convert_to_string_ex(subject); Z_TYPE_P(result) =3D IS_STRING; if (Z_STRLEN_PP(subject) =3D=3D 0) { - ZVAL_STRINGL(result, empty_string, 0, 1); + ZVAL_STRINGL(result, "", 0, 1); return; } =09 @@ -3254,7 +3254,7 @@ zend_hash_move_forward(Z_ARRVAL_P(replace)); } else { /* We've run out of replacement strings, so use an empty one. */ - replace_value =3D empty_string; + replace_value =3D ""; replace_len =3D 0; } } @@ -4186,11 +4186,11 @@ =20 /* Don't waste our time if it's empty */ if (Z_STRLEN_PP(input_str) =3D=3D 0) - RETURN_STRINGL(empty_string, 0, 1); + RETURN_STRINGL("", 0, 1); =09 /* ... or if the multiplier is zero */ if (Z_LVAL_PP(mult) =3D=3D 0) - RETURN_STRINGL(empty_string, 0, 1); + RETURN_STRINGL("", 0, 1); =09 /* Initialize the result string */=09 result_len =3D Z_STRLEN_PP(input_str) * Z_LVAL_PP(mult); http://cvs.php.net/diff.php/php-src/ext/standard/var_unserializer.c?r1=3D1.3= 8&r2=3D1.39&ty=3Du Index: php-src/ext/standard/var_unserializer.c diff -u php-src/ext/standard/var_unserializer.c:1.38= php-src/ext/standard/var_unserializer.c:1.39 --- php-src/ext/standard/var_unserializer.c:1.38 Fri Mar 26 20:27:53 2004 +++ php-src/ext/standard/var_unserializer.c Mon Jul 19 03:19:46 2004 @@ -18,7 +18,7 @@ +----------------------------------------------------------------------+ */ =20 -/* $Id: var_unserializer.c,v 1.38 2004/03/27 01:27:53 helly Exp $ */ +/* $Id: var_unserializer.c,v 1.39 2004/07/19 07:19:46 andi Exp $ */ =20 #include "php.h" #include "ext/standard/php_var.h" @@ -605,11 +605,7 @@ =20 len =3D parse_iv(start + 2); =20 - if (len =3D=3D 0) { - str =3D empty_string; - } else { - str =3D estrndup(YYCURSOR, len); - } + str =3D estrndup(YYCURSOR, len); =20 YYCURSOR +=3D len + 2; *p =3D YYCURSOR; http://cvs.php.net/diff.php/php-src/ext/standard/var_unserializer.re?r1=3D1.= 27&r2=3D1.28&ty=3Du Index: php-src/ext/standard/var_unserializer.re diff -u php-src/ext/standard/var_unserializer.re:1.27= php-src/ext/standard/var_unserializer.re:1.28 --- php-src/ext/standard/var_unserializer.re:1.27 Fri Mar 26 19:50:39 2004 +++ php-src/ext/standard/var_unserializer.re Mon Jul 19 03:19:46 2004 @@ -16,7 +16,7 @@ +----------------------------------------------------------------------+ */ =20 -/* $Id: var_unserializer.re,v 1.27 2004/03/27 00:50:39 helly Exp $ */ +/* $Id: var_unserializer.re,v 1.28 2004/07/19 07:19:46 andi Exp $ */ =20 #include "php.h" #include "ext/standard/php_var.h" @@ -350,11 +350,7 @@ =20 len =3D parse_iv(start + 2); =20 - if (len =3D=3D 0) { - str =3D empty_string; - } else { - str =3D estrndup(YYCURSOR, len); - } + str =3D estrndup(YYCURSOR, len); =20 YYCURSOR +=3D len + 2; *p =3D YYCURSOR; http://cvs.php.net/diff.php/php-src/ext/sybase/php_sybase_db.c?r1=3D1.62&r2= =3D1.63&ty=3Du Index: php-src/ext/sybase/php_sybase_db.c diff -u php-src/ext/sybase/php_sybase_db.c:1.62= php-src/ext/sybase/php_sybase_db.c:1.63 --- php-src/ext/sybase/php_sybase_db.c:1.62 Sat Jul 10 03:46:08 2004 +++ php-src/ext/sybase/php_sybase_db.c Mon Jul 19 03:19:46 2004 @@ -20,7 +20,7 @@ +----------------------------------------------------------------------+ */ =20 -/* $Id: php_sybase_db.c,v 1.62 2004/07/10 07:46:08 andi Exp $ */ +/* $Id: php_sybase_db.c,v 1.63 2004/07/19 07:19:46 andi Exp $ */ =20 =20 #ifdef HAVE_CONFIG_H @@ -282,7 +282,7 @@ php_sybase_module.default_link=3D-1; php_sybase_module.num_links =3D php_sybase_module.num_persistent; php_sybase_module.appname =3D estrndup("PHP " PHP_VERSION, sizeof("PHP "= PHP_VERSION)); - php_sybase_module.server_message =3D empty_string; + php_sybase_module.server_message =3D STR_EMPTY_ALLOC(); php_sybase_module.min_error_severity =3D= php_sybase_module.cfg_min_error_severity; php_sybase_module.min_message_severity =3D= php_sybase_module.cfg_min_message_severity; return SUCCESS; @@ -886,7 +886,7 @@ result->fields[i].max_length =3D dbcollen(sybase_ptr->link,i+1); result->fields[i].column_source =3D= estrdup(dbcolsource(sybase_ptr->link,i+1)); if (!result->fields[i].column_source) { - result->fields[i].column_source =3D empty_string; + result->fields[i].column_source =3D STR_EMPTY_ALLOC(); } Z_TYPE(result->fields[i]) =3D column_types[i]; /* set numeric flag */ http://cvs.php.net/diff.php/php-src/ext/sybase_ct/php_sybase_ct.c?r1=3D1.97&= r2=3D1.98&ty=3Du Index: php-src/ext/sybase_ct/php_sybase_ct.c diff -u php-src/ext/sybase_ct/php_sybase_ct.c:1.97= php-src/ext/sybase_ct/php_sybase_ct.c:1.98 --- php-src/ext/sybase_ct/php_sybase_ct.c:1.97 Sat Jul 10 03:46:08 2004 +++ php-src/ext/sybase_ct/php_sybase_ct.c Mon Jul 19 03:19:47 2004 @@ -18,7 +18,7 @@ +----------------------------------------------------------------------+ */ =20 -/* $Id: php_sybase_ct.c,v 1.97 2004/07/10 07:46:08 andi Exp $ */ +/* $Id: php_sybase_ct.c,v 1.98 2004/07/19 07:19:47 andi Exp $ */ =20 =20 #ifdef HAVE_CONFIG_H @@ -428,7 +428,7 @@ SybCtG(default_link)=3D-1; SybCtG(num_links) =3D SybCtG(num_persistent); SybCtG(appname) =3D estrndup("PHP " PHP_VERSION, sizeof("PHP "= PHP_VERSION)); - SybCtG(server_message) =3D empty_string; + SybCtG(server_message) =3D STR_EMPTY_ALLOC(); return SUCCESS; } =20 @@ -1274,7 +1274,7 @@ result->fields[i].name =3D estrdup(computed_buf); j++; } - result->fields[i].column_source =3D empty_string; + result->fields[i].column_source =3D STR_EMPTY_ALLOC(); result->fields[i].max_length =3D result->datafmt[i].maxlength-1; result->fields[i].numeric =3D result->numerics[i]; Z_TYPE(result->fields[i]) =3D result->types[i]; http://cvs.php.net/diff.php/php-src/ext/wddx/wddx.c?r1=3D1.111&r2=3D1.112&ty= =3Du Index: php-src/ext/wddx/wddx.c diff -u php-src/ext/wddx/wddx.c:1.111 php-src/ext/wddx/wddx.c:1.112 --- php-src/ext/wddx/wddx.c:1.111 Tue Jun 29 21:12:03 2004 +++ php-src/ext/wddx/wddx.c Mon Jul 19 03:19:47 2004 @@ -16,7 +16,7 @@ +----------------------------------------------------------------------+ */ =20 -/* $Id: wddx.c,v 1.111 2004/06/30 01:12:03 iliaa Exp $ */ +/* $Id: wddx.c,v 1.112 2004/07/19 07:19:47 andi Exp $ */ =20 #include "php.h" =20 @@ -710,7 +710,7 @@ ALLOC_ZVAL(ent.data); INIT_PZVAL(ent.data); Z_TYPE_P(ent.data) =3D IS_STRING; - Z_STRVAL_P(ent.data) =3D empty_string; + Z_STRVAL_P(ent.data) =3D STR_EMPTY_ALLOC(); Z_STRLEN_P(ent.data) =3D 0; wddx_stack_push((wddx_stack *)stack, &ent, sizeof(st_entry)); } else if (!strcmp(name, EL_BINARY)) { @@ -720,7 +720,7 @@ ALLOC_ZVAL(ent.data); INIT_PZVAL(ent.data); Z_TYPE_P(ent.data) =3D IS_STRING; - Z_STRVAL_P(ent.data) =3D empty_string; + Z_STRVAL_P(ent.data) =3D STR_EMPTY_ALLOC(); Z_STRLEN_P(ent.data) =3D 0; wddx_stack_push((wddx_stack *)stack, &ent, sizeof(st_entry)); } else if (!strcmp(name, EL_CHAR)) { http://cvs.php.net/diff.php/php-src/main/php_ini.c?r1=3D1.127&r2=3D1.128&ty= =3Du Index: php-src/main/php_ini.c diff -u php-src/main/php_ini.c:1.127 php-src/main/php_ini.c:1.128 --- php-src/main/php_ini.c:1.127 Sat Feb 14 07:35:59 2004 +++ php-src/main/php_ini.c Mon Jul 19 03:19:48 2004 @@ -16,7 +16,7 @@ +----------------------------------------------------------------------+ */ =20 -/* $Id: php_ini.c,v 1.127 2004/02/14 12:35:59 derick Exp $ */ +/* $Id: php_ini.c,v 1.128 2004/07/19 07:19:48 andi Exp $ */ =20 /* Check CWD for php.ini */ #define INI_CHECK_CWD @@ -170,7 +170,7 @@ */ static void pvalue_config_destructor(zval *pvalue) { =20 - if (Z_TYPE_P(pvalue) =3D=3D IS_STRING && Z_STRVAL_P(pvalue) !=3D= empty_string) { + if (Z_TYPE_P(pvalue) =3D=3D IS_STRING) { free(Z_STRVAL_P(pvalue)); } } http://cvs.php.net/diff.php/php-src/main/safe_mode.c?r1=3D1.58&r2=3D1.59&ty= =3Du Index: php-src/main/safe_mode.c diff -u php-src/main/safe_mode.c:1.58 php-src/main/safe_mode.c:1.59 --- php-src/main/safe_mode.c:1.58 Thu Jan 8 03:17:54 2004 +++ php-src/main/safe_mode.c Mon Jul 19 03:19:48 2004 @@ -16,7 +16,7 @@ +----------------------------------------------------------------------+ */ =20 -/* $Id: safe_mode.c,v 1.58 2004/01/08 08:17:54 andi Exp $ */ +/* $Id: safe_mode.c,v 1.59 2004/07/19 07:19:48 andi Exp $ */ =20 #include "php.h" =20 @@ -207,11 +207,11 @@ pstat =3D sapi_get_stat(TSRMLS_C); =20 if (!pstat) { - return empty_string; + return ""; } =20 if ((pwd=3Dgetpwuid(pstat->st_uid))=3D=3DNULL) { - return empty_string; + =09return ""; } SG(request_info).current_user_length =3D strlen(pwd->pw_name); SG(request_info).current_user =3D estrndup(pwd->pw_name,= SG(request_info).current_user_length); http://cvs.php.net/diff.php/php-src/sapi/apache/mod_php5.c?r1=3D1.10&r2=3D1.= 11&ty=3Du Index: php-src/sapi/apache/mod_php5.c diff -u php-src/sapi/apache/mod_php5.c:1.10= php-src/sapi/apache/mod_php5.c:1.11 --- php-src/sapi/apache/mod_php5.c:1.10 Wed Jul 14 05:43:26 2004 +++ php-src/sapi/apache/mod_php5.c Mon Jul 19 03:19:49 2004 @@ -17,7 +17,7 @@ | PHP 4.0 patches by Zeev Suraski | +----------------------------------------------------------------------+ */ -/* $Id: mod_php5.c,v 1.10 2004/07/14 09:43:26 sesser Exp $ */ +/* $Id: mod_php5.c,v 1.11 2004/07/19 07:19:49 andi Exp $ */ =20 #include "php_apache_http.h" #include "http_conf_globals.h" @@ -235,7 +235,7 @@ if (elts[i].val) { val =3D elts[i].val; } else { - val =3D empty_string; + val =3D ""; } php_register_variable(elts[i].key, val, track_vars_array TSRMLS_CC); } http://cvs.php.net/diff.php/php-src/sapi/apache2filter/php_functions.c?r1=3D= 1.41&r2=3D1.42&ty=3Du Index: php-src/sapi/apache2filter/php_functions.c diff -u php-src/sapi/apache2filter/php_functions.c:1.41= php-src/sapi/apache2filter/php_functions.c:1.42 --- php-src/sapi/apache2filter/php_functions.c:1.41 Thu Jan 8 03:18:04 2004 +++ php-src/sapi/apache2filter/php_functions.c Mon Jul 19 03:19:49 2004 @@ -16,7 +16,7 @@ +----------------------------------------------------------------------+ */ =20 -/* $Id: php_functions.c,v 1.41 2004/01/08 08:18:04 andi Exp $ */ +/* $Id: php_functions.c,v 1.42 2004/07/19 07:19:49 andi Exp $ */ =20 =20 #define ZEND_INCLUDE_FULL_WINDOWS_HEADERS @@ -165,7 +165,7 @@ arr =3D apr_table_elts(ctx->f->r->headers_in); =20 APR_ARRAY_FOREACH_OPEN(arr, key, val) - if (!val) val =3D empty_string; + if (!val) val =3D ""; add_assoc_string(return_value, key, val, 1); APR_ARRAY_FOREACH_CLOSE() } @@ -185,7 +185,7 @@ arr =3D apr_table_elts(ctx->f->r->headers_out); =20 APR_ARRAY_FOREACH_OPEN(arr, key, val) - if (!val) val =3D empty_string; + if (!val) val =3D ""; add_assoc_string(return_value, key, val, 1); APR_ARRAY_FOREACH_CLOSE() } http://cvs.php.net/diff.php/php-src/sapi/apache2filter/sapi_apache2.c?r1=3D1= .125&r2=3D1.126&ty=3Du Index: php-src/sapi/apache2filter/sapi_apache2.c diff -u php-src/sapi/apache2filter/sapi_apache2.c:1.125= php-src/sapi/apache2filter/sapi_apache2.c:1.126 --- php-src/sapi/apache2filter/sapi_apache2.c:1.125 Thu Jun 17 20:36:58 2004 +++ php-src/sapi/apache2filter/sapi_apache2.c Mon Jul 19 03:19:49 2004 @@ -18,7 +18,7 @@ +----------------------------------------------------------------------+ */ =20 -/* $Id: sapi_apache2.c,v 1.125 2004/06/18 00:36:58 iliaa Exp $ */ +/* $Id: sapi_apache2.c,v 1.126 2004/07/19 07:19:49 andi Exp $ */ =20 #include =20 @@ -220,7 +220,7 @@ char *key, *val; =09 APR_ARRAY_FOREACH_OPEN(arr, key, val) - if (!val) val =3D empty_string; + if (!val) val =3D ""; php_register_variable(key, val, track_vars_array TSRMLS_CC); APR_ARRAY_FOREACH_CLOSE() =09 http://cvs.php.net/diff.php/php-src/sapi/apache2handler/php_functions.c?r1= =3D1.13&r2=3D1.14&ty=3Du Index: php-src/sapi/apache2handler/php_functions.c diff -u php-src/sapi/apache2handler/php_functions.c:1.13= php-src/sapi/apache2handler/php_functions.c:1.14 --- php-src/sapi/apache2handler/php_functions.c:1.13 Thu Jan 8 03:18:05= 2004 +++ php-src/sapi/apache2handler/php_functions.c Mon Jul 19 03:19:50 2004 @@ -16,7 +16,7 @@ +----------------------------------------------------------------------+ */ =20 -/* $Id: php_functions.c,v 1.13 2004/01/08 08:18:05 andi Exp $ */ +/* $Id: php_functions.c,v 1.14 2004/07/19 07:19:50 andi Exp $ */ =20 #define ZEND_INCLUDE_FULL_WINDOWS_HEADERS =20 @@ -183,7 +183,7 @@ arr =3D apr_table_elts(ctx->r->headers_in); =20 APR_ARRAY_FOREACH_OPEN(arr, key, val) - if (!val) val =3D empty_string; + if (!val) val =3D ""; add_assoc_string(return_value, key, val, 1); APR_ARRAY_FOREACH_CLOSE() } @@ -203,7 +203,7 @@ arr =3D apr_table_elts(ctx->r->headers_out); =20 APR_ARRAY_FOREACH_OPEN(arr, key, val) - if (!val) val =3D empty_string; + if (!val) val =3D ""; add_assoc_string(return_value, key, val, 1); APR_ARRAY_FOREACH_CLOSE() } @@ -423,7 +423,7 @@ php_info_print_table_header(2, "Variable", "Value"); APR_ARRAY_FOREACH_OPEN(arr, key, val) if (!val) { - val =3D empty_string; + val =3D ""; } php_info_print_table_row(2, key, val); APR_ARRAY_FOREACH_CLOSE() @@ -438,7 +438,7 @@ arr =3D apr_table_elts(((php_struct *)= SG(server_context))->r->headers_in); APR_ARRAY_FOREACH_OPEN(arr, key, val) if (!val) { - val =3D empty_string; + val =3D ""; } php_info_print_table_row(2, key, val); APR_ARRAY_FOREACH_CLOSE() @@ -447,7 +447,7 @@ arr =3D apr_table_elts(((php_struct *)= SG(server_context))->r->headers_out); APR_ARRAY_FOREACH_OPEN(arr, key, val) if (!val) { - val =3D empty_string; + val =3D ""; } php_info_print_table_row(2, key, val); APR_ARRAY_FOREACH_CLOSE() http://cvs.php.net/diff.php/php-src/sapi/apache2handler/sapi_apache2.c?r1=3D= 1.41&r2=3D1.42&ty=3Du Index: php-src/sapi/apache2handler/sapi_apache2.c diff -u php-src/sapi/apache2handler/sapi_apache2.c:1.41= php-src/sapi/apache2handler/sapi_apache2.c:1.42 --- php-src/sapi/apache2handler/sapi_apache2.c:1.41 Sat Jul 17 17:29:50 2004 +++ php-src/sapi/apache2handler/sapi_apache2.c Mon Jul 19 03:19:50 2004 @@ -18,7 +18,7 @@ +----------------------------------------------------------------------+ */ =20 -/* $Id: sapi_apache2.c,v 1.41 2004/07/17 21:29:50 moriyoshi Exp $ */ +/* $Id: sapi_apache2.c,v 1.42 2004/07/19 07:19:50 andi Exp $ */ =20 #define ZEND_INCLUDE_FULL_WINDOWS_HEADERS =20 @@ -215,7 +215,7 @@ char *key, *val; =09 APR_ARRAY_FOREACH_OPEN(arr, key, val) - if (!val) val =3D empty_string; + if (!val) val =3D ""; php_register_variable(key, val, track_vars_array TSRMLS_CC); APR_ARRAY_FOREACH_CLOSE() =09 http://cvs.php.net/diff.php/php-src/sapi/apache_hooks/mod_php5.c?r1=3D1.4&r2= =3D1.5&ty=3Du Index: php-src/sapi/apache_hooks/mod_php5.c diff -u php-src/sapi/apache_hooks/mod_php5.c:1.4= php-src/sapi/apache_hooks/mod_php5.c:1.5 --- php-src/sapi/apache_hooks/mod_php5.c:1.4 Wed Jul 14 05:55:24 2004 +++ php-src/sapi/apache_hooks/mod_php5.c Mon Jul 19 03:19:50 2004 @@ -17,7 +17,7 @@ | PHP 4.0 patches by Zeev Suraski | +----------------------------------------------------------------------+ */ -/* $Id: mod_php5.c,v 1.4 2004/07/14 09:55:24 sesser Exp $ */ +/* $Id: mod_php5.c,v 1.5 2004/07/19 07:19:50 andi Exp $ */ =20 #include "php_apache_http.h" =20 @@ -382,7 +382,7 @@ if (elts[i].val) { val =3D elts[i].val; } else { - val =3D empty_string; + val =3D ""; } php_register_variable(elts[i].key, val, track_vars_array TSRMLS_CC); } --=====================_225161234==_--