com php-src: Temporary fix zcontext: ext/spl/spl_directory. c ext/spl/spl_directory.h

From: Date: Fri, 28 Feb 2014 14:21:51 +0000
Subject: com php-src: Temporary fix zcontext: ext/spl/spl_directory. c ext/spl/spl_directory.h
Groups: php.cvs 
Request: Send a blank email to php-cvs+get-77777@lists.php.net to get a copy of this message
Commit: 2a826609233526d9ad5b015323395e132b7accf6 Author: Xinchen Hui <laruence@gmail.com> Fri, 28 Feb 2014 22:21:51 +0800 Parents: 53128644f315f755820ff4e633e02365dbe88ec0 Branches: phpng Link: http://git.php.net/?p=php-src.git;a=commitdiff;h=2a826609233526d9ad5b015323395e132b7accf6 Log: Temporary fix zcontext Changed paths: M ext/spl/spl_directory.c M ext/spl/spl_directory.h Diff: diff --git a/ext/spl/spl_directory.c b/ext/spl/spl_directory.c index 46855ef..f9a5096 100644 --- a/ext/spl/spl_directory.c +++ b/ext/spl/spl_directory.c @@ -275,7 +275,7 @@ static int spl_filesystem_file_open(spl_filesystem_object *intern, int use_inclu return FAILURE; } - intern->u.file.context = php_stream_context_from_zval(&intern->u.file.zcontext, 0); + intern->u.file.context = php_stream_context_from_zval(intern->u.file.zcontext, 0); intern->u.file.stream = php_stream_open_wrapper_ex(intern->file_name, intern->u.file.open_mode, (use_include_path ? USE_PATH : 0) | REPORT_ERRORS, NULL, intern->u.file.context); if (!intern->file_name_len || !intern->u.file.stream) { @@ -287,10 +287,12 @@ static int spl_filesystem_file_open(spl_filesystem_object *intern, int use_inclu return FAILURE; } - if (!ZVAL_IS_UNDEF(&intern->u.file.zcontext)) { + /* + if (intern->u.file.zcontext) { //zend_list_addref(Z_RES_VAL(intern->u.file.zcontext)); - Z_ADDREF_P(&intern->u.file.zcontext); + Z_ADDREF_P(intern->u.file.zcontext); } + */ if (intern->file_name_len > 1 && IS_SLASH_AT(intern->file_name, intern->file_name_len-1)) { intern->file_name_len--; @@ -2339,7 +2341,6 @@ SPL_METHOD(SplTempFileObject, __construct) } intern->u.file.open_mode = "wb"; intern->u.file.open_mode_len = 1; - ZVAL_UNDEF(&intern->u.file.zcontext); if (spl_filesystem_file_open(intern, 0, 0 TSRMLS_CC) == SUCCESS) { intern->_path_len = 0; diff --git a/ext/spl/spl_directory.h b/ext/spl/spl_directory.h index 72c701d..32757c1 100644 --- a/ext/spl/spl_directory.h +++ b/ext/spl/spl_directory.h @@ -87,7 +87,7 @@ struct _spl_filesystem_object { struct { php_stream *stream; php_stream_context *context; - zval zcontext; + zval *zcontext; char *open_mode; int open_mode_len; zval current_zval;

« previous php.cvs (#77777) next »