Changeset 356
- Timestamp:
- 06/22/09 09:48:49 (15 months ago)
- Location:
- eaccelerator/trunk
- Files:
-
- 6 edited
-
cache.c (modified) (2 diffs)
-
config.m4 (modified) (1 diff)
-
ea_restore.c (modified) (4 diffs)
-
ea_store.c (modified) (1 diff)
-
eaccelerator.h (modified) (1 diff)
-
opcodes.c (modified) (4 diffs)
Legend:
- Unmodified
- Added
- Removed
-
eaccelerator/trunk/cache.c
r350 r356 357 357 p = p->next; 358 358 } 359 EACCELERATOR_UNLOCK_RW();360 EACCELERATOR_PROTECT();361 359 if (x) { 362 360 memcpy(return_value, &x->value, sizeof(zval)); 363 361 restore_zval(return_value TSRMLS_CC); 362 EACCELERATOR_UNLOCK_RW(); 363 EACCELERATOR_PROTECT(); 364 364 if (xlen != key_len) { 365 365 efree(xkey); … … 367 367 return 1; 368 368 } 369 EACCELERATOR_UNLOCK_RW(); 370 EACCELERATOR_PROTECT(); 369 371 } 370 372 -
eaccelerator/trunk/config.m4
r269 r356 369 369 fi 370 370 371 AC_CHECK_FUNC(sched_yield,[372 AC_DEFINE(HAVE_SCHED_YIELD, 1, [Define if ou have sched_yield function])373 ])374 375 371 AC_CHECK_FUNC(mprotect,[ 376 372 AC_DEFINE(HAVE_MPROTECT, 1, [Define if ou have mprotect function]) -
eaccelerator/trunk/ea_restore.c
r352 r356 277 277 restore_zval(p TSRMLS_CC); 278 278 /* hrak: reset refcount to make sure there is one reference to this val, and prevent memleaks */ 279 RESET_PZVAL_REFCOUNT(p); 279 #ifdef ZEND_ENGINE_2_3 280 Z_SET_REFCOUNT_P(p, 1); 281 #else 282 p->refcount = 1; 283 #endif 280 284 return p; 281 285 } … … 352 356 case IS_OBJECT: 353 357 case IS_STRING: 354 if (Z_STRVAL_P(zv) == NULL || Z_STR LEN_P(zv) == 0) {358 if (Z_STRVAL_P(zv) == NULL || Z_STRVAL_P(zv) == "" || Z_STRLEN_P(zv) == 0) { 355 359 Z_STRLEN_P(zv) = 0; 356 360 Z_STRVAL_P(zv) = empty_string; … … 541 545 #ifdef ZEND_ENGINE_2_3 542 546 to->this_var = from->this_var; 547 to->early_binding = from->early_binding; 543 548 #else 544 549 to->uses_this = from->uses_this; … … 557 562 to->static_variables = restore_zval_hash(NULL, from->static_variables); 558 563 to->static_variables->pDestructor = ZVAL_PTR_DTOR; 559 if (EAG(class_entry) != NULL) {560 Bucket *p = to->static_variables->pListHead;561 while (p != NULL) {562 RESET_PZVAL_REFCOUNT((zval*) p->pDataPtr);563 p = p->pListNext;564 }565 }566 564 } 567 565 -
eaccelerator/trunk/ea_store.c
r348 r356 563 563 #ifdef ZEND_ENGINE_2_3 564 564 to->this_var = from->this_var; 565 to->early_binding = from->early_binding; 565 566 #else 566 567 to->uses_this = from->uses_this; -
eaccelerator/trunk/eaccelerator.h
r350 r356 204 204 zend_uchar type; 205 205 #ifdef ZEND_ENGINE_2_3 206 zend_uint early_binding; 206 207 zend_uint this_var; 207 208 #else -
eaccelerator/trunk/opcodes.c
r346 r356 36 36 #endif 37 37 38 # define OP1_VAR_2 OP1_STD38 # define OP1_VAR_2 OP1_STD 39 39 40 40 #define LAST_OPCODE (sizeof(opcodes)/sizeof(opcodes[0])) … … 101 101 OPDEF("END_SILENCE", EXT_UNUSED | OP1_TMP | OP2_UNUSED | RES_UNUSED), /* 58 */ 102 102 OPDEF("INIT_FCALL_BY_NAME", EXT_INIT_FCALL | OP1_STD | OP2_STD | RES_UNUSED), /* 59 */ 103 OPDEF("DO_FCALL", EXT_FCALL | OP1_STD | OP2_ OPLINE| RES_VAR), /* 60 */104 OPDEF("DO_FCALL_BY_NAME", EXT_FCALL | OP1_ STD | OP2_OPLINE| RES_VAR), /* 61 */103 OPDEF("DO_FCALL", EXT_FCALL | OP1_STD | OP2_UNUSED | RES_VAR), /* 60 */ 104 OPDEF("DO_FCALL_BY_NAME", EXT_FCALL | OP1_UNUSED | OP2_UNUSED | RES_VAR), /* 61 */ 105 105 OPDEF("RETURN", EXT_UNUSED | OP1_STD | OP2_UNUSED | RES_UNUSED), /* 62 */ 106 106 OPDEF("RECV", EXT_UNUSED | OP1_ARG | OP2_UNUSED | RES_VAR), /* 63 */ … … 145 145 OPDEF("FETCH_DIM_TMP_VAR", EXT_UNUSED | OP1_STD | OP2_STD | RES_VAR), /* 98 */ 146 146 OPDEF("FETCH_CONSTANT", EXT_UNUSED | OP1_UCLASS | OP2_STD | RES_TMP), /* 99 */ 147 OPDEF("FETCH_CONSTANT", EXT_UNUSED | OP1_STD | OP2_UNUSED | RES_TMP), /* 99 */148 147 OPDEF("DECLARE_FUNCTION_OR_CLASS", EXT_DECLARE| OP1_STD | OP2_STD | RES_UNUSED), /* 100 */ 149 148 OPDEF("EXT_STMT", EXT_STD | OP1_STD | OP2_STD | RES_STD), /* 101 */ … … 199 198 OPDEF("ASSIGN_DIM", EXT_UNUSED | OP1_STD | OP2_STD | RES_VAR), /* 147 */ 200 199 OPDEF("ISSET_ISEMPTY_PROP_OBJ", EXT_ISSET | OP1_STD | OP2_STD | RES_TMP), /* 148 */ 201 OPDEF("HANDLE_EXCEPTION", EXT_STD | OP1_UNUSED | OP2_UNUSED | RES_STD) /* 149 */ 200 OPDEF("HANDLE_EXCEPTION", EXT_STD | OP1_UNUSED | OP2_UNUSED | RES_STD), /* 149 */ 201 OPDEF("USER_OPCODE", EXT_STD | OP1_UNUSED | OP2_UNUSED | RES_STD) /* 150 */ 202 202 # ifdef ZEND_ENGINE_2_3 203 203 ,
Note: See TracChangeset
for help on using the changeset viewer.