summaryrefslogtreecommitdiff
path: root/src/sp_sloppy.c
diff options
context:
space:
mode:
authorjvoisin2020-11-30 10:15:57 +0100
committerGitHub2020-11-30 10:15:57 +0100
commit95ee1fa689c335233df3345ce1fd0780b79ed2bc (patch)
tree1115292efb986d886827d073ac5dc0a6beb6a073 /src/sp_sloppy.c
parente0d613408a2f770bc467815bdd7273986b3da70b (diff)
Fix the type of zend_compile_string (#357)
This was changed in https://github.com/php/php-src/commit/f5dbebd82e642b1d1af462b486fc392ecff2c67a
Diffstat (limited to 'src/sp_sloppy.c')
-rw-r--r--src/sp_sloppy.c6
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
6ZEND_API zend_op_array* (*orig_zend_compile_string)( 6ZEND_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
9ZEND_API zend_op_array* (*orig_zend_compile_string)(zval* source_string, 9ZEND_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
29ZEND_API zend_op_array* sp_compile_string(zend_string* source_string, char* filename) {
30#else
28ZEND_API zend_op_array* sp_compile_string(zval* source_string, char* filename) { 31ZEND_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;