summaryrefslogtreecommitdiff
path: root/main/streams/plain_wrapper.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/streams/plain_wrapper.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/streams/plain_wrapper.c')
-rw-r--r--main/streams/plain_wrapper.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/main/streams/plain_wrapper.c b/main/streams/plain_wrapper.c
index bbd8cfbb51..e44e1ea348 100644
--- a/main/streams/plain_wrapper.c
+++ b/main/streams/plain_wrapper.c
@@ -207,7 +207,7 @@ PHPAPI php_stream *_php_stream_fopen_temporary_file(const char *dir, const char
if (stream) {
php_stdio_stream_data *self = (php_stdio_stream_data*)stream->abstract;
stream->wrapper = &php_plain_files_wrapper;
- stream->orig_path = estrndup(opened_path->val, opened_path->len);
+ stream->orig_path = estrndup(ZSTR_VAL(opened_path), ZSTR_LEN(opened_path));
self->temp_name = opened_path;
self->lock_flag = LOCK_UN;
@@ -451,7 +451,7 @@ static int php_stdiop_close(php_stream *stream, int close_handle)
return 0; /* everything should be closed already -> success */
}
if (data->temp_name) {
- unlink(data->temp_name->val);
+ unlink(ZSTR_VAL(data->temp_name));
/* temporary streams are never persistent */
zend_string_release(data->temp_name);
data->temp_name = NULL;
@@ -1469,8 +1469,8 @@ not_relative_path:
*/
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) {