diff options
Diffstat (limited to 'main/php_streams.h')
-rw-r--r-- | main/php_streams.h | 6 |
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() |