Revision: 13893
http://sourceforge.net/p/skim-app/code/13893
Author: hofman
Date: 2023-12-11 23:01:28 +0000 (Mon, 11 Dec 2023)
Log Message:
-----------
call implementation directly rather than using NSInvocation
Modified Paths:
--------------
trunk/SKMainWindowController_UI.m
Modified: trunk/SKMainWindowController_UI.m
===================================================================
--- trunk/SKMainWindowController_UI.m 2023-12-11 18:04:45 UTC (rev 13892)
+++ trunk/SKMainWindowController_UI.m 2023-12-11 23:01:28 UTC (rev 13893)
@@ -1372,11 +1372,11 @@
BOOL didCommit = [self commitEditingAndReturnError:NULL];
if (delegate && didCommitSelector) {
// - (void)editor:(id)editor didCommit:(BOOL)didCommit
contextInfo:(void *)contextInfo
- NSInvocation *invocation = [NSInvocation invocationWithTarget:delegate
selector:didCommitSelector];
- [invocation setArgument:&self atIndex:2];
- [invocation setArgument:&didCommit atIndex:3];
- [invocation setArgument:&contextInfo atIndex:4];
- dispatch_async(dispatch_get_main_queue(), ^{ [invocation invoke]; });
+ dispatch_async(dispatch_get_main_queue(), ^{
+ void (*didCommitImp)(id, SEL, id, BOOL, void *) = (void (*)(id,
SEL, id, BOOL, void *))[delegate methodForSelector:didCommitSelector];
+ if (didCommitImp)
+ didCommitImp(delegate, didCommitSelector, self, didCommit,
contextInfo);
+ });
}
}
This was sent by the SourceForge.net collaborative development platform, the
world's largest Open Source development site.
_______________________________________________
Skim-app-commit mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/skim-app-commit