|
|
|
@ -529,6 +529,16 @@ static int xc_auto_global_arm(zend_auto_global *auto_global TSRMLS_DC) /* {{{ */
|
|
|
|
|
}
|
|
|
|
|
/* }}} */
|
|
|
|
|
#endif
|
|
|
|
|
|
|
|
|
|
void xc_zend_class_add_ref(zend_class_entry ZESW(*ce, **ce))
|
|
|
|
|
{
|
|
|
|
|
#ifdef ZEND_ENGINE_2
|
|
|
|
|
(*ce)->refcount++;
|
|
|
|
|
#else
|
|
|
|
|
(*ce->refcount)++;
|
|
|
|
|
#endif
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
xc_sandbox_t *xc_sandbox_init(xc_sandbox_t *sandbox, char *filename TSRMLS_DC) /* {{{ */
|
|
|
|
|
{
|
|
|
|
|
HashTable *h;
|
|
|
|
@ -571,12 +581,12 @@ xc_sandbox_t *xc_sandbox_init(xc_sandbox_t *sandbox, char *filename TSRMLS_DC) /
|
|
|
|
|
#endif
|
|
|
|
|
h = OG(function_table);
|
|
|
|
|
zend_hash_init_ex(&TG(function_table), 128, NULL, h->pDestructor, h->persistent, h->bApplyProtection);
|
|
|
|
|
zend_hash_copy(&TG(function_table), &XG(internal_function_table), NULL, (void *) &tmp_func, sizeof(tmp_func));
|
|
|
|
|
zend_hash_copy(&TG(function_table), &XG(internal_function_table), (copy_ctor_func_t) function_add_ref, (void *) &tmp_func, sizeof(tmp_func));
|
|
|
|
|
TG(internal_class_tail) = TG(function_table).pListTail;
|
|
|
|
|
|
|
|
|
|
h = OG(class_table);
|
|
|
|
|
zend_hash_init_ex(&TG(class_table), 16, NULL, h->pDestructor, h->persistent, h->bApplyProtection);
|
|
|
|
|
zend_hash_copy(&TG(class_table), &XG(internal_class_table), NULL, (void *) &tmp_cest, sizeof(tmp_cest));
|
|
|
|
|
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));
|
|
|
|
|
TG(internal_class_tail) = TG(class_table).pListTail;
|
|
|
|
|
|
|
|
|
|
#ifdef ZEND_ENGINE_2_1
|
|
|
|
|