summaryrefslogtreecommitdiff
path: root/main/php_streams.h
diff options
context:
space:
mode:
authorXinchen Hui <laruence@gmail.com>2015-02-02 13:52:56 +0800
committerXinchen Hui <laruence@gmail.com>2015-02-02 13:53:03 +0800
commit38efb690c0772d6d3bab20a1b1fee383eca1c04d (patch)
treeb01a5ab752817a20cc6b581e1c079d1fb7040274 /main/php_streams.h
parent942809909e1bc125db038796c0a1a0b53eeaca7d (diff)
downloadphp-git-38efb690c0772d6d3bab20a1b1fee383eca1c04d.tar.gz
Ported ftp
Diffstat (limited to 'main/php_streams.h')
-rw-r--r--main/php_streams.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/main/php_streams.h b/main/php_streams.h
index 9a22a531f4..913c4c3bb4 100644
--- a/main/php_streams.h
+++ b/main/php_streams.h
@@ -259,6 +259,12 @@ END_EXTERN_C()
RETURN_FALSE; \
} \
} while (0)
+#define php_stream_from_res(xstr, res) do { \
+ if (((xstr) = (php_stream*)zend_fetch_resource2((res), \
+ "stream", NULL, php_file_le_stream(), php_file_le_pstream())) == NULL) { \
+ RETURN_FALSE; \
+ } \
+} while (0)
#define php_stream_from_zval_no_verify(xstr, pzval) (xstr) = (php_stream*)zend_fetch_resource2_ex((pzval), "stream", NULL, php_file_le_stream(), php_file_le_pstream())
BEGIN_EXTERN_C()