Changeset 345
Legend:
- Unmodified
- Added
- Removed
-
trunk/utils.c
r344 r345 530 530 /* }}} */ 531 531 #endif 532 533 void xc_zend_class_add_ref(zend_class_entry ZESW(*ce, **ce)) 534 { 535 #ifdef ZEND_ENGINE_2 536 (*ce)->refcount++; 537 #else 538 (*ce->refcount)++; 539 #endif 540 } 541 532 542 xc_sandbox_t *xc_sandbox_init(xc_sandbox_t *sandbox, char *filename TSRMLS_DC) /* {{{ */ 533 543 { … … 572 582 h = OG(function_table); 573 583 zend_hash_init_ex(&TG(function_table), 128, NULL, h->pDestructor, h->persistent, h->bApplyProtection); 574 zend_hash_copy(&TG(function_table), &XG(internal_function_table), NULL, (void *) &tmp_func, sizeof(tmp_func));584 zend_hash_copy(&TG(function_table), &XG(internal_function_table), (copy_ctor_func_t) function_add_ref, (void *) &tmp_func, sizeof(tmp_func)); 575 585 TG(internal_class_tail) = TG(function_table).pListTail; 576 586 577 587 h = OG(class_table); 578 588 zend_hash_init_ex(&TG(class_table), 16, NULL, h->pDestructor, h->persistent, h->bApplyProtection); 579 zend_hash_copy(&TG(class_table), &XG(internal_class_table), NULL, (void *) &tmp_cest, sizeof(tmp_cest));589 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)); 580 590 TG(internal_class_tail) = TG(class_table).pListTail; 581 591 -
trunk/utils.h
r344 r345 75 75 } xc_sandbox_t; 76 76 77 void xc_zend_class_add_ref(zend_class_entry ZESW(*ce, **ce)); 77 78 xc_sandbox_t *xc_sandbox_init(xc_sandbox_t *sandbox, char *filename TSRMLS_DC); 78 79 void xc_sandbox_free(xc_sandbox_t *sandbox, int install TSRMLS_DC); -
trunk/xcache.c
r344 r345 1610 1610 1611 1611 zend_hash_init_ex(&XG(internal_function_table), 100, NULL, NULL, 1, 0); 1612 zend_hash_copy(&XG(internal_function_table), CG(function_table), NULL, &tmp_func, sizeof(tmp_func));1612 zend_hash_copy(&XG(internal_function_table), CG(function_table), (copy_ctor_func_t) function_add_ref, &tmp_func, sizeof(tmp_func)); 1613 1613 1614 1614 zend_hash_init_ex(&XG(internal_class_table), 10, NULL, NULL, 1, 0); 1615 zend_hash_copy(&XG(internal_class_table), CG(class_table), NULL, &tmp_cest, sizeof(tmp_cest));1615 zend_hash_copy(&XG(internal_class_table), CG(class_table), (copy_ctor_func_t) xc_zend_class_add_ref, &tmp_cest, sizeof(tmp_cest)); 1616 1616 } 1617 1617 if (xc_php_hcache.size && !XG(php_holds)) {

