Changeset 190 for trunk/xcache.c
- Timestamp:
- 2006-09-20T02:25:56+02:00 (7 years ago)
- File:
-
- 1 edited
-
trunk/xcache.c (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/xcache.c
r189 r190 2294 2294 } 2295 2295 2296 ext = zend_get_extension("Zend Optimizer"); 2297 if (ext) { 2298 /* zend_optimizer.optimization_level>0 is not compatible with other cacher, disabling */ 2299 ext->op_array_handler = NULL; 2300 } 2296 2301 /* cache if there's an op_array_ctor */ 2297 2302 for (ext = zend_llist_get_first_ex(&zend_extensions, &lpos); … … 2455 2460 #endif 2456 2461 /* }}} */ 2462 static startup_func_t xc_last_ext_startup; 2463 static zend_llist_element *xc_llist_element; 2464 static xc_ptr_compare_func(void *p1, void *p2) /* {{{ */ 2465 { 2466 return p1 == p2; 2467 } 2468 /* }}} */ 2469 static int xc_zend_startup_last(zend_extension *extension) /* {{{ */ 2470 { 2471 /* restore */ 2472 extension->startup = xc_last_ext_startup; 2473 if (extension->startup) { 2474 if (extension->startup(extension) != SUCCESS) { 2475 return FAILURE; 2476 } 2477 } 2478 xc_zend_extension_register(&zend_extension_entry, 0); 2479 if (!xc_module_gotup) { 2480 return zend_startup_module(&xcache_module_entry); 2481 } 2482 return SUCCESS; 2483 } 2484 /* }}} */ 2457 2485 ZEND_DLEXPORT int xcache_zend_startup(zend_extension *extension) /* {{{ */ 2458 2486 { … … 2461 2489 } 2462 2490 xc_zend_extension_gotup = 1; 2463 if (!xc_module_gotup) { 2491 xc_llist_element = NULL; 2492 if (zend_llist_count(&zend_extensions) > 1) { 2493 zend_llist_position lpos; 2494 zend_extension *ext; 2495 llist_dtor_func_t dtor; 2496 2497 ext = zend_get_extension(XCACHE_NAME); 2498 assert(ext); 2499 dtor = zend_extensions.dtor; /* avoid dtor */ 2500 zend_extensions.dtor = NULL; 2501 zend_llist_del_element(&zend_extensions, ext, xc_ptr_compare_func); 2502 zend_extensions.dtor = dtor; 2503 2504 ext = (zend_extension *) zend_llist_get_last_ex(&zend_extensions, &lpos); 2505 assert(ext); 2506 xc_last_ext_startup = ext->startup; 2507 ext->startup = xc_zend_startup_last; 2508 } 2509 else if (!xc_module_gotup) { 2464 2510 return zend_startup_module(&xcache_module_entry); 2465 2511 }
Note: See TracChangeset
for help on using the changeset viewer.

