Changeset 721 for trunk/xcache.c
- Timestamp:
- 04/09/2011 01:05:07 PM (2 years ago)
- Files:
-
- 1 modified
-
trunk/xcache.c (modified) (5 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/xcache.c
r716 r721 1177 1177 1178 1178 /* {{{ Constant Usage */ 1179 #define xcache_op1_is_file 1 1180 #define xcache_op1_is_dir 2 1181 #define xcache_op2_is_file 4 1182 #define xcache_op2_is_dir 8 1179 #ifdef ZEND_ENGINE_2_4 1180 #else 1181 # define xcache_op1_is_file 1 1182 # define xcache_op1_is_dir 2 1183 # define xcache_op2_is_file 4 1184 # define xcache_op2_is_dir 8 1185 #endif 1183 1186 typedef struct { 1184 1187 zend_bool filepath_used; … … 1190 1193 static void xc_collect_op_array_info(xc_entry_t *xce, xc_entry_data_php_t *php, xc_const_usage_t *usage, xc_op_array_info_t *op_array_info, zend_op_array *op_array TSRMLS_DC) /* {{{ */ 1191 1194 { 1195 #ifdef ZEND_ENGINE_2_4 1192 1196 int oplineno; 1197 #else 1198 int oplineno; 1199 #endif 1193 1200 xc_vector_t vector_int; 1194 1201 1195 1202 xc_vector_init(int, &vector_int); 1196 1203 1204 #ifdef ZEND_ENGINE_2_4 1205 #else 1197 1206 #define XCACHE_CHECK_OP(type, op) \ 1198 1207 if (zend_binary_strcmp(Z_STRVAL(Z_OP_CONSTANT(opline->op)), Z_STRLEN(Z_OP_CONSTANT(opline->op)), xce->type##path, xce->type##path_len) == 0) { \ … … 1244 1253 op_array_info->oplineinfo_cnt = vector_int.cnt; 1245 1254 op_array_info->oplineinfos = xc_vector_detach(int, &vector_int); 1255 #endif 1246 1256 xc_vector_free(int, &vector_int); 1247 1257 } … … 1249 1259 void xc_fix_op_array_info(const xc_entry_t *xce, const xc_entry_data_php_t *php, zend_op_array *op_array, int copy, const xc_op_array_info_t *op_array_info TSRMLS_DC) /* {{{ */ 1250 1260 { 1261 #ifdef ZEND_ENGINE_2_4 1262 #else 1251 1263 int i; 1252 if (!op_array_info->oplineinfo_cnt) { 1253 return; 1254 } 1255 1264 #endif 1265 1266 #ifdef ZEND_ENGINE_2_4 1267 #else 1256 1268 for (i = 0; i < op_array_info->oplineinfo_cnt; i += 2) { 1257 1269 int oplineno = op_array_info->oplineinfos[i]; … … 1340 1352 } 1341 1353 } 1354 #endif 1342 1355 } 1343 1356 /* }}} */ 1344 1357 static void xc_free_op_array_info(xc_op_array_info_t *op_array_info TSRMLS_DC) /* {{{ */ 1345 1358 { 1359 #ifdef ZEND_ENGINE_2_4 1360 if (op_array_info->literalinfos) { 1361 efree(op_array_info->literalinfos); 1362 } 1363 #else 1346 1364 if (op_array_info->oplineinfos) { 1347 1365 efree(op_array_info->oplineinfos); 1348 1366 } 1367 #endif 1349 1368 } 1350 1369 /* }}} */

