Changeset 278 in svn for trunk/xcache.c
- Timestamp:
- 2006-11-17T17:21:46Z (11 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/xcache.c
r268 r278 107 107 static zend_bool xc_module_gotup = 0; 108 108 static zend_bool xc_zend_extension_gotup = 0; 109 static zend_bool xc_zend_extension_faked = 0; 109 110 #if !COMPILE_DL_XCACHE 110 111 # define zend_extension_entry xcache_zend_extension_entry … … 2381 2382 } 2382 2383 /* }}} */ 2384 static int xc_ptr_compare_func(void *p1, void *p2) /* {{{ */ 2385 { 2386 return p1 == p2; 2387 } 2388 /* }}} */ 2389 static int xc_zend_remove_extension(zend_extension *extension) /* {{{ */ 2390 { 2391 llist_dtor_func_t dtor; 2392 2393 assert(extension); 2394 dtor = zend_extensions.dtor; /* avoid dtor */ 2395 zend_extensions.dtor = NULL; 2396 zend_llist_del_element(&zend_extensions, extension, xc_ptr_compare_func); 2397 zend_extensions.dtor = dtor; 2398 } 2399 /* }}} */ 2383 2400 static int xc_config_hash(xc_hash_t *p, char *name, char *default_value) /* {{{ */ 2384 2401 { … … 2425 2442 xc_zend_extension_register(&zend_extension_entry, 0); 2426 2443 xc_zend_extension_startup(&zend_extension_entry); 2444 xc_zend_extension_faked = 1; 2427 2445 } 2428 2446 } … … 2534 2552 #endif 2535 2553 2554 if (xc_zend_extension_faked) { 2555 zend_extension *ext = zend_get_extension(XCACHE_NAME); 2556 if (ext->shutdown) { 2557 ext->shutdown(ext); 2558 } 2559 xc_zend_remove_extension(ext); 2560 } 2536 2561 UNREGISTER_INI_ENTRIES(); 2537 2562 return SUCCESS; … … 2596 2621 static startup_func_t xc_last_ext_startup; 2597 2622 static zend_llist_element *xc_llist_element; 2598 static int xc_ptr_compare_func(void *p1, void *p2) /* {{{ */2599 {2600 return p1 == p2;2601 }2602 /* }}} */2603 2623 static int xc_zend_startup_last(zend_extension *extension) /* {{{ */ 2604 2624 { … … 2627 2647 zend_llist_position lpos; 2628 2648 zend_extension *ext; 2629 llist_dtor_func_t dtor;2630 2649 2631 2650 ext = zend_get_extension(XCACHE_NAME); 2632 assert(ext); 2633 dtor = zend_extensions.dtor; /* avoid dtor */ 2634 zend_extensions.dtor = NULL; 2635 zend_llist_del_element(&zend_extensions, ext, xc_ptr_compare_func); 2636 zend_extensions.dtor = dtor; 2651 xc_zend_remove_extension(ext); 2637 2652 2638 2653 ext = (zend_extension *) zend_llist_get_last_ex(&zend_extensions, &lpos);
Note: See TracChangeset
for help on using the changeset viewer.