diff options
Diffstat (limited to 'src/sp_execute.c')
| -rw-r--r-- | src/sp_execute.c | 18 |
1 files changed, 15 insertions, 3 deletions
diff --git a/src/sp_execute.c b/src/sp_execute.c index 5c0c939..84f6275 100644 --- a/src/sp_execute.c +++ b/src/sp_execute.c | |||
| @@ -336,7 +336,11 @@ static zend_result sp_stream_open(zend_file_handle *handle) { | |||
| 336 | 336 | ||
| 337 | ZEND_API zend_op_array* (*orig_zend_compile_file)(zend_file_handle* file_handle, | 337 | ZEND_API zend_op_array* (*orig_zend_compile_file)(zend_file_handle* file_handle, |
| 338 | int type) = NULL; | 338 | int type) = NULL; |
| 339 | #if PHP_VERSION_ID >= 80000 | 339 | #if PHP_VERSION_ID >= 82000 |
| 340 | ZEND_API zend_op_array* (*orig_zend_compile_string)( | ||
| 341 | zend_string* source_string, const char* filename, | ||
| 342 | enum _zend_compile_position position) = NULL; | ||
| 343 | #elif PHP_VERSION_ID >= 80000 | ||
| 340 | ZEND_API zend_op_array* (*orig_zend_compile_string)( | 344 | ZEND_API zend_op_array* (*orig_zend_compile_string)( |
| 341 | zend_string* source_string, const char* filename) = NULL; | 345 | zend_string* source_string, const char* filename) = NULL; |
| 342 | #else | 346 | #else |
| @@ -344,7 +348,11 @@ ZEND_API zend_op_array* (*orig_zend_compile_string)(zval* source_string, | |||
| 344 | char* filename) = NULL; | 348 | char* filename) = NULL; |
| 345 | #endif | 349 | #endif |
| 346 | 350 | ||
| 347 | #if PHP_VERSION_ID >= 80000 | 351 | #if PHP_VERSION_ID >= 82000 |
| 352 | ZEND_API zend_op_array* sp_compile_string(zend_string* source_string, | ||
| 353 | const char* filename, | ||
| 354 | enum _zend_compile_position position) { | ||
| 355 | #elif PHP_VERSION_ID >= 80000 | ||
| 348 | ZEND_API zend_op_array* sp_compile_string(zend_string* source_string, | 356 | ZEND_API zend_op_array* sp_compile_string(zend_string* source_string, |
| 349 | const char* filename) { | 357 | const char* filename) { |
| 350 | #else | 358 | #else |
| @@ -352,7 +360,11 @@ ZEND_API zend_op_array* sp_compile_string(zval* source_string, char* filename) { | |||
| 352 | #endif | 360 | #endif |
| 353 | // TODO(jvoisin) handle recursive calls to `eval` | 361 | // TODO(jvoisin) handle recursive calls to `eval` |
| 354 | SPG(eval_source_string) = source_string; | 362 | SPG(eval_source_string) = source_string; |
| 355 | zend_op_array* opline = orig_zend_compile_string(source_string, filename); | 363 | zend_op_array* opline = orig_zend_compile_string(source_string, filename |
| 364 | #if PHP_VERSION_ID >= 82000 | ||
| 365 | , position | ||
| 366 | #endif | ||
| 367 | ); | ||
| 356 | if (SPCFG(sloppy).enable) { | 368 | if (SPCFG(sloppy).enable) { |
| 357 | sp_sloppy_modify_opcode(opline); | 369 | sp_sloppy_modify_opcode(opline); |
| 358 | } | 370 | } |
