Permalink
Browse files

MFZE1

  • Loading branch information...
1 parent 392e1ed commit 819ea51d00142ce3a1ebf73fe2761fdec6c1a7e6 @zsuraski zsuraski committed Aug 31, 2001
Showing with 7 additions and 3 deletions.
  1. +6 −2 Zend/zend.c
  2. +1 −1 Zend/zend_compile.h
View
@@ -788,7 +788,7 @@ ZEND_API void zend_output_debug_string(zend_bool trigger_break, char *format, ..
}
-ZEND_API int zend_execute_scripts(int type TSRMLS_DC, int file_count, ...)
+ZEND_API int zend_execute_scripts(int type TSRMLS_DC, zval **retval, int file_count, ...)
{
va_list files;
int i;
@@ -806,7 +806,11 @@ ZEND_API int zend_execute_scripts(int type TSRMLS_DC, int file_count, ...)
if (EG(active_op_array)) {
zend_execute(EG(active_op_array) TSRMLS_CC);
zval_ptr_dtor(EG(return_value_ptr_ptr));
- EG(return_value_ptr_ptr) = &EG(global_return_value_ptr);
+ if (retval) {
+ EG(return_value_ptr_ptr) = retval;
+ } else {
+ EG(return_value_ptr_ptr) = &EG(global_return_value_ptr);
+ }
EG(global_return_value_ptr) = NULL;
destroy_op_array(EG(active_op_array));
efree(EG(active_op_array));
View
@@ -374,7 +374,7 @@ ZEND_API void function_add_ref(zend_function *function);
ZEND_API zend_op_array *compile_file(zend_file_handle *file_handle, int type TSRMLS_DC);
ZEND_API zend_op_array *compile_string(zval *source_string, char *filename TSRMLS_DC);
ZEND_API zend_op_array *compile_filename(int type, zval *filename TSRMLS_DC);
-ZEND_API int zend_execute_scripts(int type TSRMLS_DC, int file_count, ...);
+ZEND_API int zend_execute_scripts(int type TSRMLS_DC, zval **retval, int file_count, ...);
ZEND_API int open_file_for_scanning(zend_file_handle *file_handle TSRMLS_DC);
ZEND_API void init_op_array(zend_op_array *op_array, int type, int initial_ops_size TSRMLS_DC);
ZEND_API void destroy_op_array(zend_op_array *op_array);

0 comments on commit 819ea51

Please sign in to comment.