diff options
Diffstat (limited to 'ext')
-rw-r--r-- | ext/ereg/ereg.c | 8 | ||||
-rw-r--r-- | ext/gd/gd.c | 6 | ||||
-rw-r--r-- | ext/gd/gd_ctx.c | 2 | ||||
-rw-r--r-- | ext/mbstring/php_mbregex.c | 2 | ||||
-rw-r--r-- | ext/msql/php_msql.c | 6 | ||||
-rw-r--r-- | ext/mssql/php_mssql.c | 6 | ||||
-rw-r--r-- | ext/mysql/php_mysql.c | 6 | ||||
-rw-r--r-- | ext/mysqli/mysqli_api.c | 4 | ||||
-rw-r--r-- | ext/oci8/oci8.c | 4 | ||||
-rw-r--r-- | ext/odbc/php_odbc.c | 8 | ||||
-rw-r--r-- | ext/pcre/php_pcre.c | 9 | ||||
-rw-r--r-- | ext/pgsql/pgsql.c | 4 | ||||
-rw-r--r-- | ext/session/session.c | 9 | ||||
-rw-r--r-- | ext/standard/file.c | 2 | ||||
-rw-r--r-- | ext/standard/math.c | 6 | ||||
-rw-r--r-- | ext/standard/reg.c | 8 | ||||
-rw-r--r-- | ext/standard/string.c | 8 | ||||
-rw-r--r-- | ext/standard/var_unserializer.c | 6 | ||||
-rw-r--r-- | ext/standard/var_unserializer.re | 6 | ||||
-rw-r--r-- | ext/sybase/php_sybase_db.c | 4 | ||||
-rw-r--r-- | ext/sybase_ct/php_sybase_ct.c | 4 | ||||
-rw-r--r-- | ext/wddx/wddx.c | 4 |
22 files changed, 59 insertions, 63 deletions
diff --git a/ext/ereg/ereg.c b/ext/ereg/ereg.c index cf8e15cd95..02d1903539 100644 --- a/ext/ereg/ereg.c +++ b/ext/ereg/ereg.c @@ -428,7 +428,7 @@ static void php_ereg_replace(INTERNAL_FUNCTION_PARAMETERS, int icase) if (Z_STRVAL_PP(arg_pattern) && Z_STRLEN_PP(arg_pattern)) pattern = estrndup(Z_STRVAL_PP(arg_pattern), Z_STRLEN_PP(arg_pattern)); else - pattern = empty_string; + pattern = STR_EMPTY_ALLOC(); } else { convert_to_long_ex(arg_pattern); pattern = emalloc(2); @@ -440,7 +440,7 @@ static void php_ereg_replace(INTERNAL_FUNCTION_PARAMETERS, int icase) if (Z_STRVAL_PP(arg_replace) && Z_STRLEN_PP(arg_replace)) replace = estrndup(Z_STRVAL_PP(arg_replace), Z_STRLEN_PP(arg_replace)); else - replace = empty_string; + replace = STR_EMPTY_ALLOC(); } else { convert_to_long_ex(arg_replace); replace = emalloc(2); @@ -452,7 +452,7 @@ static void php_ereg_replace(INTERNAL_FUNCTION_PARAMETERS, int icase) if (Z_STRVAL_PP(arg_string) && Z_STRLEN_PP(arg_string)) string = estrndup(Z_STRVAL_PP(arg_string), Z_STRLEN_PP(arg_string)); else - string = empty_string; + string = STR_EMPTY_ALLOC(); /* do the actual work */ ret = php_reg_replace(pattern, replace, string, icase, 1); @@ -527,7 +527,7 @@ static void php_split(INTERNAL_FUNCTION_PARAMETERS, int icase) while ((count == -1 || count > 1) && !(err = regexec(&re, strp, 1, subs, 0))) { if (subs[0].rm_so == 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 += subs[0].rm_eo; } else if (subs[0].rm_so == 0 && subs[0].rm_eo == 0) { diff --git a/ext/gd/gd.c b/ext/gd/gd.c index 9627d2cdf3..1476e5ee38 100644 --- a/ext/gd/gd.c +++ b/ext/gd/gd.c @@ -1709,7 +1709,7 @@ static void _php_image_output(INTERNAL_FUNCTION_PARAMETERS, int image_type, char } if ((argc == 2) || (argc > 2 && Z_STRLEN_PP(file))) { - if (!fn || fn == 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 @@ static void _php_image_convert(INTERNAL_FUNCTION_PARAMETERS, int image_type ) } /* Check origin file */ - if (!fn_org || fn_org == 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; } /* Check destination file */ - if (!fn_dest || fn_dest == 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; } diff --git a/ext/gd/gd_ctx.c b/ext/gd/gd_ctx.c index 6fb7b84ce4..b27ee45856 100644 --- a/ext/gd/gd_ctx.c +++ b/ext/gd/gd_ctx.c @@ -82,7 +82,7 @@ static void _php_image_output_ctx(INTERNAL_FUNCTION_PARAMETERS, int image_type, } if ((argc == 2) || (argc > 2 && Z_STRLEN_PP(file))) { - if (!fn || fn == 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; } diff --git a/ext/mbstring/php_mbregex.c b/ext/mbstring/php_mbregex.c index b1543f2909..fdf9195b5f 100644 --- a/ext/mbstring/php_mbregex.c +++ b/ext/mbstring/php_mbregex.c @@ -864,7 +864,7 @@ PHP_FUNCTION(mb_split) 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); } } /* }}} */ 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)); diff --git a/ext/mssql/php_mssql.c b/ext/mssql/php_mssql.c index 9930d3d0e4..9f8dd183b3 100644 --- a/ext/mssql/php_mssql.c +++ b/ext/mssql/php_mssql.c @@ -333,7 +333,7 @@ PHP_RINIT_FUNCTION(mssql) MS_SQL_G(default_link) = -1; MS_SQL_G(num_links) = MS_SQL_G(num_persistent); MS_SQL_G(appname) = estrndup("PHP 5", 5); - MS_SQL_G(server_message) = empty_string; + MS_SQL_G(server_message) = NULL; MS_SQL_G(min_error_severity) = MS_SQL_G(cfg_min_error_severity); MS_SQL_G(min_message_severity) = MS_SQL_G(cfg_min_message_severity); if (MS_SQL_G(connect_timeout) < 1) MS_SQL_G(connect_timeout) = 1; @@ -1045,7 +1045,7 @@ static int _mssql_fetch_batch(mssql_link *mssql_ptr, mssql_result *result, int r result->fields[i].column_source = estrdup(source); } else { - result->fields[i].column_source = empty_string; + result->fields[i].column_source = STR_EMPTY_ALLOC(); } column_types[i] = coltype(i+1); @@ -1267,7 +1267,7 @@ PHP_FUNCTION(mssql_get_last_message) RETURN_STRING(MS_SQL_G(server_message),1); } else { - RETURN_STRING(empty_string,1); + RETURN_STRING("",1); } } diff --git a/ext/mysql/php_mysql.c b/ext/mysql/php_mysql.c index 11dae41632..f8da8c8ea5 100644 --- a/ext/mysql/php_mysql.c +++ b/ext/mysql/php_mysql.c @@ -2245,9 +2245,9 @@ PHP_FUNCTION(mysql_fetch_field) } object_init(return_value); - 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); diff --git a/ext/mysqli/mysqli_api.c b/ext/mysqli/mysqli_api.c index b6dbc0efc0..4f6a80ad05 100644 --- a/ext/mysqli/mysqli_api.c +++ b/ext/mysqli/mysqli_api.c @@ -906,7 +906,7 @@ PHP_FUNCTION(mysqli_get_host_info) } MYSQLI_FETCH_RESOURCE(mysql, MY_MYSQL *, &mysql_link, "mysqli_link"); - RETURN_STRING((mysql->mysql->host_info) ? mysql->mysql->host_info : empty_string, 1); + RETURN_STRING((mysql->mysql->host_info) ? mysql->mysql->host_info : "", 1); } /* }}} */ @@ -971,7 +971,7 @@ PHP_FUNCTION(mysqli_info) } MYSQLI_FETCH_RESOURCE(mysql, MY_MYSQL *, &mysql_link, "mysqli_link"); - RETURN_STRING((mysql->mysql->info) ? mysql->mysql->info : empty_string, 1); + RETURN_STRING((mysql->mysql->info) ? mysql->mysql->info : "", 1); } /* }}} */ diff --git a/ext/oci8/oci8.c b/ext/oci8/oci8.c index 597b177a49..3f46fb4e33 100644 --- a/ext/oci8/oci8.c +++ b/ext/oci8/oci8.c @@ -880,12 +880,12 @@ static int _oci_bind_post_exec(void *data TSRMLS_DC) if (bind->indicator == -1) { /* NULL */ zval *val = bind->zval; - if (Z_TYPE_P(val) == IS_STRING && (Z_STRVAL_P(val) != empty_string)) { + if (Z_TYPE_P(val) == IS_STRING)) { *Z_STRVAL_P(val) = '\0'; /* XXX avoid warning in debug mode */ } zval_dtor(val); ZVAL_NULL(val); - } else if (Z_TYPE_P(bind->zval) == IS_STRING && (Z_STRVAL_P(bind->zval) != empty_string)) { + } else if (Z_TYPE_P(bind->zval) == IS_STRING) { Z_STRVAL_P(bind->zval) = erealloc(Z_STRVAL_P(bind->zval), Z_STRLEN_P(bind->zval)+1); Z_STRVAL_P(bind->zval)[ Z_STRLEN_P(bind->zval) ] = '\0'; } diff --git a/ext/odbc/php_odbc.c b/ext/odbc/php_odbc.c index 0908ce6a5b..7e98b1cf05 100644 --- a/ext/odbc/php_odbc.c +++ b/ext/odbc/php_odbc.c @@ -1421,13 +1421,13 @@ static void php_odbc_fetch_hash(INTERNAL_FUNCTION_PARAMETERS, int result_type) case SQL_VARBINARY: case SQL_LONGVARBINARY: if (result->binmode <= 0) { - Z_STRVAL_P(tmp) = empty_string; + Z_STRVAL_P(tmp) = STR_EMPTY_ALLOC(); break; } if (result->binmode == 1) sql_c_type = SQL_C_BINARY; case SQL_LONGVARCHAR: if (IS_SQL_LONG(result->values[i].coltype) && result->longreadlen <= 0) { - Z_STRVAL_P(tmp) = empty_string; + Z_STRVAL_P(tmp) = STR_EMPTY_ALLOC(); break; } if (buf == NULL) buf = emalloc(result->longreadlen + 1); @@ -1580,13 +1580,13 @@ PHP_FUNCTION(odbc_fetch_into) case SQL_VARBINARY: case SQL_LONGVARBINARY: if (result->binmode <= 0) { - Z_STRVAL_P(tmp) = empty_string; + Z_STRVAL_P(tmp) = STR_EMPTY_ALLOC(); break; } if (result->binmode == 1) sql_c_type = SQL_C_BINARY; case SQL_LONGVARCHAR: if (IS_SQL_LONG(result->values[i].coltype) && result->longreadlen <= 0) { - Z_STRVAL_P(tmp) = empty_string; + Z_STRVAL_P(tmp) = STR_EMPTY_ALLOC(); break; } diff --git a/ext/pcre/php_pcre.c b/ext/pcre/php_pcre.c index f489291ccb..52ceb6f727 100644 --- a/ext/pcre/php_pcre.c +++ b/ext/pcre/php_pcre.c @@ -511,7 +511,7 @@ static void php_pcre_match(INTERNAL_FUNCTION_PARAMETERS, int global) */ 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 @@ static int preg_do_eval(char *eval_str, int eval_str_len, char *subject, esc_match_len = 0; } } else { - esc_match = empty_string; + esc_match = ""; esc_match_len = 0; match_len = 0; } @@ -1005,7 +1005,8 @@ static char *php_replace_in_subject(zval *regex, zval *replace, zval **subject, /* Make sure we're dealing with strings. */ 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); /* If regex is an array */ if (Z_TYPE_P(regex) == IS_ARRAY) { @@ -1389,7 +1390,7 @@ PHP_FUNCTION(preg_quote) /* Nothing to do if we got an empty string */ if (in_str == in_str_end) { - RETVAL_STRINGL(empty_string, 0, 0); + RETVAL_STRINGL("", 0, 1); } if (ZEND_NUM_ARGS() == 2) { diff --git a/ext/pgsql/pgsql.c b/ext/pgsql/pgsql.c index 414e2050ec..786be839fc 100644 --- a/ext/pgsql/pgsql.c +++ b/ext/pgsql/pgsql.c @@ -1214,7 +1214,7 @@ static char *get_field_name(PGconn *pgsql, Oid oid, HashTable *list TSRMLS_DC) PQclear(result); } smart_str_free(&str); - return empty_string; + return STR_EMPTY_ALLOC(); } num_rows = PQntuples(result); oid_offset = PQfnumber(result,"oid"); @@ -1786,7 +1786,7 @@ PHP_FUNCTION(pg_last_oid) if (Z_STRVAL_P(return_value)) { RETURN_STRING(Z_STRVAL_P(return_value), 1); } - RETURN_STRING(empty_string, 0); + RETURN_STRING("", 1); #endif } /* }}} */ diff --git a/ext/session/session.c b/ext/session/session.c index 135a732253..f5efc8ba9d 100644 --- a/ext/session/session.c +++ b/ext/session/session.c @@ -1060,7 +1060,7 @@ static void php_session_reset_id(TSRMLS_D) 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); } if (PS(apply_trans_sid)) { @@ -1370,13 +1370,16 @@ PHP_FUNCTION(session_id) { zval **p_name; int ac = ZEND_NUM_ARGS(); - char *old = empty_string; + char *old; if (ac < 0 || ac > 1 || zend_get_parameters_ex(ac, &p_name) == FAILURE) WRONG_PARAM_COUNT; - if (PS(id)) + if (PS(id)) { old = estrdup(PS(id)); + } else { + old = STR_EMPTY_ALLOC(); + } if (ac == 1) { convert_to_string_ex(p_name); diff --git a/ext/standard/file.c b/ext/standard/file.c index 6041fa4249..b3af5a20c0 100644 --- a/ext/standard/file.c +++ b/ext/standard/file.c @@ -416,7 +416,7 @@ PHP_FUNCTION(get_meta_tags) if (have_content) { add_assoc_string(return_value, name, value, 0); } else { - add_assoc_string(return_value, name, empty_string, 0); + add_assoc_string(return_value, name, "", 0); } efree(name); diff --git a/ext/standard/math.c b/ext/standard/math.c index 1ab898569b..8a2b3ecec1 100644 --- a/ext/standard/math.c +++ b/ext/standard/math.c @@ -791,7 +791,7 @@ _php_math_longtobase(zval *arg, int base) unsigned long value; if (Z_TYPE_P(arg) != IS_LONG || base < 2 || base > 36) { - return empty_string; + return STR_EMPTY_ALLOC(); } value = Z_LVAL_P(arg); @@ -820,7 +820,7 @@ _php_math_zvaltobase(zval *arg, int base TSRMLS_DC) static char digits[] = "0123456789abcdefghijklmnopqrstuvwxyz"; if ((Z_TYPE_P(arg) != IS_LONG && Z_TYPE_P(arg) != IS_DOUBLE) || base < 2 || base > 36) { - return empty_string; + return STR_EMPTY_ALLOC(); } if (Z_TYPE_P(arg) == IS_DOUBLE) { @@ -831,7 +831,7 @@ _php_math_zvaltobase(zval *arg, int base TSRMLS_DC) /* Don't try to convert +/- infinity */ if (fvalue == HUGE_VAL || fvalue == -HUGE_VAL) { php_error_docref(NULL TSRMLS_CC, E_WARNING, "Number too large"); - return empty_string; + return STR_EMPTY_ALLOC(); } end = ptr = buf + sizeof(buf) - 1; diff --git a/ext/standard/reg.c b/ext/standard/reg.c index cf8e15cd95..02d1903539 100644 --- a/ext/standard/reg.c +++ b/ext/standard/reg.c @@ -428,7 +428,7 @@ static void php_ereg_replace(INTERNAL_FUNCTION_PARAMETERS, int icase) if (Z_STRVAL_PP(arg_pattern) && Z_STRLEN_PP(arg_pattern)) pattern = estrndup(Z_STRVAL_PP(arg_pattern), Z_STRLEN_PP(arg_pattern)); else - pattern = empty_string; + pattern = STR_EMPTY_ALLOC(); } else { convert_to_long_ex(arg_pattern); pattern = emalloc(2); @@ -440,7 +440,7 @@ static void php_ereg_replace(INTERNAL_FUNCTION_PARAMETERS, int icase) if (Z_STRVAL_PP(arg_replace) && Z_STRLEN_PP(arg_replace)) replace = estrndup(Z_STRVAL_PP(arg_replace), Z_STRLEN_PP(arg_replace)); else - replace = empty_string; + replace = STR_EMPTY_ALLOC(); } else { convert_to_long_ex(arg_replace); replace = emalloc(2); @@ -452,7 +452,7 @@ static void php_ereg_replace(INTERNAL_FUNCTION_PARAMETERS, int icase) if (Z_STRVAL_PP(arg_string) && Z_STRLEN_PP(arg_string)) string = estrndup(Z_STRVAL_PP(arg_string), Z_STRLEN_PP(arg_string)); else - string = empty_string; + string = STR_EMPTY_ALLOC(); /* do the actual work */ ret = php_reg_replace(pattern, replace, string, icase, 1); @@ -527,7 +527,7 @@ static void php_split(INTERNAL_FUNCTION_PARAMETERS, int icase) while ((count == -1 || count > 1) && !(err = regexec(&re, strp, 1, subs, 0))) { if (subs[0].rm_so == 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 += subs[0].rm_eo; } else if (subs[0].rm_so == 0 && subs[0].rm_eo == 0) { diff --git a/ext/standard/string.c b/ext/standard/string.c index 7a7020b852..3eb4e8f707 100644 --- a/ext/standard/string.c +++ b/ext/standard/string.c @@ -3206,7 +3206,7 @@ static void php_str_replace_in_subject(zval *search, zval *replace, zval **subje convert_to_string_ex(subject); Z_TYPE_P(result) = IS_STRING; if (Z_STRLEN_PP(subject) == 0) { - ZVAL_STRINGL(result, empty_string, 0, 1); + ZVAL_STRINGL(result, "", 0, 1); return; } @@ -3254,7 +3254,7 @@ static void php_str_replace_in_subject(zval *search, zval *replace, zval **subje zend_hash_move_forward(Z_ARRVAL_P(replace)); } else { /* We've run out of replacement strings, so use an empty one. */ - replace_value = empty_string; + replace_value = ""; replace_len = 0; } } @@ -4186,11 +4186,11 @@ PHP_FUNCTION(str_repeat) /* Don't waste our time if it's empty */ if (Z_STRLEN_PP(input_str) == 0) - RETURN_STRINGL(empty_string, 0, 1); + RETURN_STRINGL("", 0, 1); /* ... or if the multiplier is zero */ if (Z_LVAL_PP(mult) == 0) - RETURN_STRINGL(empty_string, 0, 1); + RETURN_STRINGL("", 0, 1); /* Initialize the result string */ result_len = Z_STRLEN_PP(input_str) * Z_LVAL_PP(mult); diff --git a/ext/standard/var_unserializer.c b/ext/standard/var_unserializer.c index 261c1fc791..649661bcae 100644 --- a/ext/standard/var_unserializer.c +++ b/ext/standard/var_unserializer.c @@ -605,11 +605,7 @@ yy44: len = parse_iv(start + 2); - if (len == 0) { - str = empty_string; - } else { - str = estrndup(YYCURSOR, len); - } + str = estrndup(YYCURSOR, len); YYCURSOR += len + 2; *p = YYCURSOR; diff --git a/ext/standard/var_unserializer.re b/ext/standard/var_unserializer.re index 6ae7424b77..e42af889f8 100644 --- a/ext/standard/var_unserializer.re +++ b/ext/standard/var_unserializer.re @@ -350,11 +350,7 @@ PHPAPI int php_var_unserialize(UNSERIALIZE_PARAMETER) len = parse_iv(start + 2); - if (len == 0) { - str = empty_string; - } else { - str = estrndup(YYCURSOR, len); - } + str = estrndup(YYCURSOR, len); YYCURSOR += len + 2; *p = YYCURSOR; diff --git a/ext/sybase/php_sybase_db.c b/ext/sybase/php_sybase_db.c index f2c98c7640..a6f0886f86 100644 --- a/ext/sybase/php_sybase_db.c +++ b/ext/sybase/php_sybase_db.c @@ -282,7 +282,7 @@ PHP_RINIT_FUNCTION(sybase) php_sybase_module.default_link=-1; php_sybase_module.num_links = php_sybase_module.num_persistent; php_sybase_module.appname = estrndup("PHP " PHP_VERSION, sizeof("PHP " PHP_VERSION)); - php_sybase_module.server_message = empty_string; + php_sybase_module.server_message = STR_EMPTY_ALLOC(); php_sybase_module.min_error_severity = php_sybase_module.cfg_min_error_severity; php_sybase_module.min_message_severity = php_sybase_module.cfg_min_message_severity; return SUCCESS; @@ -886,7 +886,7 @@ PHP_FUNCTION(sybase_query) result->fields[i].max_length = dbcollen(sybase_ptr->link,i+1); result->fields[i].column_source = estrdup(dbcolsource(sybase_ptr->link,i+1)); if (!result->fields[i].column_source) { - result->fields[i].column_source = empty_string; + result->fields[i].column_source = STR_EMPTY_ALLOC(); } Z_TYPE(result->fields[i]) = column_types[i]; /* set numeric flag */ diff --git a/ext/sybase_ct/php_sybase_ct.c b/ext/sybase_ct/php_sybase_ct.c index 43dca5df2a..a7593685be 100644 --- a/ext/sybase_ct/php_sybase_ct.c +++ b/ext/sybase_ct/php_sybase_ct.c @@ -428,7 +428,7 @@ PHP_RINIT_FUNCTION(sybase) SybCtG(default_link)=-1; SybCtG(num_links) = SybCtG(num_persistent); SybCtG(appname) = estrndup("PHP " PHP_VERSION, sizeof("PHP " PHP_VERSION)); - SybCtG(server_message) = empty_string; + SybCtG(server_message) = STR_EMPTY_ALLOC(); return SUCCESS; } @@ -1274,7 +1274,7 @@ static sybase_result * php_sybase_fetch_result_set (sybase_link *sybase_ptr, int result->fields[i].name = estrdup(computed_buf); j++; } - result->fields[i].column_source = empty_string; + result->fields[i].column_source = STR_EMPTY_ALLOC(); result->fields[i].max_length = result->datafmt[i].maxlength-1; result->fields[i].numeric = result->numerics[i]; Z_TYPE(result->fields[i]) = result->types[i]; diff --git a/ext/wddx/wddx.c b/ext/wddx/wddx.c index 33dbfbd9fd..59c5188505 100644 --- a/ext/wddx/wddx.c +++ b/ext/wddx/wddx.c @@ -710,7 +710,7 @@ static void php_wddx_push_element(void *user_data, const XML_Char *name, const X ALLOC_ZVAL(ent.data); INIT_PZVAL(ent.data); Z_TYPE_P(ent.data) = IS_STRING; - Z_STRVAL_P(ent.data) = empty_string; + Z_STRVAL_P(ent.data) = STR_EMPTY_ALLOC(); Z_STRLEN_P(ent.data) = 0; wddx_stack_push((wddx_stack *)stack, &ent, sizeof(st_entry)); } else if (!strcmp(name, EL_BINARY)) { @@ -720,7 +720,7 @@ static void php_wddx_push_element(void *user_data, const XML_Char *name, const X ALLOC_ZVAL(ent.data); INIT_PZVAL(ent.data); Z_TYPE_P(ent.data) = IS_STRING; - Z_STRVAL_P(ent.data) = empty_string; + Z_STRVAL_P(ent.data) = STR_EMPTY_ALLOC(); Z_STRLEN_P(ent.data) = 0; wddx_stack_push((wddx_stack *)stack, &ent, sizeof(st_entry)); } else if (!strcmp(name, EL_CHAR)) { |