php_stream_from_zval can no longer return false

This commit is contained in:
Nikita Popov 2019-09-03 09:25:50 +02:00
parent 3ac0f42c40
commit 7f78f839dc
2 changed files with 3 additions and 3 deletions

View File

@ -1068,7 +1068,7 @@ static const func_info_t func_infos[] = {
F1("hash_hmac_file", MAY_BE_NULL | MAY_BE_FALSE | MAY_BE_STRING),
F1("hash_init", MAY_BE_NULL | MAY_BE_FALSE | MAY_BE_OBJECT),
F0("hash_update", MAY_BE_NULL | MAY_BE_FALSE | MAY_BE_TRUE),
F0("hash_update_stream", MAY_BE_NULL | MAY_BE_FALSE | MAY_BE_LONG),
F0("hash_update_stream", MAY_BE_NULL | MAY_BE_LONG),
F0("hash_update_file", MAY_BE_NULL | MAY_BE_FALSE | MAY_BE_TRUE),
F1("hash_final", MAY_BE_NULL | MAY_BE_STRING),
F1("hash_copy", MAY_BE_NULL | MAY_BE_FALSE | MAY_BE_OBJECT),

View File

@ -260,13 +260,13 @@ END_EXTERN_C()
#define php_stream_from_zval(xstr, pzval) do { \
if (((xstr) = (php_stream*)zend_fetch_resource2_ex((pzval), \
"stream", php_file_le_stream(), php_file_le_pstream())) == NULL) { \
RETURN_FALSE; \
return; \
} \
} while (0)
#define php_stream_from_res(xstr, res) do { \
if (((xstr) = (php_stream*)zend_fetch_resource2((res), \
"stream", php_file_le_stream(), php_file_le_pstream())) == NULL) { \
RETURN_FALSE; \
return; \
} \
} while (0)
#define php_stream_from_res_no_verify(xstr, pzval) (xstr) = (php_stream*)zend_fetch_resource2((res), "stream", php_file_le_stream(), php_file_le_pstream())