Changeset 716 for trunk/xcache.c
- Timestamp:
- 2011-04-09T09:07:48+02:00 (2 years ago)
- File:
-
- 1 edited
-
trunk/xcache.c (modified) (12 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/xcache.c
r713 r716 1154 1154 xc_entry_data_php_t *php = (xc_entry_data_php_t *) data; 1155 1155 1156 class_name = opline->op1.u.constant.value.str.val;1157 class_len = opline->op1.u.constant.value.str.len;1156 class_name = Z_OP_CONSTANT(opline->op1).value.str.val; 1157 class_len = Z_OP_CONSTANT(opline->op1).value.str.len; 1158 1158 if (zend_hash_find(CG(class_table), class_name, class_len, (void **) &cest) == FAILURE) { 1159 1159 assert(0); … … 1196 1196 1197 1197 #define XCACHE_CHECK_OP(type, op) \ 1198 if (zend_binary_strcmp(Z_STRVAL( opline->op.u.constant), Z_STRLEN(opline->op.u.constant), xce->type##path, xce->type##path_len) == 0) { \1198 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) { \ 1199 1199 usage->type##path_used = 1; \ 1200 1200 oplineinfo |= xcache_##op##_is_##type; \ … … 1202 1202 1203 1203 #define XCACHE_U_CHECK_OP(type, op) \ 1204 if (zend_u_##binary_strcmp(Z_USTRVAL( opline->op.u.constant), Z_USTRLEN(opline->op.u.constant), xce->u##type##path, xce->u##type##path_len) == 0) { \1204 if (zend_u_##binary_strcmp(Z_USTRVAL(Z_OP_CONSTANT(opline->op)), Z_USTRLEN(Z_OP_CONSTANT(opline->op)), xce->u##type##path, xce->u##type##path_len) == 0) { \ 1205 1205 usage->u##type##path_used = 1; \ 1206 1206 oplineinfo |= xcache_##op##_is_##type; \ … … 1210 1210 zend_op *opline = &op_array->opcodes[oplineno]; 1211 1211 int oplineinfo = 0; 1212 if ( opline->op1.op_type== IS_CONST) {1213 if (Z_TYPE( opline->op1.u.constant) == IS_STRING) {1212 if (Z_OP_TYPE(opline->op1) == IS_CONST) { 1213 if (Z_TYPE(Z_OP_CONSTANT(opline->op1)) == IS_STRING) { 1214 1214 XCACHE_CHECK_OP(file, op1) 1215 1215 else XCACHE_CHECK_OP(dir, op1) … … 1217 1217 1218 1218 #ifdef IS_UNICODE 1219 else if (Z_TYPE( opline->op1.u.constant) == IS_UNICODE) {1219 else if (Z_TYPE(Z_OP_CONSTANT(opline->op1)) == IS_UNICODE) { 1220 1220 XCACHE_U_CHECK_OP(file, op1) 1221 1221 else XCACHE_U_CHECK_OP(dir, op1) … … 1223 1223 #endif 1224 1224 } 1225 if ( opline->op2.op_type== IS_CONST) {1226 if (Z_TYPE( opline->op2.u.constant) == IS_STRING) {1225 if (Z_OP_TYPE(opline->op2) == IS_CONST) { 1226 if (Z_TYPE(Z_OP_CONSTANT(opline->op2)) == IS_STRING) { 1227 1227 XCACHE_CHECK_OP(file, op2) 1228 1228 else XCACHE_CHECK_OP(dir, op2) … … 1230 1230 1231 1231 #ifdef IS_UNICODE 1232 else if (Z_TYPE( opline->op2.u.constant) == IS_UNICODE) {1232 else if (Z_TYPE(Z_OP_CONSTANT(opline->op2)) == IS_UNICODE) { 1233 1233 XCACHE_U_CHECK_OP(file, op2) 1234 1234 else XCACHE_U_CHECK_OP(dir, op2) … … 1259 1259 zend_op *opline = &op_array->opcodes[oplineno]; 1260 1260 if ((oplineinfo & xcache_op1_is_file)) { 1261 assert( opline->op1.op_type== IS_CONST);1261 assert(Z_OP_TYPE(opline->op1) == IS_CONST); 1262 1262 if (copy) { 1263 efree(Z_STRVAL( opline->op1.u.constant));1264 } 1265 if (Z_TYPE( opline->op1.u.constant) == IS_STRING) {1263 efree(Z_STRVAL(Z_OP_CONSTANT(opline->op1))); 1264 } 1265 if (Z_TYPE(Z_OP_CONSTANT(opline->op1)) == IS_STRING) { 1266 1266 assert(xce->filepath); 1267 ZVAL_STRINGL(& opline->op1.u.constant, xce->filepath, xce->filepath_len, copy);1267 ZVAL_STRINGL(&Z_OP_CONSTANT(opline->op1), xce->filepath, xce->filepath_len, copy); 1268 1268 TRACE("fixing op1 to %s", xce->filepath); 1269 1269 } 1270 1270 #ifdef IS_UNICODE 1271 else if (Z_TYPE( opline->op1.u.constant) == IS_UNICODE) {1271 else if (Z_TYPE(Z_OP_CONSTANT(opline->op1)) == IS_UNICODE) { 1272 1272 assert(xce->ufilepath); 1273 ZVAL_UNICODEL(& opline->op1.u.constant, xce->ufilepath, xce->ufilepath_len, copy);1273 ZVAL_UNICODEL(&Z_OP_CONSTANT(opline->op1), xce->ufilepath, xce->ufilepath_len, copy); 1274 1274 } 1275 1275 #endif … … 1279 1279 } 1280 1280 else if ((oplineinfo & xcache_op1_is_dir)) { 1281 assert( opline->op1.op_type== IS_CONST);1281 assert(Z_OP_TYPE(opline->op1) == IS_CONST); 1282 1282 if (copy) { 1283 efree(Z_STRVAL( opline->op1.u.constant));1284 } 1285 if (Z_TYPE( opline->op1.u.constant) == IS_STRING) {1283 efree(Z_STRVAL(Z_OP_CONSTANT(opline->op1))); 1284 } 1285 if (Z_TYPE(Z_OP_CONSTANT(opline->op1)) == IS_STRING) { 1286 1286 assert(xce->dirpath); 1287 1287 TRACE("fixing op1 to %s", xce->dirpath); 1288 ZVAL_STRINGL(& opline->op1.u.constant, xce->dirpath, xce->dirpath_len, copy);1288 ZVAL_STRINGL(&Z_OP_CONSTANT(opline->op1), xce->dirpath, xce->dirpath_len, copy); 1289 1289 } 1290 1290 #ifdef IS_UNICODE 1291 else if (Z_TYPE( opline->op1.u.constant) == IS_UNICODE) {1291 else if (Z_TYPE(Z_OP_CONSTANT(opline->op1)) == IS_UNICODE) { 1292 1292 assert(!xce->udirpath); 1293 ZVAL_UNICODEL(& opline->op1.u.constant, xce->udirpath, xce->udirpath_len, copy);1293 ZVAL_UNICODEL(&Z_OP_CONSTANT(opline->op1), xce->udirpath, xce->udirpath_len, copy); 1294 1294 } 1295 1295 #endif … … 1300 1300 1301 1301 if ((oplineinfo & xcache_op2_is_file)) { 1302 assert( opline->op2.op_type== IS_CONST);1302 assert(Z_OP_TYPE(opline->op2) == IS_CONST); 1303 1303 if (copy) { 1304 efree(Z_STRVAL( opline->op2.u.constant));1305 } 1306 if (Z_TYPE( opline->op2.u.constant) == IS_STRING) {1304 efree(Z_STRVAL(Z_OP_CONSTANT(opline->op2))); 1305 } 1306 if (Z_TYPE(Z_OP_CONSTANT(opline->op2)) == IS_STRING) { 1307 1307 assert(xce->filepath); 1308 1308 TRACE("fixing op2 to %s", xce->filepath); 1309 ZVAL_STRINGL(& opline->op2.u.constant, xce->filepath, xce->filepath_len, copy);1309 ZVAL_STRINGL(&Z_OP_CONSTANT(opline->op2), xce->filepath, xce->filepath_len, copy); 1310 1310 } 1311 1311 #ifdef IS_UNICODE 1312 else if (Z_TYPE( opline->op2.u.constant) == IS_UNICODE) {1312 else if (Z_TYPE(Z_OP_CONSTANT(opline->op2)) == IS_UNICODE) { 1313 1313 assert(xce->ufilepath); 1314 ZVAL_UNICODEL(& opline->op2.u.constant, xce->ufilepath, xce->ufilepath_len, copy);1314 ZVAL_UNICODEL(&Z_OP_CONSTANT(opline->op2), xce->ufilepath, xce->ufilepath_len, copy); 1315 1315 } 1316 1316 #endif … … 1320 1320 } 1321 1321 else if ((oplineinfo & xcache_op2_is_dir)) { 1322 assert( opline->op2.op_type== IS_CONST);1322 assert(Z_OP_TYPE(opline->op2) == IS_CONST); 1323 1323 if (copy) { 1324 efree(Z_STRVAL( opline->op2.u.constant));1325 } 1326 if (Z_TYPE( opline->op2.u.constant) == IS_STRING) {1324 efree(Z_STRVAL(Z_OP_CONSTANT(opline->op2))); 1325 } 1326 if (Z_TYPE(Z_OP_CONSTANT(opline->op2)) == IS_STRING) { 1327 1327 assert(!xce->dirpath); 1328 1328 TRACE("fixing op2 to %s", xce->dirpath); 1329 ZVAL_STRINGL(& opline->op2.u.constant, xce->dirpath, xce->dirpath_len, copy);1329 ZVAL_STRINGL(&Z_OP_CONSTANT(opline->op2), xce->dirpath, xce->dirpath_len, copy); 1330 1330 } 1331 1331 #ifdef IS_UNICODE 1332 else if (Z_TYPE( opline->op2.u.constant) == IS_UNICODE) {1332 else if (Z_TYPE(Z_OP_CONSTANT(opline->op2)) == IS_UNICODE) { 1333 1333 assert(!xce->udirpath); 1334 ZVAL_UNICODEL(& opline->op2.u.constant, xce->udirpath, xce->udirpath_len, copy);1334 ZVAL_UNICODEL(&Z_OP_CONSTANT(opline->op2), xce->udirpath, xce->udirpath_len, copy); 1335 1335 } 1336 1336 #endif … … 3055 3055 } 3056 3056 /* }}} */ 3057 static function_entry xcache_functions[] = /* {{{ */3057 static zend_function_entry xcache_functions[] = /* {{{ */ 3058 3058 { 3059 3059 PHP_FE(xcache_count, NULL)
Note: See TracChangeset
for help on using the changeset viewer.

