1
0
mirror of https://github.com/php/php-src.git synced 2026-04-20 06:21:12 +02:00

Keep constnat flags

This commit is contained in:
Dmitry Stogov
2014-04-01 12:20:16 +04:00
parent ceecd31cb6
commit 569bfbd00b
2 changed files with 8 additions and 0 deletions

View File

@@ -111,6 +111,7 @@ static zend_ast *zend_persist_ast(zend_ast *ast TSRMLS_DC)
static void zend_persist_zval(zval *z TSRMLS_DC)
{
zend_uchar flags;
void *new_ptr;
#if ZEND_EXTENSION_API_NO >= PHP_5_3_X_API_NO
@@ -120,7 +121,9 @@ static void zend_persist_zval(zval *z TSRMLS_DC)
#endif
case IS_STRING:
case IS_CONSTANT:
flags = Z_STR_P(z)->gc.u.v.flags & ~ (IS_STR_PERSISTENT | IS_STR_INTERNED | IS_STR_PERMANENT);
zend_accel_store_interned_string(Z_STR_P(z));
Z_STR_P(z)->gc.u.v.flags |= flags;
break;
case IS_ARRAY:
case IS_CONSTANT_ARRAY:

View File

@@ -73,7 +73,9 @@ static uint zend_hash_persist_calc(HashTable *ht, uint (*pPersistElement)(zval *
/* persist bucket and key */
if (p->key) {
zend_uchar flags = p->key->gc.u.v.flags & ~ (IS_STR_PERSISTENT | IS_STR_INTERNED | IS_STR_PERMANENT);
ADD_INTERNED_STRING(p->key, 1);
p->key->gc.u.v.flags |= flags;
}
ADD_SIZE(pPersistElement(&p->val TSRMLS_CC));
@@ -105,6 +107,7 @@ static uint zend_persist_ast_calc(zend_ast *ast TSRMLS_DC)
static uint zend_persist_zval_calc(zval *z TSRMLS_DC)
{
zend_uchar flags;
uint size;
START_SIZE();
@@ -115,7 +118,9 @@ static uint zend_persist_zval_calc(zval *z TSRMLS_DC)
#endif
case IS_STRING:
case IS_CONSTANT:
flags = Z_STR_P(z)->gc.u.v.flags & ~ (IS_STR_PERSISTENT | IS_STR_INTERNED | IS_STR_PERMANENT);
ADD_INTERNED_STRING(Z_STR_P(z), 0);
Z_STR_P(z)->gc.u.v.flags |= flags;
break;
case IS_ARRAY:
case IS_CONSTANT_ARRAY: