Permalink
Browse files

MFH: Added hook for compile_string()

  • Loading branch information...
1 parent 3ff5fb0 commit 7bbf35320d4db531a3ca1ea676773dfde287dc74 Stefan Esser committed Jun 13, 2006
Showing with 9 additions and 6 deletions.
  1. +1 −0 Zend/zend.c
  2. +1 −0 Zend/zend_compile.c
  3. +1 −0 Zend/zend_compile.h
  4. +1 −1 Zend/zend_execute_API.c
  5. +1 −1 Zend/zend_vm_def.h
  6. +4 −4 Zend/zend_vm_execute.h
View
1 Zend/zend.c
@@ -605,6 +605,7 @@ int zend_startup(zend_utility_functions *utility_functions, char **extensions, i
zend_getenv = utility_functions->getenv_function;
zend_compile_file = compile_file;
+ zend_compile_string = compile_string;
zend_execute = execute;
zend_execute_internal = NULL;
zend_throw_exception_hook = NULL;
View
1 Zend/zend_compile.c
@@ -32,6 +32,7 @@
#endif /* ZEND_MULTIBYTE */
ZEND_API zend_op_array *(*zend_compile_file)(zend_file_handle *file_handle, int type TSRMLS_DC);
+ZEND_API zend_op_array *(*zend_compile_string)(zval *source_string, char *filename TSRMLS_DC);
#ifndef ZTS
View
1 Zend/zend_compile.h
@@ -321,6 +321,7 @@ void shutdown_compiler(TSRMLS_D);
void zend_init_compiler_data_structures(TSRMLS_D);
extern ZEND_API zend_op_array *(*zend_compile_file)(zend_file_handle *file_handle, int type TSRMLS_DC);
+extern ZEND_API zend_op_array *(*zend_compile_string)(zval *source_string, char *filename TSRMLS_DC);
ZEND_API int lex_scan(zval *zendlval TSRMLS_DC);
void startup_scanner(TSRMLS_D);
View
2 Zend/zend_execute_API.c
@@ -1101,7 +1101,7 @@ ZEND_API int zend_eval_string(char *str, zval *retval_ptr, char *string_name TSR
original_handle_op_arrays = CG(handle_op_arrays);
CG(handle_op_arrays) = 0;
- new_op_array = compile_string(&pv, string_name TSRMLS_CC);
+ new_op_array = zend_compile_string(&pv, string_name TSRMLS_CC);
CG(handle_op_arrays) = original_handle_op_arrays;
if (new_op_array) {
View
2 Zend/zend_vm_def.h
@@ -2766,7 +2766,7 @@ ZEND_VM_HANDLER(73, ZEND_INCLUDE_OR_EVAL, CONST|TMP|VAR|CV, ANY)
case ZEND_EVAL: {
char *eval_desc = zend_make_compiled_string_description("eval()'d code" TSRMLS_CC);
- new_op_array = compile_string(inc_filename, eval_desc TSRMLS_CC);
+ new_op_array = zend_compile_string(inc_filename, eval_desc TSRMLS_CC);
efree(eval_desc);
}
break;
View
8 Zend/zend_vm_execute.h
@@ -1960,7 +1960,7 @@ static int ZEND_INCLUDE_OR_EVAL_SPEC_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
case ZEND_EVAL: {
char *eval_desc = zend_make_compiled_string_description("eval()'d code" TSRMLS_CC);
- new_op_array = compile_string(inc_filename, eval_desc TSRMLS_CC);
+ new_op_array = zend_compile_string(inc_filename, eval_desc TSRMLS_CC);
efree(eval_desc);
}
break;
@@ -4460,7 +4460,7 @@ static int ZEND_INCLUDE_OR_EVAL_SPEC_TMP_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
case ZEND_EVAL: {
char *eval_desc = zend_make_compiled_string_description("eval()'d code" TSRMLS_CC);
- new_op_array = compile_string(inc_filename, eval_desc TSRMLS_CC);
+ new_op_array = zend_compile_string(inc_filename, eval_desc TSRMLS_CC);
efree(eval_desc);
}
break;
@@ -7542,7 +7542,7 @@ static int ZEND_INCLUDE_OR_EVAL_SPEC_VAR_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
case ZEND_EVAL: {
char *eval_desc = zend_make_compiled_string_description("eval()'d code" TSRMLS_CC);
- new_op_array = compile_string(inc_filename, eval_desc TSRMLS_CC);
+ new_op_array = zend_compile_string(inc_filename, eval_desc TSRMLS_CC);
efree(eval_desc);
}
break;
@@ -19764,7 +19764,7 @@ static int ZEND_INCLUDE_OR_EVAL_SPEC_CV_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
case ZEND_EVAL: {
char *eval_desc = zend_make_compiled_string_description("eval()'d code" TSRMLS_CC);
- new_op_array = compile_string(inc_filename, eval_desc TSRMLS_CC);
+ new_op_array = zend_compile_string(inc_filename, eval_desc TSRMLS_CC);
efree(eval_desc);
}
break;

0 comments on commit 7bbf353

Please sign in to comment.