diff options
Diffstat (limited to 'ext')
| -rw-r--r-- | ext/opcache/ZendAccelerator.c | 4 | ||||
| -rw-r--r-- | ext/opcache/ZendAccelerator.h | 1 | ||||
| -rw-r--r-- | ext/opcache/zend_accelerator_module.c | 7 | ||||
| -rw-r--r-- | ext/opcache/zend_accelerator_module.h | 5 |
4 files changed, 17 insertions, 0 deletions
diff --git a/ext/opcache/ZendAccelerator.c b/ext/opcache/ZendAccelerator.c index 9398b58ac6..69a5d386d2 100644 --- a/ext/opcache/ZendAccelerator.c +++ b/ext/opcache/ZendAccelerator.c @@ -2528,7 +2528,11 @@ static int accel_startup(zend_extension *extension) _setmaxstdio(2048); /* The default configuration is limited to 512 stdio files */ #endif +#if ZEND_EXTENSION_API_NO > PHP_5_6_X_API_NO + if (start_accel_module(TSRMLS_C) == FAILURE) { +#else if (start_accel_module() == FAILURE) { +#endif accel_startup_ok = 0; zend_error(E_WARNING, ACCELERATOR_PRODUCT_NAME ": module registration failed!"); return FAILURE; diff --git a/ext/opcache/ZendAccelerator.h b/ext/opcache/ZendAccelerator.h index 487010ba27..7ffd0126b3 100644 --- a/ext/opcache/ZendAccelerator.h +++ b/ext/opcache/ZendAccelerator.h @@ -92,6 +92,7 @@ #define PHP_5_3_X_API_NO 220090626 #define PHP_5_4_X_API_NO 220100525 #define PHP_5_5_X_API_NO 220121212 +#define PHP_5_6_X_API_NO 220131106 /*** file locking ***/ #ifndef ZEND_WIN32 diff --git a/ext/opcache/zend_accelerator_module.c b/ext/opcache/zend_accelerator_module.c index cd840fd7dd..1034e3e05d 100644 --- a/ext/opcache/zend_accelerator_module.c +++ b/ext/opcache/zend_accelerator_module.c @@ -468,10 +468,17 @@ static zend_module_entry accel_module_entry = { STANDARD_MODULE_PROPERTIES }; +#if ZEND_EXTENSION_API_NO > PHP_5_6_X_API_NO +int start_accel_module(TSRMLS_D) +{ + return zend_startup_module(&accel_module_entry TSRMLS_CC); +} +#else int start_accel_module(void) { return zend_startup_module(&accel_module_entry); } +#endif /* {{{ proto array accelerator_get_scripts() Get the scripts which are accelerated by ZendAccelerator */ diff --git a/ext/opcache/zend_accelerator_module.h b/ext/opcache/zend_accelerator_module.h index 539b4e85af..74728f3f72 100644 --- a/ext/opcache/zend_accelerator_module.h +++ b/ext/opcache/zend_accelerator_module.h @@ -22,7 +22,12 @@ #ifndef ZEND_ACCELERATOR_MODULE_H #define ZEND_ACCELERATOR_MODULE_H +#if ZEND_EXTENSION_API_NO > PHP_5_6_X_API_NO +int start_accel_module(TSRMLS_D); +#else int start_accel_module(void); +#endif + void zend_accel_override_file_functions(TSRMLS_D); #endif /* _ZEND_ACCELERATOR_MODULE_H */ |
