Changeset 378 for branches/1.2/utils.c
- Timestamp:
- 05/07/2007 05:21:35 PM (19 months ago)
- Location:
- branches/1.2
- Files:
-
- 2 modified
Legend:
- Unmodified
- Added
- Removed
-
branches/1.2
- Property svnmerge-integrated changed from /trunk:1-302,371,374-375 to /trunk:1-302,344-346,371,374-375
-
branches/1.2/utils.c
r295 r378 1 1 2 2 #include "xcache.h" 3 #include "stack.h" 4 #include "xcache_globals.h" 3 5 #include "utils.h" 4 6 #ifdef ZEND_ENGINE_2_1 … … 534 536 /* }}} */ 535 537 #endif 538 539 void xc_zend_class_add_ref(zend_class_entry ZESW(*ce, **ce)) 540 { 541 #ifdef ZEND_ENGINE_2 542 (*ce)->refcount++; 543 #else 544 (*ce->refcount)++; 545 #endif 546 } 547 536 548 xc_sandbox_t *xc_sandbox_init(xc_sandbox_t *sandbox, char *filename TSRMLS_DC) /* {{{ */ 537 549 { 538 550 HashTable *h; 551 539 552 if (sandbox) { 540 553 memset(sandbox, 0, sizeof(sandbox[0])); … … 573 586 h = OG(function_table); 574 587 zend_hash_init_ex(&TG(function_table), 128, NULL, h->pDestructor, h->persistent, h->bApplyProtection); 588 { 589 zend_function tmp_func; 590 zend_hash_copy(&TG(function_table), &XG(internal_function_table), (copy_ctor_func_t) function_add_ref, (void *) &tmp_func, sizeof(tmp_func)); 591 } 592 TG(internal_class_tail) = TG(function_table).pListTail; 593 575 594 h = OG(class_table); 576 595 zend_hash_init_ex(&TG(class_table), 16, NULL, h->pDestructor, h->persistent, h->bApplyProtection); 596 #if 0 && TODO 597 { 598 xc_cest_t tmp_cest; 599 zend_hash_copy(&TG(class_table), &XG(internal_class_table), (copy_ctor_func_t) xc_zend_class_add_ref, (void *) &tmp_cest, sizeof(tmp_cest)); 600 } 601 #endif 602 TG(internal_class_tail) = TG(class_table).pListTail; 603 577 604 #ifdef ZEND_ENGINE_2_1 578 605 /* shallow copy, don't destruct */ … … 619 646 #endif 620 647 621 b = TG( function_table).pListHead;648 b = TG(internal_function_tail) ? TG(internal_function_tail)->pListNext : TG(function_table).pListHead; 622 649 /* install function */ 623 650 while (b != NULL) { … … 628 655 } 629 656 630 b = TG( class_table).pListHead;657 b = TG(internal_class_tail) ? TG(internal_class_tail)->pListNext : TG(class_table).pListHead; 631 658 /* install class */ 632 659 while (b != NULL) {

