]> granicus.if.org Git - php/commitdiff
Avoid unnecessary copying/freeing
authorDmitry Stogov <dmitry@php.net>
Thu, 8 Sep 2005 16:15:16 +0000 (16:15 +0000)
committerDmitry Stogov <dmitry@php.net>
Thu, 8 Sep 2005 16:15:16 +0000 (16:15 +0000)
Zend/zend.c

index b5ae4e46aa11105e0c4439ea91b279c3cf51345d..97582711ce5252a578d27910863f7bebddd0a00f 100644 (file)
@@ -763,8 +763,6 @@ static void copy_u_zend_constant(zend_constant *c)
        c->name = (char*)zend_ustrndup((UChar*)c->name, c->name_len - 1);
        if (!(c->flags & CONST_PERSISTENT)) {
                zval_copy_ctor(&c->value);
-       } else {
-               zval_copy_persistent(&c->value);
        }
 }
 
@@ -1079,7 +1077,7 @@ static void executor_globals_ctor(zend_executor_globals *executor_globals TSRMLS
 
        if (global_u_constants_table) {
                EG(global_u_constants_table) = (HashTable *) malloc(sizeof(HashTable));
-               zend_u_hash_init_ex(EG(global_u_constants_table), global_u_constants_table->nNumOfElements, NULL, ZEND_U_CONSTANT_DTOR, 1, 1, 0);
+               zend_u_hash_init_ex(EG(global_u_constants_table), global_u_constants_table->nNumOfElements, NULL, ZEND_CONSTANT_DTOR, 1, 1, 0);
                zend_hash_copy(EG(global_u_constants_table), global_u_constants_table, (copy_ctor_func_t) copy_u_zend_constant, &tmp_const, sizeof(zend_constant));
        } else {
                EG(global_u_constants_table) = NULL;