summaryrefslogtreecommitdiff
path: root/main/fopen_wrappers.c
diff options
context:
space:
mode:
authorDmitry Stogov <dmitry@zend.com>2015-06-30 13:59:27 +0300
committerDmitry Stogov <dmitry@zend.com>2015-06-30 13:59:27 +0300
commit7aa7627172c11979ec45c2db85f99182812ee59d (patch)
tree90762a1d26b47213a9edd7016a9c45110156e24e /main/fopen_wrappers.c
parentd554d64f649a915b4ecb3a1de409cfc8ff0e9133 (diff)
downloadphp-git-7aa7627172c11979ec45c2db85f99182812ee59d.tar.gz
Use ZSTR_ API to access zend_string elements (this is just renaming without semantick changes).
Diffstat (limited to 'main/fopen_wrappers.c')
-rw-r--r--main/fopen_wrappers.c18
1 files changed, 9 insertions, 9 deletions
diff --git a/main/fopen_wrappers.c b/main/fopen_wrappers.c
index a4c6e4a6db..09a07f4f6f 100644
--- a/main/fopen_wrappers.c
+++ b/main/fopen_wrappers.c
@@ -90,24 +90,24 @@ PHPAPI ZEND_INI_MH(OnUpdateBaseDir)
if (stage == PHP_INI_STAGE_STARTUP || stage == PHP_INI_STAGE_SHUTDOWN || stage == PHP_INI_STAGE_ACTIVATE || stage == PHP_INI_STAGE_DEACTIVATE) {
/* We're in a PHP_INI_SYSTEM context, no restrictions */
- *p = new_value ? new_value->val : NULL;
+ *p = new_value ? ZSTR_VAL(new_value) : NULL;
return SUCCESS;
}
/* Otherwise we're in runtime */
if (!*p || !**p) {
/* open_basedir not set yet, go ahead and give it a value */
- *p = new_value->val;
+ *p = ZSTR_VAL(new_value);
return SUCCESS;
}
/* Shortcut: When we have a open_basedir and someone tries to unset, we know it'll fail */
- if (!new_value || !*new_value->val) {
+ if (!new_value || !*ZSTR_VAL(new_value)) {
return FAILURE;
}
/* Is the proposed open_basedir at least as restrictive as the current setting? */
- ptr = pathbuf = estrdup(new_value->val);
+ ptr = pathbuf = estrdup(ZSTR_VAL(new_value));
while (ptr && *ptr) {
end = strchr(ptr, DEFAULT_DIR_SEPARATOR);
if (end != NULL) {
@@ -124,7 +124,7 @@ PHPAPI ZEND_INI_MH(OnUpdateBaseDir)
efree(pathbuf);
/* Everything checks out, set it */
- *p = new_value->val;
+ *p = ZSTR_VAL(new_value);
return SUCCESS;
}
@@ -573,8 +573,8 @@ PHPAPI zend_string *php_resolve_path(const char *filename, int filename_length,
*/
if (zend_is_executing() &&
(exec_filename = zend_get_executed_filename_ex()) != NULL) {
- const char *exec_fname = exec_filename->val;
- size_t exec_fname_length = exec_filename->len;
+ const char *exec_fname = ZSTR_VAL(exec_filename);
+ size_t exec_fname_length = ZSTR_LEN(exec_filename);
while ((--exec_fname_length < SIZE_MAX) && !IS_SLASH(exec_fname[exec_fname_length]));
if (exec_fname_length > 0 &&
@@ -651,8 +651,8 @@ PHPAPI FILE *php_fopen_with_path(const char *filename, const char *mode, const c
*/
if (zend_is_executing() &&
(exec_filename = zend_get_executed_filename_ex()) != NULL) {
- const char *exec_fname = exec_filename->val;
- size_t exec_fname_length = exec_filename->len;
+ const char *exec_fname = ZSTR_VAL(exec_filename);
+ size_t exec_fname_length = ZSTR_LEN(exec_filename);
while ((--exec_fname_length < SIZE_MAX) && !IS_SLASH(exec_fname[exec_fname_length]));
if ((exec_fname && exec_fname[0] == '[') || exec_fname_length <= 0) {