diff options
| author | jvoisin | 2019-10-24 20:51:56 +0200 |
|---|---|---|
| committer | jvoisin | 2019-10-24 21:15:29 +0200 |
| commit | 93cc22bfb57fc881889165ead1adc94dda30dfc4 (patch) | |
| tree | 224245d94fc250be1652ecf95d46dbee1ba5493d /src/sp_sloppy.c | |
| parent | cb0f3890af39babaed06ca89a0a754e78babe341 (diff) | |
Improve a bit the compatibility with php8
- Apparently, TSRMLS_C and TSRMLS_FETCH aren't
defined anymore, so we have to manually define
them to nothing
- PHP8 constified a bit some strings, which
is great, so we should do the same to avoid
warnings
Diffstat (limited to 'src/sp_sloppy.c')
| -rw-r--r-- | src/sp_sloppy.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/sp_sloppy.c b/src/sp_sloppy.c index 5837783..88052bb 100644 --- a/src/sp_sloppy.c +++ b/src/sp_sloppy.c | |||
| @@ -2,8 +2,13 @@ | |||
| 2 | 2 | ||
| 3 | ZEND_API zend_op_array* (*orig_zend_compile_file)(zend_file_handle* file_handle, | 3 | ZEND_API zend_op_array* (*orig_zend_compile_file)(zend_file_handle* file_handle, |
| 4 | int type) = NULL; | 4 | int type) = NULL; |
| 5 | #if PHP_VERSION_ID >= 80000 | ||
| 6 | ZEND_API zend_op_array* (*orig_zend_compile_string)(zval* source_string, | ||
| 7 | const char* filename) = NULL; | ||
| 8 | #else | ||
| 5 | ZEND_API zend_op_array* (*orig_zend_compile_string)(zval* source_string, | 9 | ZEND_API zend_op_array* (*orig_zend_compile_string)(zval* source_string, |
| 6 | char* filename) = NULL; | 10 | char* filename) = NULL; |
| 11 | #endif | ||
| 7 | 12 | ||
| 8 | static void modify_opcode(zend_op_array* opline) { | 13 | static void modify_opcode(zend_op_array* opline) { |
| 9 | if (NULL != opline) { | 14 | if (NULL != opline) { |
