Changeset 3047dcc in git
- Timestamp:
- 2007-05-31T04:20:14Z (13 years ago)
- Branches:
- 1.2, 1.3
- Children:
- f624d6f
- Parents:
- 390ac1f
- Files:
-
- 6 edited
Legend:
- Unmodified
- Added
- Removed
-
ChangeLog
r4257408 r3047dcc 5 5 == ChangeLog == 6 6 * #86: remove/edit variable in admin page 7 * fixed #92: Zend Optimizer compatibility issue 7 8 * fixed #77: hits/misses was not updated 8 9 * fixed #59: pass by reference for internal function was broken -
NEWS
r4257408 r3047dcc 1 1 1.2.1 2007-?-? 2 ======== 3 * full Zend Optimizer compatibility 2 4 * ini settings changed 3 * bug fixes5 * other bug fixes 4 6 5 ========6 7 1.2.0 2006-12-10 7 NEWS8 8 ======== 9 9 * full 5.2 support -
utils.c
r197d776 r3047dcc 630 630 } 631 631 /* }}} */ 632 static void xc_sandbox_install(xc_sandbox_t *sandbox TSRMLS_DC) /* {{{ */632 static void xc_sandbox_install(xc_sandbox_t *sandbox, xc_install_action_t install TSRMLS_DC) /* {{{ */ 633 633 { 634 634 int i; … … 674 674 #endif 675 675 676 xc_undo_pass_two(CG(active_op_array) TSRMLS_CC); 677 xc_foreach_early_binding_class(CG(active_op_array), xc_early_binding_cb, (void *) sandbox TSRMLS_CC); 678 xc_redo_pass_two(CG(active_op_array) TSRMLS_CC); 676 if (install != XC_InstallNoBinding) { 677 xc_undo_pass_two(CG(active_op_array) TSRMLS_CC); 678 xc_foreach_early_binding_class(CG(active_op_array), xc_early_binding_cb, (void *) sandbox TSRMLS_CC); 679 xc_redo_pass_two(CG(active_op_array) TSRMLS_CC); 680 } 679 681 680 682 i = 1; … … 682 684 } 683 685 /* }}} */ 684 void xc_sandbox_free(xc_sandbox_t *sandbox, int install TSRMLS_DC) /* {{{ */686 void xc_sandbox_free(xc_sandbox_t *sandbox, xc_install_action_t install TSRMLS_DC) /* {{{ */ 685 687 { 686 688 /* restore first first install function/class */ … … 695 697 #endif 696 698 697 if (install ) {699 if (install != XC_NoInstall) { 698 700 CG(in_compilation) = 1; 699 701 CG(compiled_filename) = sandbox->filename; 700 702 CG(zend_lineno) = 0; 701 xc_sandbox_install(sandbox TSRMLS_CC);703 xc_sandbox_install(sandbox, install TSRMLS_CC); 702 704 CG(in_compilation) = 0; 703 705 CG(compiled_filename) = NULL; -
utils.h
r197d776 r3047dcc 57 57 } xc_sandbox_t; 58 58 59 typedef enum _xc_install_action_t { 60 XC_NoInstall, 61 XC_Install, 62 XC_InstallNoBinding 63 } xc_install_action_t; 64 59 65 void xc_zend_class_add_ref(zend_class_entry ZESW(*ce, **ce)); 60 66 xc_sandbox_t *xc_sandbox_init(xc_sandbox_t *sandbox, char *filename TSRMLS_DC); 61 void xc_sandbox_free(xc_sandbox_t *sandbox, int install TSRMLS_DC);67 void xc_sandbox_free(xc_sandbox_t *sandbox, xc_install_action_t install TSRMLS_DC); -
xcache.c
r390ac1f r3047dcc 98 98 99 99 static zend_bool xc_initized = 0; 100 static zend_compile_file_t *origin_compile_file = NULL; 100 101 static zend_compile_file_t *old_compile_file = NULL; 101 102 static zend_llist_element *xc_llist_zend_extension = NULL; … … 838 839 } 839 840 /* }}} */ 841 static zend_op_array *xc_check_initial_compile_file(zend_file_handle *h, int type TSRMLS_DC) /* {{{ */ 842 { 843 XG(initial_compile_file_called) = 1; 844 return origin_compile_file(h, type TSRMLS_CC); 845 } 846 /* }}} */ 840 847 static zend_op_array *xc_compile_file(zend_file_handle *h, int type TSRMLS_DC) /* {{{ */ 841 848 { … … 941 948 old_constinfo_cnt = zend_hash_num_elements(EG(zend_constants)); 942 949 950 XG(initial_compile_file_called) = 0; 943 951 zend_try { 944 952 op_array = old_compile_file(h, type TSRMLS_CC); … … 954 962 goto err_oparray; 955 963 } 964 965 if (!XG(initial_compile_file_called)) { 966 xc_sandbox_free(&sandbox, XC_InstallNoBinding TSRMLS_CC); 967 return op_array; 968 } 956 969 957 970 filename = h->opened_path ? h->opened_path : h->filename; … … 1125 1138 if (xc_test && stored_xce) { 1126 1139 /* free it, no install. restore now */ 1127 xc_sandbox_free(&sandbox, 0TSRMLS_CC);1140 xc_sandbox_free(&sandbox, XC_NoInstall TSRMLS_CC); 1128 1141 } 1129 1142 else if (!op_array) { 1130 1143 /* failed to compile free it, no install */ 1131 xc_sandbox_free(&sandbox, 0TSRMLS_CC);1144 xc_sandbox_free(&sandbox, XC_NoInstall TSRMLS_CC); 1132 1145 } 1133 1146 else { 1134 1147 CG(active_op_array) = op_array; 1135 xc_sandbox_free(&sandbox, 1TSRMLS_CC);1148 xc_sandbox_free(&sandbox, XC_Install TSRMLS_CC); 1136 1149 } 1137 1150 … … 1378 1391 zend_compile_file = old_compile_file; 1379 1392 old_compile_file = NULL; 1393 } 1394 1395 if (origin_compile_file) { 1396 zend_compile_file = origin_compile_file; 1397 origin_compile_file = NULL; 1380 1398 } 1381 1399 … … 2746 2764 #endif 2747 2765 /* }}} */ 2748 static startup_func_t xc_last_ext_startup = NULL;2766 static startup_func_t xc_last_ext_startup; 2749 2767 static int xc_zend_startup_last(zend_extension *extension) /* {{{ */ 2750 2768 { … … 2767 2785 { 2768 2786 xc_zend_extension_gotup = 1; 2787 2788 if (!origin_compile_file) { 2789 origin_compile_file = zend_compile_file; 2790 zend_compile_file = xc_check_initial_compile_file; 2791 } 2792 2769 2793 if (zend_llist_count(&zend_extensions) > 1) { 2770 2794 zend_llist_position lpos; -
xcache_globals.h
r197d776 r3047dcc 1 1 2 2 ZEND_BEGIN_MODULE_GLOBALS(xcache) 3 zend_bool initial_compile_file_called; /* true is origin_compile_file is called */ 3 4 zend_bool cacher; /* true if enabled */ 4 5 zend_bool stat;
Note: See TracChangeset
for help on using the changeset viewer.