Skip to content

Commit 39d64b2

Browse files
committed
Fix OpCache
1 parent 545bc9b commit 39d64b2

File tree

2 files changed

+10
-10
lines changed

2 files changed

+10
-10
lines changed

ext/opcache/ZendAccelerator.c

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -119,15 +119,15 @@ zend_bool fallback_process = 0; /* process uses file cache fallback */
119119
#endif
120120

121121
static zend_op_array *(*accelerator_orig_compile_file)(zend_file_handle *file_handle, int type);
122-
static int (*accelerator_orig_zend_stream_open_function)(const char *filename, zend_file_handle *handle );
122+
static ZEND_RESULT_CODE (*accelerator_orig_zend_stream_open_function)(const char *filename, zend_file_handle *handle );
123123
static zend_string *(*accelerator_orig_zend_resolve_path)(const char *filename, size_t filename_len);
124124
static void (*accelerator_orig_zend_error_cb)(int type, const char *error_filename, const uint32_t error_lineno, zend_string *message);
125125
static zif_handler orig_chdir = NULL;
126126
static ZEND_INI_MH((*orig_include_path_on_modify)) = NULL;
127-
static int (*orig_post_startup_cb)(void);
127+
static ZEND_RESULT_CODE (*orig_post_startup_cb)(void);
128128

129129
static void accel_gen_system_id(void);
130-
static int accel_post_startup(void);
130+
static ZEND_RESULT_CODE accel_post_startup(void);
131131
static int accel_finish_startup(void);
132132

133133
static void preload_shutdown(void);
@@ -304,7 +304,7 @@ static inline int accel_restart_is_active(void)
304304
}
305305

306306
/* Creates a read lock for SHM access */
307-
static inline int accel_activate_add(void)
307+
static inline ZEND_RESULT_CODE accel_activate_add(void)
308308
{
309309
#ifdef ZEND_WIN32
310310
SHM_UNPROTECT();
@@ -2269,7 +2269,7 @@ static int accel_gen_uname_id(void)
22692269
#endif
22702270

22712271
/* zend_stream_open_function() replacement for PHP 5.3 and above */
2272-
static int persistent_stream_open_function(const char *filename, zend_file_handle *handle)
2272+
static ZEND_RESULT_CODE persistent_stream_open_function(const char *filename, zend_file_handle *handle)
22732273
{
22742274
if (ZCG(cache_persistent_script)) {
22752275
/* check if callback is called from include_once or it's a main request */
@@ -2400,7 +2400,7 @@ static void accel_reset_pcre_cache(void)
24002400
} ZEND_HASH_FOREACH_END();
24012401
}
24022402

2403-
int accel_activate(INIT_FUNC_ARGS)
2403+
ZEND_RESULT_CODE accel_activate(INIT_FUNC_ARGS)
24042404
{
24052405
if (!ZCG(enabled) || !accel_startup_ok) {
24062406
ZCG(accelerator_enabled) = 0;
@@ -2963,13 +2963,13 @@ static int accel_startup(zend_extension *extension)
29632963
return SUCCESS;
29642964
}
29652965

2966-
static int accel_post_startup(void)
2966+
static ZEND_RESULT_CODE accel_post_startup(void)
29672967
{
29682968
zend_function *func;
29692969
zend_ini_entry *ini_entry;
29702970

29712971
if (orig_post_startup_cb) {
2972-
int (*cb)(void) = orig_post_startup_cb;
2972+
ZEND_RESULT_CODE (*cb)(void) = orig_post_startup_cb;
29732973

29742974
orig_post_startup_cb = NULL;
29752975
if (cb() != SUCCESS) {
@@ -4368,7 +4368,7 @@ static void preload_load(void)
43684368
}
43694369
}
43704370

4371-
static int preload_autoload(zend_string *filename)
4371+
static ZEND_RESULT_CODE preload_autoload(zend_string *filename)
43724372
{
43734373
zend_persistent_script *persistent_script;
43744374
zend_op_array *op_array;

ext/opcache/ZendAccelerator.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -316,7 +316,7 @@ extern zend_accel_globals accel_globals;
316316
extern char *zps_api_failure_reason;
317317

318318
void accel_shutdown(void);
319-
int accel_activate(INIT_FUNC_ARGS);
319+
ZEND_RESULT_CODE accel_activate(INIT_FUNC_ARGS);
320320
int accel_post_deactivate(void);
321321
void zend_accel_schedule_restart(zend_accel_restart_reason reason);
322322
void zend_accel_schedule_restart_if_necessary(zend_accel_restart_reason reason);

0 commit comments

Comments
 (0)