Changeset 507
- Timestamp:
- 01/05/2008 09:12:31 AM (8 months ago)
- Location:
- trunk/processor
- Files:
-
- 2 modified
-
head.m4 (modified) (3 diffs)
-
processor.m4 (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
trunk/processor/head.m4
r480 r507 216 216 #ifdef ZEND_ENGINE_2 217 217 /* fix method on store */ 218 static void xc_fix_method(xc_processor_t *processor, zend_op_array *dst ) /* {{{ */218 static void xc_fix_method(xc_processor_t *processor, zend_op_array *dst TSRMLS_DC) /* {{{ */ 219 219 { 220 220 zend_function *zf = (zend_function *) dst; 221 221 zend_class_entry *ce = processor->active_class_entry_dst; 222 const zend_class_entry *srcce = processor->active_class_entry_src; 222 223 223 224 /* Fixing up the default functions for objects here since … … 240 241 } 241 242 else { 242 dnl FIXME: handle common.function_name here 243 #define SET_IF_SAME_NAME(member) \ 244 do { \ 245 if (!strcasecmp(ZSTR_S(zf->common.function_name), #member)) { \ 246 ce->member = zf; \ 247 } \ 248 } \ 249 while(0) 250 /* if(ce->member && !strcmp(zf->common.function_name, ce->member->common.function_name)) { \ */ 251 243 pushdef(`SET_IF_SAME_NAMEs', ` 252 244 SET_IF_SAME_NAME(__get); 253 245 SET_IF_SAME_NAME(__set); … … 263 255 SET_IF_SAME_NAME(__tostring); 264 256 #endif 265 257 ') 258 #ifdef IS_UNICODE 259 if (UG(unicode)) { 260 #define SET_IF_SAME_NAME(member) \ 261 do { \ 262 if (srcce->member && u_strcmp(ZSTR_S(zf->common.function_name), ZSTR_S(srcce->member->common.function_name)) == 0) { \ 263 ce->member = zf; \ 264 } \ 265 } \ 266 while(0) 267 268 SET_IF_SAME_NAMEs() 266 269 #undef SET_IF_SAME_NAME 270 } 271 else 272 #endif 273 do { 274 #define SET_IF_SAME_NAME(member) \ 275 do { \ 276 if (srcce->member && strcmp(ZSTR_S(zf->common.function_name), ZSTR_S(srcce->member->common.function_name)) == 0) { \ 277 ce->member = zf; \ 278 } \ 279 } \ 280 while(0) 281 282 SET_IF_SAME_NAMEs() 283 #undef SET_IF_SAME_NAME 284 } while (0); 285 286 popdef(`SET_IF_SAME_NAMEs') 287 267 288 } 268 289 } -
trunk/processor/processor.m4
r506 r507 668 668 #endif 669 669 670 IFRESTORE(` 671 #ifdef ZEND_ENGINE_2 670 #ifdef ZEND_ENGINE_2 671 PROC_CLASS_ENTRY_P(scope) 672 IFCOPY(` 672 673 if (src->scope) { 673 dst->scope = xc_get_class(processor, (zend_ulong) src->scope); 674 xc_fix_method(processor, dst); 675 } 676 DONE(scope) 677 #endif 678 ', ` 679 #ifdef ZEND_ENGINE_2 680 PROC_CLASS_ENTRY_P(scope) 681 #endif 682 ') 674 xc_fix_method(processor, dst TSRMLS_CC); 675 } 676 ') 677 #endif 683 678 684 679 IFRESTORE(`

