Changeset 627 for branches/1.3/utils.c
- Timestamp:
- 07/05/2009 11:24:38 AM (4 years ago)
- Location:
- branches/1.3
- Files:
-
- 2 modified
Legend:
- Unmodified
- Added
- Removed
-
branches/1.3
- Property svn:mergeinfo changed
/trunk merged: 585,588-592
- Property svn:mergeinfo changed
-
branches/1.3/utils.c
r625 r627 598 598 #endif 599 599 600 static void xc_copy_zend_constant(zend_constant *c) /* {{{ */ 601 { 602 c->name = zend_strndup(c->name, c->name_len - 1); 603 if (!(c->flags & CONST_PERSISTENT)) { 604 zval_copy_ctor(&c->value); 605 } 606 } 607 /* }}} */ 600 608 xc_sandbox_t *xc_sandbox_init(xc_sandbox_t *sandbox, char *filename TSRMLS_DC) /* {{{ */ 601 609 { … … 635 643 h = OG(zend_constants); 636 644 zend_hash_init_ex(&TG(zend_constants), 20, NULL, h->pDestructor, h->persistent, h->bApplyProtection); 645 { 646 zend_constant tmp_const; 647 zend_hash_copy(&TG(zend_constants), &XG(internal_constant_table), (copy_ctor_func_t) xc_copy_zend_constant, (void *) &tmp_const, sizeof(tmp_const)); 648 } 637 649 #endif 638 650 h = OG(function_table); … … 677 689 /* Using ZEND_COMPILE_IGNORE_INTERNAL_CLASSES for ZEND_FETCH_CLASS_RT_NS_CHECK 678 690 */ 679 CG(compiler_options) |= ZEND_COMPILE_IGNORE_INTERNAL_CLASSES | ZEND_COMPILE_ DELAYED_BINDING;691 CG(compiler_options) |= ZEND_COMPILE_IGNORE_INTERNAL_CLASSES | ZEND_COMPILE_NO_CONSTANT_SUBSTITUTION | ZEND_COMPILE_DELAYED_BINDING; 680 692 #endif 681 693 … … 696 708 697 709 #ifdef HAVE_XCACHE_CONSTANT 698 b = TG(zend_constants).pListHead;710 b = /*TG(internal_constant_tail) ? TG(internal_constant_tail)->pListNext :*/ TG(zend_constants).pListHead; 699 711 /* install constants */ 700 712 while (b != NULL) {

