cvs: php-src /main/streams userspace.c

From: Date: Tue, 02 Dec 2003 18:52:59 +0000
Subject: cvs: php-src /main/streams userspace.c
Groups: php.cvs 
Request: Send a blank email to php-cvs+get-24834@lists.php.net to get a copy of this message
pollita Tue Dec 2 13:52:59 2003 EDT Modified files: /php-src/main/streams userspace.c Log: Update userspace/url_stat proto Index: php-src/main/streams/userspace.c diff -u php-src/main/streams/userspace.c:1.10 php-src/main/streams/userspace.c:1.11 --- php-src/main/streams/userspace.c:1.10 Sat Sep 13 11:27:08 2003 +++ php-src/main/streams/userspace.c Tue Dec 2 13:52:58 2003 @@ -16,7 +16,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: userspace.c,v 1.10 2003/09/13 15:27:08 abies Exp $ */ +/* $Id: userspace.c,v 1.11 2003/12/02 18:52:58 pollita Exp $ */ #include "php.h" #include "php_globals.h" @@ -32,7 +32,7 @@ }; static php_stream *user_wrapper_opener(php_stream_wrapper *wrapper, char *filename, char *mode, int options, char **opened_path, php_stream_context *context STREAMS_DC TSRMLS_DC); -static int user_wrapper_stat_url(php_stream_wrapper *wrapper, char *url, php_stream_statbuf *ssb TSRMLS_DC); +static int user_wrapper_stat_url(php_stream_wrapper *wrapper, char *url, int flags, php_stream_statbuf *ssb, php_stream_context *context TSRMLS_DC); static int user_wrapper_unlink(php_stream_wrapper *wrapper, char *url, int options, php_stream_context *context TSRMLS_DC); static php_stream *user_wrapper_opendir(php_stream_wrapper *wrapper, char *filename, char *mode, int options, char **opened_path, php_stream_context *context STREAMS_DC TSRMLS_DC); @@ -145,7 +145,7 @@ return array( just like that returned by fstat() ); } - function url_stat(string $url) + function url_stat(string $url, int $flags) { return array( just like that returned by stat() ); } @@ -766,11 +766,11 @@ return ret; } -static int user_wrapper_stat_url(php_stream_wrapper *wrapper, char *url, php_stream_statbuf *ssb TSRMLS_DC) +static int user_wrapper_stat_url(php_stream_wrapper *wrapper, char *url, int flags, php_stream_statbuf *ssb, php_stream_context *context TSRMLS_DC) { struct php_user_stream_wrapper *uwrap = (struct php_user_stream_wrapper*)wrapper->abstract; - zval *zfilename, *zfuncname, *zretval; - zval **args[1]; + zval *zfilename, *zfuncname, *zretval, *zflags; + zval **args[2]; int call_result; zval *object; int ret = -1; @@ -788,6 +788,10 @@ ZVAL_STRING(zfilename, url, 1); args[0] = &zfilename; + MAKE_STD_ZVAL(zflags); + ZVAL_LONG(zflags, flags); + args[1] = &zflags; + MAKE_STD_ZVAL(zfuncname); ZVAL_STRING(zfuncname, USERSTREAM_STATURL, 1); @@ -795,7 +799,7 @@ &object, zfuncname, &zretval, - 1, args, + 2, args, 0, NULL TSRMLS_CC); if (call_result == SUCCESS && zretval != NULL && Z_TYPE_P(zretval) == IS_ARRAY) { @@ -816,6 +820,7 @@ zval_ptr_dtor(&zfuncname); zval_ptr_dtor(&zfilename); + zval_ptr_dtor(&zflags); return ret;

« previous php.cvs (#24834) next »