diff options
author | Andi Gutmans <andi@php.net> | 2004-07-19 07:19:50 +0000 |
---|---|---|
committer | Andi Gutmans <andi@php.net> | 2004-07-19 07:19:50 +0000 |
commit | 56f8195fe592e79d90c78fb015f39bffa7f39422 (patch) | |
tree | 6a1bf69bc9cd23fab98c4d3d6c12368b56d26079 /ext/msql/php_msql.c | |
parent | 599ae4b1b53d46e10447dab8fb4faa2d0517370a (diff) | |
download | php-git-56f8195fe592e79d90c78fb015f39bffa7f39422.tar.gz |
- 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.
Diffstat (limited to 'ext/msql/php_msql.c')
-rw-r--r-- | ext/msql/php_msql.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/ext/msql/php_msql.c b/ext/msql/php_msql.c index f9a9e19feb..93522865b2 100644 --- a/ext/msql/php_msql.c +++ b/ext/msql/php_msql.c @@ -959,7 +959,7 @@ static void php_msql_fetch_hash(INTERNAL_FUNCTION_PARAMETERS, int result_type) } } 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 @@ PHP_FUNCTION(msql_fetch_field) } object_init(return_value); - 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)); |