Fixed an error compiling on Xcode 11.2.1 (and perhaps elsewhere). method_invoke needs to be cast to the signature of the original method. adium-1.5.10.5
authorEvan Schoenberg
Thu, 14 Nov 2019 16:24:17 -0500
branchadium-1.5.10.5
changeset 5999 91f7da2a2338
parent 5998 c1c33c0ba53a
child 6000 5d5fbad486b2
Fixed an error compiling on Xcode 11.2.1 (and perhaps elsewhere). method_invoke needs to be cast to the signature of the original method.
Frameworks/AIUtilities Framework/Source/AITableViewAdditions.m
--- a/Frameworks/AIUtilities Framework/Source/AITableViewAdditions.m	Thu Nov 14 16:23:07 2019 -0500
+++ b/Frameworks/AIUtilities Framework/Source/AITableViewAdditions.m	Thu Nov 14 16:24:17 2019 -0500
@@ -76,6 +76,7 @@
 
 @implementation AITableView
 
+
 /* 
  * @brief Load
  *
@@ -104,7 +105,8 @@
 			[(id <AITableViewDelegate>)[self delegate] tableViewDeleteSelectedRows:self]; //Delete the selection
 	} else {
 		//Pass the key event on to the unswizzled impl
-		method_invoke(self, class_getInstanceMethod([AITableView class], @selector(keyDown:)), theEvent);
+        static void (*_key_down_method_invoke)(id, Method, NSEvent *) = (void (*)(id, Method, NSEvent *)) method_invoke;
+		_key_down_method_invoke(self, class_getInstanceMethod([AITableView class], @selector(keyDown:)), theEvent);
 	}
 }
 
@@ -113,8 +115,9 @@
 {
 	if ([[self delegate] respondsToSelector:@selector(tableView:menuForEvent:)])
 		return [(id<AITableViewDelegate>)[self delegate] tableView:self menuForEvent:theEvent];
-        
-	return method_invoke(self, class_getInstanceMethod([AITableView class], @selector(menuForEvent:)), theEvent);
+    
+    static NSMenu * (*_menu_for_event_method_invoke)(id, Method, NSEvent *) = (NSMenu * (*)(id, Method, NSEvent *)) method_invoke;
+	return _menu_for_event_method_invoke(self, class_getInstanceMethod([AITableView class], @selector(menuForEvent:)), theEvent);
 }
 
 @end