@@ -1094,18 +1094,21 @@ void MulleObjCTAOLogAndFail( struct _mulle_objc_object *obj,
10941094 mulle_thread_t osThread,
10951095 struct _mulle_objc_descriptor *desc)
10961096{
1097- struct _mulle_objc_class *cls;
1098- struct _mulle_objc_universe *universe;
1099- int ismeta;
1100- NSThread *currentThreadObject;
1101- NSThread *osThreadObject;
1102- char *s;
1103- char *strategyName;
1104- MulleObjCTAOStrategy strategy;
1105-
1106- cls = _mulle_objc_object_get_isa ( obj);
1107- ismeta = _mulle_objc_class_is_metaclass ( cls);
1108- universe = _mulle_objc_class_get_universe ( cls);
1097+ struct _mulle_objc_class *cls;
1098+ struct _mulle_objc_universe *universe;
1099+ int ismeta;
1100+ NSThread *currentThreadObject;
1101+ NSThread *osThreadObject;
1102+ char *s;
1103+ char *strategyName;
1104+ MulleObjCTAOStrategy strategy;
1105+ struct _mulle_objc_searcharguments args;
1106+ struct _mulle_objc_method *method;
1107+ mulle_objc_implementation_t imp;
1108+
1109+ cls = _mulle_objc_object_get_isa ( obj);
1110+ ismeta = _mulle_objc_class_is_metaclass ( cls);
1111+ universe = _mulle_objc_class_get_universe ( cls);
11091112
11101113 currentThreadObject = MulleThreadGetCurrentThread ();
11111114 osThreadObject = _mulle_objc_universe_lookup_threadobject_for_thread ( universe, osThread); // try to retri
@@ -1129,13 +1132,17 @@ void MulleObjCTAOLogAndFail( struct _mulle_objc_object *obj,
11291132 else
11301133 mulle_buffer_sprintf ( buffer, " %p " , osThread);
11311134
1132-
1133- strategyName = NULL ;
1134- if ( [(id ) obj respondsToSelector: @selector ( mulleTAOStrategy )])
1135+ if ( ! ismeta)
11351136 {
1136- strategy = [(id ) obj mulleTAOStrategy ];
1137- strategyName = NS_ENUM_LOOKUP( MulleObjCTAOStrategy, strategy);
1138- mulle_buffer_sprintf ( buffer, " and TAO strategy %s " , strategyName ? strategyName : " None" );
1137+ args = mulle_objc_searcharguments_make_default ( @selector ( mulleTAOStrategy ));
1138+ method = mulle_objc_class_search_method ( cls, &args, 0 , NULL );
1139+ if ( method)
1140+ {
1141+ imp = mulle_objc_method_get_implementation ( method);
1142+ strategy = (uintptr_t ) _mulle_objc_implementation_invoke ( imp, obj, @selector ( mulleTAOStrategy ), obj);
1143+ strategyName = NS_ENUM_LOOKUP( MulleObjCTAOStrategy, strategy);
1144+ mulle_buffer_sprintf ( buffer, " and TAO strategy %s " , strategyName ? strategyName : " None" );
1145+ }
11391146 }
11401147
11411148 mulle_buffer_sprintf ( buffer, " gets a %c%s call from thread " ,
0 commit comments