summaryrefslogtreecommitdiff
path: root/Zend/zend_stream.h
diff options
context:
space:
mode:
authorGeorge Peter Banyard <girgias@php.net>2020-08-28 15:41:27 +0200
committerGeorge Peter Banyard <girgias@php.net>2020-08-28 15:41:27 +0200
commitfa8d9b1183f961cb6e0f0ef5a2d1b1d3744fe35b (patch)
treea00044117c3f56969a7b77b466bbdbdd45d66db7 /Zend/zend_stream.h
parent7690439edd93bf9dc868cbc34a12fbad6b26e777 (diff)
downloadphp-git-fa8d9b1183f961cb6e0f0ef5a2d1b1d3744fe35b.tar.gz
Improve type declarations for Zend APIs
Voidification of Zend API which always succeeded Use bool argument types instead of int for boolean arguments Use bool return type for functions which return true/false (1/0) Use zend_result return type for functions which return SUCCESS/FAILURE as they don't follow normal boolean semantics Closes GH-6002
Diffstat (limited to 'Zend/zend_stream.h')
-rw-r--r--Zend/zend_stream.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/Zend/zend_stream.h b/Zend/zend_stream.h
index 51651add38..023e2d0555 100644
--- a/Zend/zend_stream.h
+++ b/Zend/zend_stream.h
@@ -66,8 +66,8 @@ typedef struct _zend_file_handle {
BEGIN_EXTERN_C()
ZEND_API void zend_stream_init_fp(zend_file_handle *handle, FILE *fp, const char *filename);
ZEND_API void zend_stream_init_filename(zend_file_handle *handle, const char *filename);
-ZEND_API int zend_stream_open(const char *filename, zend_file_handle *handle);
-ZEND_API int zend_stream_fixup(zend_file_handle *file_handle, char **buf, size_t *len);
+ZEND_API zend_result zend_stream_open(const char *filename, zend_file_handle *handle);
+ZEND_API zend_result zend_stream_fixup(zend_file_handle *file_handle, char **buf, size_t *len);
ZEND_API void zend_file_handle_dtor(zend_file_handle *fh);
ZEND_API int zend_compare_file_handles(zend_file_handle *fh1, zend_file_handle *fh2);
END_EXTERN_C()