Changeset 95
- Timestamp:
- 05/11/05 14:46:01 (4 years ago)
- Files:
-
- eaccelerator/trunk/ChangeLog (modified) (1 diff)
- eaccelerator/trunk/loader.c (modified) (4 diffs)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
eaccelerator/trunk/ChangeLog
r91 r95 1 2005-05-11 Bart Vanbrabant <bart.vanbrabant at zoeloelip.be> 2 * Fix for must constructor related problems with encoded scripts and php5. Also a fixes 3 memory leak in the loader. (Thanks larnot) 4 1 5 2005-05-10 Bart Vanbrabant <bart.vanbrabant at zoeloelip.be> 2 6 eaccelerator/trunk/loader.c
r77 r95 943 943 to->constants_updated = 0; 944 944 945 #ifdef ZEND_ENGINE_2 /* patch from "Juan M. de la Torre" <juan.torre@iron-gate.net> */945 #ifdef ZEND_ENGINE_2 946 946 { 947 947 zend_function *f; … … 949 949 int fname_len, cname_len; 950 950 char *fname_lc, *cname_lc; 951 951 union _zend_function *old_ctor; 952 953 old_ctor = to->constructor; 952 954 cname_len = to->name_length; 953 955 cname_lc = zend_str_tolower_dup(to->name, cname_len); 954 955 to->constructor = to->destructor = to->clone = to->__get = to->__set = to->__call = NULL;956 956 957 957 p = to->function_table.pListHead; … … 961 961 fname_lc = zend_str_tolower_dup(f->common.function_name, fname_len); 962 962 963 if (fname_len == cname_len && !memcmp(fname_lc, cname_lc, fname_len)) 964 to->constructor = (zend_function*)f; 965 else if (fname_lc[0] == '_' && fname_lc[1] == '_') 963 if (fname_len == cname_len && !memcmp(fname_lc, cname_lc, fname_len) 964 && to->constructor == old_ctor && f->common.scope != to->parent) 965 to->constructor = (zend_function*)f; 966 else if (fname_lc[0] == '_' && fname_lc[1] == '_' && f->common.scope != to->parent) 966 967 { 967 968 if (fname_len == sizeof(ZEND_CONSTRUCTOR_FUNC_NAME)-1 && memcmp(fname_lc, ZEND_CONSTRUCTOR_FUNC_NAME, sizeof(ZEND_CONSTRUCTOR_FUNC_NAME)) == 0) … … 981 982 p = p->pListNext; 982 983 } 984 efree(cname_lc); 983 985 } 984 986 #endif