Changeset 588 for trunk/utils.c
- Timestamp:
- 04/01/2009 10:06:38 AM (4 years ago)
- Files:
-
- 1 modified
-
trunk/utils.c (modified) (4 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/utils.c
r555 r588 595 595 #endif 596 596 597 static void xc_copy_zend_constant(zend_constant *c) /* {{{ */ 598 { 599 c->name = zend_strndup(c->name, c->name_len - 1); 600 if (!(c->flags & CONST_PERSISTENT)) { 601 zval_copy_ctor(&c->value); 602 } 603 } 604 /* }}} */ 597 605 xc_sandbox_t *xc_sandbox_init(xc_sandbox_t *sandbox, char *filename TSRMLS_DC) /* {{{ */ 598 606 { … … 632 640 h = OG(zend_constants); 633 641 zend_hash_init_ex(&TG(zend_constants), 20, NULL, h->pDestructor, h->persistent, h->bApplyProtection); 642 { 643 zend_constant tmp_const; 644 zend_hash_copy(&TG(zend_constants), &XG(internal_constant_table), (copy_ctor_func_t) xc_copy_zend_constant, (void *) &tmp_const, sizeof(tmp_const)); 645 } 634 646 #endif 635 647 h = OG(function_table); … … 679 691 /* Using ZEND_COMPILE_IGNORE_INTERNAL_CLASSES for ZEND_FETCH_CLASS_RT_NS_CHECK 680 692 */ 681 CG(compiler_options) |= ZEND_COMPILE_IGNORE_INTERNAL_CLASSES | ZEND_COMPILE_ DELAYED_BINDING;693 CG(compiler_options) |= ZEND_COMPILE_IGNORE_INTERNAL_CLASSES | ZEND_COMPILE_NO_CONSTANT_SUBSTITUTION | ZEND_COMPILE_DELAYED_BINDING; 682 694 #endif 683 695 … … 698 710 699 711 #ifdef HAVE_XCACHE_CONSTANT 700 b = TG(zend_constants).pListHead;712 b = /*TG(internal_constant_tail) ? TG(internal_constant_tail)->pListNext :*/ TG(zend_constants).pListHead; 701 713 /* install constants */ 702 714 while (b != NULL) {

