com php-src: Keep constnat flags: ext/opcache/zend_persist. c ext/opcache/zend_persist_calc.c
| From: | Dmitry Stogov | Date: | Tue, 01 Apr 2014 08:20:16 +0000 |
| Subject: | com php-src: Keep constnat flags: ext/opcache/zend_persist. c ext/opcache/zend_persist_calc.c | ||
| Groups: | php.cvs | ||
| Request: | Send a blank email to php-cvs+get-77509@lists.php.net to get a copy of this message | ||
Commit: 569bfbd00b51588c992c384b99e0d2e97f0e91b9
Author: Dmitry Stogov <dmitry@zend.com> Tue, 1 Apr 2014 12:20:16 +0400
Parents: ceecd31cb6d96cef0d8b924fb2f03932b53cf7e3
Branches: phpng
Link: http://git.php.net/?p=php-src.git;a=commitdiff;h=569bfbd00b51588c992c384b99e0d2e97f0e91b9
Log:
Keep constnat flags
Changed paths:
M ext/opcache/zend_persist.c
M ext/opcache/zend_persist_calc.c
Diff:
diff --git a/ext/opcache/zend_persist.c b/ext/opcache/zend_persist.c
index 5562f8c..d638acd 100644
--- a/ext/opcache/zend_persist..c
+++ b/ext/opcache/zend_persist.c
@@ -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:
diff --git a/ext/opcache/zend_persist_calc..c b/ext/opcache/zend_persist_calc.c
index 5bd358d..48038dc 100644
--- a/ext/opcache/zend_persist_calc.c
+++ b/ext/opcache/zend_persist_calc.c
@@ -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: