diff options
| author | jvoisin | 2020-11-30 10:15:57 +0100 |
|---|---|---|
| committer | GitHub | 2020-11-30 10:15:57 +0100 |
| commit | 95ee1fa689c335233df3345ce1fd0780b79ed2bc (patch) | |
| tree | 1115292efb986d886827d073ac5dc0a6beb6a073 | |
| parent | e0d613408a2f770bc467815bdd7273986b3da70b (diff) | |
Fix the type of zend_compile_string (#357)
This was changed in https://github.com/php/php-src/commit/f5dbebd82e642b1d1af462b486fc392ecff2c67a
| -rw-r--r-- | src/sp_sloppy.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/src/sp_sloppy.c b/src/sp_sloppy.c index b4212ca..a2d6b43 100644 --- a/src/sp_sloppy.c +++ b/src/sp_sloppy.c | |||
| @@ -4,7 +4,7 @@ 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 | 5 | #if PHP_VERSION_ID >= 80000 |
| 6 | ZEND_API zend_op_array* (*orig_zend_compile_string)( | 6 | ZEND_API zend_op_array* (*orig_zend_compile_string)( |
| 7 | zval* source_string, const char* filename) = NULL; | 7 | zend_string* source_string, const char* filename) = NULL; |
| 8 | #else | 8 | #else |
| 9 | 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, |
| 10 | char* filename) = NULL; | 10 | char* filename) = NULL; |
| @@ -25,7 +25,11 @@ static void modify_opcode(zend_op_array* opline) { | |||
| 25 | } | 25 | } |
| 26 | } | 26 | } |
| 27 | 27 | ||
| 28 | #if PHP_VERSION_ID >= 80000 | ||
| 29 | ZEND_API zend_op_array* sp_compile_string(zend_string* source_string, char* filename) { | ||
| 30 | #else | ||
| 28 | ZEND_API zend_op_array* sp_compile_string(zval* source_string, char* filename) { | 31 | ZEND_API zend_op_array* sp_compile_string(zval* source_string, char* filename) { |
| 32 | #endif | ||
| 29 | zend_op_array* opline = orig_zend_compile_string(source_string, filename); | 33 | zend_op_array* opline = orig_zend_compile_string(source_string, filename); |
| 30 | modify_opcode(opline); | 34 | modify_opcode(opline); |
| 31 | return opline; | 35 | return opline; |
