Changeset 1030 for trunk/xcache.c
- Timestamp:
- 2012-07-22T09:55:34+02:00 (10 months ago)
- File:
-
- 1 edited
-
trunk/xcache.c (modified) (7 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/xcache.c
r1029 r1030 1638 1638 1639 1639 if (!XG(initial_compile_file_called)) { 1640 TRACE("%s", "!initial_compile_file_called, give up"); 1640 1641 return; 1641 1642 } … … 2439 2440 2440 2441 if (xc_php_size) { 2441 old_compile_file = zend_compile_file;2442 zend_compile_file = xc_compile_file;2443 2444 2442 CHECK(xc_php_caches = xc_cache_init(xc_shm, &xc_php_hcache, &xc_php_hentry, &xc_php_hentry, xc_php_size), "failed init opcode cache"); 2445 2443 } … … 3525 3523 #endif 3526 3524 3525 static void xc_zend_startup_last() /* {{{ */ 3526 { 3527 if (xc_php_size) { 3528 old_compile_file = zend_compile_file; 3529 zend_compile_file = xc_compile_file; 3530 } 3531 } 3532 /* }}} */ 3527 3533 static startup_func_t xc_last_ext_startup; 3528 static int xc_zend_startup_last (zend_extension *extension) /* {{{ */3534 static int xc_zend_startup_last_hook(zend_extension *extension) /* {{{ */ 3529 3535 { 3530 3536 zend_extension *ext = zend_get_extension(XCACHE_NAME); … … 3541 3547 assert(xc_llist_zend_extension); 3542 3548 xcache_llist_prepend(&zend_extensions, xc_llist_zend_extension); 3549 3550 xc_zend_startup_last(); 3543 3551 return SUCCESS; 3544 3552 } … … 3546 3554 static int xc_zend_startup(zend_extension *extension) /* {{{ */ 3547 3555 { 3548 if (!origin_compile_file) { 3549 origin_compile_file = zend_compile_file; 3550 zend_compile_file = xc_check_initial_compile_file; 3551 } 3556 origin_compile_file = zend_compile_file; 3557 zend_compile_file = xc_check_initial_compile_file; 3552 3558 3553 3559 if (zend_llist_count(&zend_extensions) > 1) { … … 3559 3565 zend_error(E_WARNING, "XCache failed to load itself as the first zend_extension. compatibility downgraded"); 3560 3566 } 3567 3561 3568 /* hide myself */ 3569 /* TODO: hide handle sub modules */ 3562 3570 xcache_llist_unlink(&zend_extensions, xc_llist_zend_extension); 3563 3571 … … 3565 3573 assert(ext && ext != (zend_extension *) xc_llist_zend_extension->data); 3566 3574 xc_last_ext_startup = ext->startup; 3567 ext->startup = xc_zend_startup_last; 3575 ext->startup = xc_zend_startup_last_hook; 3576 } 3577 else { 3578 xc_zend_startup_last(); 3568 3579 } 3569 3580 return SUCCESS;
Note: See TracChangeset
for help on using the changeset viewer.

