Skip to content

Commit b7a7493

Browse files
committed
Zend: fix enum return types
1 parent 443e25a commit b7a7493

File tree

10 files changed

+15
-14
lines changed

10 files changed

+15
-14
lines changed

Zend/Optimizer/zend_inference.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -218,7 +218,7 @@ BEGIN_EXTERN_C()
218218

219219
ZEND_API void zend_ssa_find_false_dependencies(const zend_op_array *op_array, zend_ssa *ssa);
220220
ZEND_API void zend_ssa_find_sccs(const zend_op_array *op_array, zend_ssa *ssa);
221-
ZEND_API int zend_ssa_inference(zend_arena **raena, const zend_op_array *op_array, const zend_script *script, zend_ssa *ssa, zend_long optimization_level);
221+
ZEND_API zend_result zend_ssa_inference(zend_arena **raena, const zend_op_array *op_array, const zend_script *script, zend_ssa *ssa, zend_long optimization_level);
222222

223223
ZEND_API ZEND_ATTRIBUTE_CONST uint32_t zend_array_element_type(uint32_t t1, uint8_t op_type, int write, int insert);
224224

Zend/zend_API.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -415,7 +415,7 @@ ZEND_API bool zend_is_callable_ex(zval *callable, zend_object *object, uint32_t
415415
ZEND_API bool zend_is_callable(zval *callable, uint32_t check_flags, zend_string **callable_name);
416416
ZEND_API bool zend_make_callable(zval *callable, zend_string **callable_name);
417417
ZEND_API const char *zend_get_module_version(const char *module_name);
418-
ZEND_API int zend_get_module_started(const char *module_name);
418+
ZEND_API zend_result zend_get_module_started(const char *module_name);
419419

420420
ZEND_API zend_property_info *zend_declare_typed_property(zend_class_entry *ce, zend_string *name, zval *property, int access_type, zend_string *doc_comment, zend_type type);
421421

Zend/zend_compile.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -822,8 +822,8 @@ ZEND_API zend_op_array *compile_string(zend_string *source_string, const char *f
822822
ZEND_API zend_op_array *compile_filename(int type, zend_string *filename);
823823
ZEND_API zend_ast *zend_compile_string_to_ast(
824824
zend_string *code, struct _zend_arena **ast_arena, zend_string *filename);
825-
ZEND_API int zend_execute_scripts(int type, zval *retval, int file_count, ...);
826-
ZEND_API int open_file_for_scanning(zend_file_handle *file_handle);
825+
ZEND_API zend_result zend_execute_scripts(int type, zval *retval, int file_count, ...);
826+
ZEND_API zend_result open_file_for_scanning(zend_file_handle *file_handle);
827827
ZEND_API void init_op_array(zend_op_array *op_array, uint8_t type, int initial_ops_size);
828828
ZEND_API void destroy_op_array(zend_op_array *op_array);
829829
ZEND_API void zend_destroy_static_vars(zend_op_array *op_array);

Zend/zend_execute.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -388,7 +388,7 @@ ZEND_API bool zend_gcc_global_regs(void);
388388

389389
#define ZEND_USER_OPCODE_DISPATCH_TO 0x100 /* call original handler of returned opcode */
390390

391-
ZEND_API int zend_set_user_opcode_handler(uint8_t opcode, user_opcode_handler_t handler);
391+
ZEND_API zend_result zend_set_user_opcode_handler(uint8_t opcode, user_opcode_handler_t handler);
392392
ZEND_API user_opcode_handler_t zend_get_user_opcode_handler(uint8_t opcode);
393393

394394
ZEND_API zval *zend_get_zval_ptr(const zend_op *opline, int op_type, const znode_op *node, const zend_execute_data *execute_data);
@@ -403,7 +403,7 @@ ZEND_API HashTable *zend_unfinished_execution_gc_ex(zend_execute_data *execute_d
403403
zval * ZEND_FASTCALL zend_handle_named_arg(
404404
zend_execute_data **call_ptr, zend_string *arg_name,
405405
uint32_t *arg_num_ptr, void **cache_slot);
406-
ZEND_API int ZEND_FASTCALL zend_handle_undef_args(zend_execute_data *call);
406+
ZEND_API zend_result ZEND_FASTCALL zend_handle_undef_args(zend_execute_data *call);
407407

408408
#define CACHE_ADDR(num) \
409409
((void**)((char*)EX(run_time_cache) + (num)))

Zend/zend_ini.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -247,8 +247,8 @@ END_EXTERN_C()
247247
/* INI parsing engine */
248248
typedef void (*zend_ini_parser_cb_t)(zval *arg1, zval *arg2, zval *arg3, int callback_type, void *arg);
249249
BEGIN_EXTERN_C()
250-
ZEND_API int zend_parse_ini_file(zend_file_handle *fh, bool unbuffered_errors, int scanner_mode, zend_ini_parser_cb_t ini_parser_cb, void *arg);
251-
ZEND_API int zend_parse_ini_string(const char *str, bool unbuffered_errors, int scanner_mode, zend_ini_parser_cb_t ini_parser_cb, void *arg);
250+
ZEND_API zend_result zend_parse_ini_file(zend_file_handle *fh, bool unbuffered_errors, int scanner_mode, zend_ini_parser_cb_t ini_parser_cb, void *arg);
251+
ZEND_API zend_result zend_parse_ini_string(const char *str, bool unbuffered_errors, int scanner_mode, zend_ini_parser_cb_t ini_parser_cb, void *arg);
252252
END_EXTERN_C()
253253

254254
/* INI entries */

Zend/zend_interfaces.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -119,7 +119,7 @@ static void zend_user_it_dtor(zend_object_iterator *_iter)
119119
/* }}} */
120120

121121
/* {{{ zend_user_it_valid */
122-
ZEND_API int zend_user_it_valid(zend_object_iterator *_iter)
122+
ZEND_API zend_result zend_user_it_valid(zend_object_iterator *_iter)
123123
{
124124
if (_iter) {
125125
zend_user_iterator *iter = (zend_user_iterator*)_iter;

Zend/zend_list.h

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@
2020
#ifndef ZEND_LIST_H
2121
#define ZEND_LIST_H
2222

23+
#include "zend_result.h"
2324
#include "zend_portability.h" // for BEGIN_EXTERN_C
2425

2526
typedef struct _zend_array HashTable;
@@ -58,7 +59,7 @@ void zend_destroy_rsrc_list_dtors(void);
5859

5960
ZEND_API zval* ZEND_FASTCALL zend_list_insert(void *ptr, int type);
6061
ZEND_API void ZEND_FASTCALL zend_list_free(zend_resource *res);
61-
ZEND_API int ZEND_FASTCALL zend_list_delete(zend_resource *res);
62+
ZEND_API zend_result ZEND_FASTCALL zend_list_delete(zend_resource *res);
6263
ZEND_API void ZEND_FASTCALL zend_list_close(zend_resource *res);
6364

6465
ZEND_API zend_resource *zend_register_resource(void *rsrc_pointer, int rsrc_type);

Zend/zend_multibyte.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -72,12 +72,12 @@ ZEND_API ZEND_ATTRIBUTE_PURE const char *zend_multibyte_get_encoding_name(const
7272
ZEND_API ZEND_ATTRIBUTE_PURE int zend_multibyte_check_lexer_compatibility(const zend_encoding *encoding);
7373
ZEND_API const zend_encoding *zend_multibyte_encoding_detector(const unsigned char *string, size_t length, const zend_encoding **list, size_t list_size);
7474
ZEND_API size_t zend_multibyte_encoding_converter(unsigned char **to, size_t *to_length, const unsigned char *from, size_t from_length, const zend_encoding *encoding_to, const zend_encoding *encoding_from);
75-
ZEND_API int zend_multibyte_parse_encoding_list(const char *encoding_list, size_t encoding_list_len, const zend_encoding ***return_list, size_t *return_size, bool persistent);
75+
ZEND_API zend_result zend_multibyte_parse_encoding_list(const char *encoding_list, size_t encoding_list_len, const zend_encoding ***return_list, size_t *return_size, bool persistent);
7676

7777
ZEND_API ZEND_ATTRIBUTE_PURE const zend_encoding *zend_multibyte_get_internal_encoding(void);
7878
ZEND_API ZEND_ATTRIBUTE_PURE const zend_encoding *zend_multibyte_get_script_encoding(void);
7979
ZEND_API int zend_multibyte_set_script_encoding(const zend_encoding **encoding_list, size_t encoding_list_size);
80-
ZEND_API int zend_multibyte_set_internal_encoding(const zend_encoding *encoding);
80+
ZEND_API zend_result zend_multibyte_set_internal_encoding(const zend_encoding *encoding);
8181
ZEND_API zend_result zend_multibyte_set_script_encoding_by_string(const char *new_value, size_t new_value_length);
8282

8383
END_EXTERN_C()

Zend/zend_signal.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ ZEND_API zend_signal_globals_t zend_signal_globals;
6565
#endif
6666

6767
static void zend_signal_handler(int signo, siginfo_t *siginfo, void *context);
68-
static int zend_signal_register(int signo, void (*handler)(int, siginfo_t*, void*));
68+
static zend_result zend_signal_register(int signo, void (*handler)(int, siginfo_t*, void*));
6969

7070
#if defined(__CYGWIN__) || defined(__PASE__)
7171
/* Matches zend_execute_API.c; these platforms don't support ITIMER_PROF. */

Zend/zend_virtual_cwd.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -166,7 +166,7 @@ CWD_API int virtual_cwd_activate(void);
166166
CWD_API int virtual_cwd_deactivate(void);
167167
CWD_API char *virtual_getcwd_ex(size_t *length);
168168
CWD_API char *virtual_getcwd(char *buf, size_t size);
169-
CWD_API int virtual_chdir(const char *path);
169+
CWD_API zend_result virtual_chdir(const char *path);
170170
CWD_API int virtual_chdir_file(const char *path, int (*p_chdir)(const char *path));
171171
CWD_API int virtual_filepath(const char *path, char **filepath);
172172
CWD_API int virtual_filepath_ex(const char *path, char **filepath, verify_path_func verify_path);

0 commit comments

Comments
 (0)