Changeset 408 for branches/1.2/xcache.c
- Timestamp:
- 2007-05-31T06:20:14+02:00 (6 years ago)
- Location:
- branches/1.2
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/1.2
-
branches/1.2/xcache.c
r406 r408 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;
Note: See TracChangeset
for help on using the changeset viewer.

