Changeset 627 in svn for branches/1.3/utils.c


Ignore:
Timestamp:
2009-07-05T11:24:38+02:00 (6 years ago)
Author:
Xuefer
Message:

merged r585:592 from trunk

Location:
branches/1.3
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • branches/1.3

  • branches/1.3/utils.c

    r625 r627  
    598598#endif
    599599
     600static 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/* }}} */
    600608xc_sandbox_t *xc_sandbox_init(xc_sandbox_t *sandbox, char *filename TSRMLS_DC) /* {{{ */
    601609{
     
    635643    h = OG(zend_constants);
    636644    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    }
    637649#endif
    638650    h = OG(function_table);
     
    677689    /* Using ZEND_COMPILE_IGNORE_INTERNAL_CLASSES for ZEND_FETCH_CLASS_RT_NS_CHECK
    678690     */
    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;
    680692#endif
    681693
     
    696708
    697709#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;
    699711    /* install constants */
    700712    while (b != NULL) {
Note: See TracChangeset for help on using the changeset viewer.