Skip to content

Commit 94758a1

Browse files
committed
Use zend_result instead of ZEND_RESULT_CODE
1 parent 136bc90 commit 94758a1

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

53 files changed

+396
-396
lines changed

Zend/zend.c

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -74,17 +74,17 @@ ZEND_API zend_class_entry *zend_standard_class_def = NULL;
7474
ZEND_API size_t (*zend_printf)(const char *format, ...);
7575
ZEND_API zend_write_func_t zend_write;
7676
ZEND_API FILE *(*zend_fopen)(const char *filename, zend_string **opened_path);
77-
ZEND_API ZEND_RESULT_CODE (*zend_stream_open_function)(const char *filename, zend_file_handle *handle);
77+
ZEND_API zend_result (*zend_stream_open_function)(const char *filename, zend_file_handle *handle);
7878
ZEND_API void (*zend_ticks_function)(int ticks);
7979
ZEND_API void (*zend_interrupt_function)(zend_execute_data *execute_data);
8080
ZEND_API void (*zend_error_cb)(int type, const char *error_filename, const uint32_t error_lineno, zend_string *message);
8181
void (*zend_printf_to_smart_string)(smart_string *buf, const char *format, va_list ap);
8282
void (*zend_printf_to_smart_str)(smart_str *buf, const char *format, va_list ap);
8383
ZEND_API char *(*zend_getenv)(const char *name, size_t name_len);
8484
ZEND_API zend_string *(*zend_resolve_path)(const char *filename, size_t filename_len);
85-
ZEND_API ZEND_RESULT_CODE (*zend_post_startup_cb)(void) = NULL;
85+
ZEND_API zend_result (*zend_post_startup_cb)(void) = NULL;
8686
ZEND_API void (*zend_post_shutdown_cb)(void) = NULL;
87-
ZEND_API ZEND_RESULT_CODE (*zend_preload_autoload)(zend_string *filename) = NULL;
87+
ZEND_API zend_result (*zend_preload_autoload)(zend_string *filename) = NULL;
8888

8989
/* This callback must be signal handler safe! */
9090
void (*zend_on_timeout)(int seconds);
@@ -1018,7 +1018,7 @@ static void zend_resolve_property_types(void) /* {{{ */
10181018
/* Unlink the global (r/o) copies of the class, function and constant tables,
10191019
* and use a fresh r/w copy for the startup thread
10201020
*/
1021-
ZEND_RESULT_CODE zend_post_startup(void) /* {{{ */
1021+
zend_result zend_post_startup(void) /* {{{ */
10221022
{
10231023
#ifdef ZTS
10241024
zend_encoding **script_encoding_list;
@@ -1030,7 +1030,7 @@ ZEND_RESULT_CODE zend_post_startup(void) /* {{{ */
10301030
zend_resolve_property_types();
10311031

10321032
if (zend_post_startup_cb) {
1033-
ZEND_RESULT_CODE (*cb)(void) = zend_post_startup_cb;
1033+
zend_result (*cb)(void) = zend_post_startup_cb;
10341034

10351035
zend_post_startup_cb = NULL;
10361036
if (cb() != SUCCESS) {
@@ -1662,13 +1662,13 @@ ZEND_API ZEND_COLD void zend_user_exception_handler(void) /* {{{ */
16621662
}
16631663
} /* }}} */
16641664

1665-
ZEND_API ZEND_RESULT_CODE zend_execute_scripts(int type, zval *retval, int file_count, ...) /* {{{ */
1665+
ZEND_API zend_result zend_execute_scripts(int type, zval *retval, int file_count, ...) /* {{{ */
16661666
{
16671667
va_list files;
16681668
int i;
16691669
zend_file_handle *file_handle;
16701670
zend_op_array *op_array;
1671-
ZEND_RESULT_CODE ret = SUCCESS;
1671+
zend_result ret = SUCCESS;
16721672

16731673
va_start(files, file_count);
16741674
for (i = 0; i < file_count; i++) {

Zend/zend.h

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -195,7 +195,7 @@ typedef struct _zend_utility_functions {
195195
zval *(*get_configuration_directive)(zend_string *name);
196196
void (*ticks_function)(int ticks);
197197
void (*on_timeout)(int seconds);
198-
ZEND_RESULT_CODE (*stream_open_function)(const char *filename, zend_file_handle *handle);
198+
zend_result (*stream_open_function)(const char *filename, zend_file_handle *handle);
199199
void (*printf_to_smart_string_function)(smart_string *buf, const char *format, va_list ap);
200200
void (*printf_to_smart_str_function)(smart_str *buf, const char *format, va_list ap);
201201
char *(*getenv_function)(const char *name, size_t name_len);
@@ -230,7 +230,7 @@ BEGIN_EXTERN_C()
230230
void zend_startup(zend_utility_functions *utility_functions);
231231
void zend_shutdown(void);
232232
void zend_register_standard_ini_entries(void);
233-
ZEND_RESULT_CODE zend_post_startup(void);
233+
zend_result zend_post_startup(void);
234234
void zend_set_utility_values(zend_utility_values *utility_values);
235235

236236
ZEND_API ZEND_COLD ZEND_NORETURN void _zend_bailout(const char *filename, uint32_t lineno);
@@ -283,18 +283,18 @@ extern ZEND_API void (*zend_ticks_function)(int ticks);
283283
extern ZEND_API void (*zend_interrupt_function)(zend_execute_data *execute_data);
284284
extern ZEND_API void (*zend_error_cb)(int type, const char *error_filename, const uint32_t error_lineno, zend_string *message);
285285
extern ZEND_API void (*zend_on_timeout)(int seconds);
286-
extern ZEND_API ZEND_RESULT_CODE (*zend_stream_open_function)(const char *filename, zend_file_handle *handle);
286+
extern ZEND_API zend_result (*zend_stream_open_function)(const char *filename, zend_file_handle *handle);
287287
extern void (*zend_printf_to_smart_string)(smart_string *buf, const char *format, va_list ap);
288288
extern void (*zend_printf_to_smart_str)(smart_str *buf, const char *format, va_list ap);
289289
extern ZEND_API char *(*zend_getenv)(const char *name, size_t name_len);
290290
extern ZEND_API zend_string *(*zend_resolve_path)(const char *filename, size_t filename_len);
291291

292292
/* These two callbacks are especially for opcache */
293-
extern ZEND_API ZEND_RESULT_CODE (*zend_post_startup_cb)(void);
293+
extern ZEND_API zend_result (*zend_post_startup_cb)(void);
294294
extern ZEND_API void (*zend_post_shutdown_cb)(void);
295295

296296
/* Callback for loading of not preloaded part of the script */
297-
extern ZEND_API ZEND_RESULT_CODE (*zend_preload_autoload)(zend_string *filename);
297+
extern ZEND_API zend_result (*zend_preload_autoload)(zend_string *filename);
298298

299299
ZEND_API ZEND_COLD void zend_error(int type, const char *format, ...) ZEND_ATTRIBUTE_FORMAT(printf, 2, 3);
300300
ZEND_API ZEND_COLD ZEND_NORETURN void zend_error_noreturn(int type, const char *format, ...) ZEND_ATTRIBUTE_FORMAT(printf, 2, 3);

0 commit comments

Comments
 (0)