diff options
author | George Peter Banyard <girgias@php.net> | 2020-08-28 15:41:27 +0200 |
---|---|---|
committer | George Peter Banyard <girgias@php.net> | 2020-08-28 15:41:27 +0200 |
commit | fa8d9b1183f961cb6e0f0ef5a2d1b1d3744fe35b (patch) | |
tree | a00044117c3f56969a7b77b466bbdbdd45d66db7 /Zend/zend_highlight.h | |
parent | 7690439edd93bf9dc868cbc34a12fbad6b26e777 (diff) | |
download | php-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_highlight.h')
-rw-r--r-- | Zend/zend_highlight.h | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/Zend/zend_highlight.h b/Zend/zend_highlight.h index 8ea1518ca6..c4f819d508 100644 --- a/Zend/zend_highlight.h +++ b/Zend/zend_highlight.h @@ -39,8 +39,8 @@ typedef struct _zend_syntax_highlighter_ini { BEGIN_EXTERN_C() ZEND_API void zend_highlight(zend_syntax_highlighter_ini *syntax_highlighter_ini); ZEND_API void zend_strip(void); -ZEND_API int highlight_file(const char *filename, zend_syntax_highlighter_ini *syntax_highlighter_ini); -ZEND_API int highlight_string(zval *str, zend_syntax_highlighter_ini *syntax_highlighter_ini, const char *str_name); +ZEND_API zend_result highlight_file(const char *filename, zend_syntax_highlighter_ini *syntax_highlighter_ini); +ZEND_API void highlight_string(zval *str, zend_syntax_highlighter_ini *syntax_highlighter_ini, const char *str_name); ZEND_API void zend_html_putc(char c); ZEND_API void zend_html_puts(const char *s, size_t len); END_EXTERN_C() |