diff options
Diffstat (limited to 'main/php_ini.c')
-rw-r--r-- | main/php_ini.c | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/main/php_ini.c b/main/php_ini.c index cdd4a61fb5..c94e412094 100644 --- a/main/php_ini.c +++ b/main/php_ini.c @@ -200,7 +200,7 @@ PHPAPI void config_zval_dtor(zval *zvalue) zend_hash_destroy(Z_ARRVAL_P(zvalue)); free(Z_ARR_P(zvalue)); } else if (Z_TYPE_P(zvalue) == IS_STRING) { - STR_RELEASE(Z_STR_P(zvalue)); + zend_string_release(Z_STR_P(zvalue)); } } /* Reset / free active_ini_sectin global */ @@ -243,7 +243,7 @@ static void php_ini_parser_cb(zval *arg1, zval *arg2, zval *arg3, int callback_t } else { /* Store in active hash */ entry = zend_hash_update(active_hash, Z_STR_P(arg1), arg2); - Z_STR_P(entry) = STR_DUP(Z_STR_P(entry), 1); + Z_STR_P(entry) = zend_string_dup(Z_STR_P(entry), 1); } } break; @@ -272,7 +272,7 @@ static void php_ini_parser_cb(zval *arg1, zval *arg2, zval *arg3, int callback_t } else { entry = zend_hash_next_index_insert(Z_ARRVAL_P(find_arr), arg2); } - Z_STR_P(entry) = STR_DUP(Z_STR_P(entry), 1); + Z_STR_P(entry) = zend_string_dup(Z_STR_P(entry), 1); } break; @@ -545,7 +545,7 @@ int php_init_config(TSRMLS_D) /* Check if php_ini_file_name is a file and can be opened */ if (php_ini_file_name && php_ini_file_name[0]) { - struct stat statbuf; + zend_stat_t statbuf; if (!VCWD_STAT(php_ini_file_name, &statbuf)) { if (!((statbuf.st_mode & S_IFMT) == S_IFDIR)) { @@ -593,7 +593,7 @@ int php_init_config(TSRMLS_D) { zval tmp; - ZVAL_NEW_STR(&tmp, STR_INIT(fh.filename, strlen(fh.filename), 1)); + ZVAL_NEW_STR(&tmp, zend_string_init(fh.filename, strlen(fh.filename), 1)); zend_hash_str_update(&configuration_hash, "cfg_file_path", sizeof("cfg_file_path")-1, &tmp); if (php_ini_opened_path) { efree(php_ini_opened_path); @@ -614,7 +614,7 @@ int php_init_config(TSRMLS_D) if (!sapi_module.php_ini_ignore && php_ini_scanned_path_len) { struct dirent **namelist; int ndir, i; - struct stat sb; + zend_stat_t sb; char ini_file[MAXPATHLEN]; char *p; zend_file_handle fh2; @@ -744,7 +744,7 @@ void php_ini_register_extensions(TSRMLS_D) */ PHPAPI int php_parse_user_ini_file(const char *dirname, char *ini_filename, HashTable *target_hash TSRMLS_DC) { - struct stat sb; + zend_stat_t sb; char ini_file[MAXPATHLEN]; zend_file_handle fh; @@ -778,7 +778,7 @@ PHPAPI void php_ini_activate_config(HashTable *source_hash, int modify_type, int { zend_string *str; zval *data; - ulong num_index; + zend_ulong num_index; /* Walk through config hash and alter matching ini entries using the values found in the hash */ for (zend_hash_internal_pointer_reset(source_hash); @@ -875,7 +875,7 @@ PHPAPI zval *cfg_get_entry(const char *name, uint name_length) /* {{{ cfg_get_long */ -PHPAPI int cfg_get_long(const char *varname, long *result) +PHPAPI int cfg_get_long(const char *varname, zend_long *result) { zval *tmp, var; @@ -884,7 +884,7 @@ PHPAPI int cfg_get_long(const char *varname, long *result) return FAILURE; } ZVAL_DUP(&var, tmp); - convert_to_long(&var); + convert_to_int(&var); *result = Z_LVAL(var); return SUCCESS; } |