Changeset 231
- Timestamp:
- 07/22/06 12:07:15 (2 years ago)
- Files:
-
- eaccelerator/trunk/ChangeLog (modified) (1 diff)
- eaccelerator/trunk/ea_restore.c (modified) (3 diffs)
- eaccelerator/trunk/ea_store.c (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
eaccelerator/trunk/ChangeLog
r230 r231 1 2006-07-22 Bart Vanbrabant <bart.vanbrabant at zoeloelip.be> 2 3 * Some zval macro's differ for php4 and 5, this fixes #146. 4 1 5 2006-07-19 Bart Vanbrabant <bart.vanbrabant at zoeloelip.be> 2 6 eaccelerator/trunk/ea_restore.c
r228 r231 165 165 } 166 166 #ifndef ZEND_ENGINE_2 167 FIXUP(Z_OBJ VAL_P(zv).ce);168 if (Z_OBJ VAL_P(zv).properties!= NULL) {169 FIXUP(Z_OBJ VAL_P(zv).properties);170 fixup_zval_hash(Z_OBJ VAL_P(zv).properties);167 FIXUP(Z_OBJCE_P(zv)); 168 if (Z_OBJPROP_P(zv) != NULL) { 169 FIXUP(Z_OBJPROP_P(zv)); 170 fixup_zval_hash(Z_OBJPROP_P(zv)); 171 171 } 172 172 #endif … … 402 402 #ifndef ZEND_ENGINE_2 403 403 zend_bool incomplete_class = 0; 404 char *class_name = (char *) Z_OBJ VAL_P(zv).ce;404 char *class_name = (char *) Z_OBJCE_P(zv); 405 405 int name_len = 0; 406 406 if (!EAG(compress)) { … … 418 418 } else { 419 419 efree(lowercase_name); 420 Z_OBJ VAL_P(zv).ce= ce;420 Z_OBJCE_P(zv) = ce; 421 421 incomplete_class = 1; 422 422 } 423 423 } else { 424 Z_OBJ VAL_P(zv).ce= ce;424 Z_OBJCE_P(zv) = ce; 425 425 } 426 426 } 427 if (Z_OBJ VAL_P(zv).properties!= NULL) {428 Z_OBJ VAL_P(zv).properties = restore_zval_hash(NULL, Z_OBJVAL_P(zv).properties);429 Z_OBJ VAL_P(zv).properties->pDestructor = ZVAL_PTR_DTOR;427 if (Z_OBJPROP_P(zv) != NULL) { 428 Z_OBJPROP_P(zv) = restore_zval_hash(NULL, Z_OBJPROP_P(zv)); 429 Z_OBJPROP_P(zv)->pDestructor = ZVAL_PTR_DTOR; 430 430 /* Clearing references */ 431 431 { 432 Bucket *p = Z_OBJ VAL_P(zv).properties->pListHead;432 Bucket *p = Z_OBJPROP_P(zv)->pListHead; 433 433 while (p != NULL) { 434 434 ((zval *) (p->pDataPtr))->refcount = 1; eaccelerator/trunk/ea_store.c
r228 r231 129 129 case IS_OBJECT: 130 130 #ifndef ZEND_ENGINE_2 131 if (Z_OBJ VAL_P(zv).ce!= NULL) {132 zend_class_entry *ce = Z_OBJ VAL_P(zv).ce;131 if (Z_OBJCE_P(zv) != NULL) { 132 zend_class_entry *ce = Z_OBJCE_P(zv); 133 133 if (!EAG(compress)) { 134 134 DBG(ea_debug_error, ("[%d] EACCELERATOR can't cache objects\n", getpid())); … … 142 142 ce = ce->parent; 143 143 } 144 calc_string(Z_OBJ VAL_P(zv).ce->name, Z_OBJVAL_P(zv).ce->name_length + 1 TSRMLS_CC);145 } 146 if (Z_OBJ VAL_P(zv).properties!= NULL) {144 calc_string(Z_OBJCE_P(zv)->name, Z_OBJCE_P(zv)->name_length + 1 TSRMLS_CC); 145 } 146 if (Z_OBJPROP_P(zv) != NULL) { 147 147 EACCELERATOR_ALIGN(EAG(mem)); 148 148 EAG(mem) += sizeof(HashTable); 149 calc_zval_hash(Z_OBJ VAL_P(zv).properties);149 calc_zval_hash(Z_OBJPROP_P(zv)); 150 150 } 151 151 #endif … … 497 497 } 498 498 #ifndef ZEND_ENGINE_2 499 if (Z_OBJ VAL_P(zv).ce!= NULL) {500 char *s = store_string(Z_OBJ VAL_P(zv).ce->name, Z_OBJVAL_P(zv).ce->name_length + 1 TSRMLS_CC);501 zend_str_tolower(s, Z_OBJ VAL_P(zv).ce->name_length);502 Z_OBJ VAL_P(zv).ce= (zend_class_entry *) s;503 } 504 if (Z_OBJ VAL_P(zv).properties!= NULL) {499 if (Z_OBJCE_P(zv) != NULL) { 500 char *s = store_string(Z_OBJCE_P(zv)->name, Z_OBJCE_P(zv)->name_length + 1 TSRMLS_CC); 501 zend_str_tolower(s, Z_OBJCE_P(zv)->name_length); 502 Z_OBJCE_P(zv) = (zend_class_entry *) s; 503 } 504 if (Z_OBJPROP_P(zv) != NULL) { 505 505 HashTable *p; 506 506 EACCELERATOR_ALIGN(EAG(mem)); 507 507 p = (HashTable *) EAG(mem); 508 508 EAG(mem) += sizeof(HashTable); 509 store_zval_hash(p, Z_OBJ VAL_P(zv).properties);510 Z_OBJ VAL_P(zv).properties= p;509 store_zval_hash(p, Z_OBJPROP_P(zv)); 510 Z_OBJPROP_P(zv) = p; 511 511 } 512 512 #endif