From 95ee1fa689c335233df3345ce1fd0780b79ed2bc Mon Sep 17 00:00:00 2001 From: jvoisin Date: Mon, 30 Nov 2020 10:15:57 +0100 Subject: Fix the type of zend_compile_string (#357) This was changed in https://github.com/php/php-src/commit/f5dbebd82e642b1d1af462b486fc392ecff2c67a--- src/sp_sloppy.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'src') 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, int type) = NULL; #if PHP_VERSION_ID >= 80000 ZEND_API zend_op_array* (*orig_zend_compile_string)( - zval* source_string, const char* filename) = NULL; + zend_string* source_string, const char* filename) = NULL; #else ZEND_API zend_op_array* (*orig_zend_compile_string)(zval* source_string, char* filename) = NULL; @@ -25,7 +25,11 @@ static void modify_opcode(zend_op_array* opline) { } } +#if PHP_VERSION_ID >= 80000 +ZEND_API zend_op_array* sp_compile_string(zend_string* source_string, char* filename) { +#else ZEND_API zend_op_array* sp_compile_string(zval* source_string, char* filename) { +#endif zend_op_array* opline = orig_zend_compile_string(source_string, filename); modify_opcode(opline); return opline; -- cgit v1.3