@@ -1094,18 +1094,21 @@ void MulleObjCTAOLogAndFail( struct _mulle_objc_object *obj,
1094
1094
mulle_thread_t osThread,
1095
1095
struct _mulle_objc_descriptor *desc)
1096
1096
{
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);
1109
1112
1110
1113
currentThreadObject = MulleThreadGetCurrentThread ();
1111
1114
osThreadObject = _mulle_objc_universe_lookup_threadobject_for_thread ( universe, osThread); // try to retri
@@ -1129,13 +1132,17 @@ void MulleObjCTAOLogAndFail( struct _mulle_objc_object *obj,
1129
1132
else
1130
1133
mulle_buffer_sprintf ( buffer, " %p " , osThread);
1131
1134
1132
-
1133
- strategyName = NULL ;
1134
- if ( [(id ) obj respondsToSelector: @selector ( mulleTAOStrategy )])
1135
+ if ( ! ismeta)
1135
1136
{
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
+ }
1139
1146
}
1140
1147
1141
1148
mulle_buffer_sprintf ( buffer, " gets a %c%s call from thread " ,
0 commit comments