[macruby-changes] [4927] MacRuby/trunk/objc.m
source_changes at macosforge.org
source_changes at macosforge.org
Sun Nov 21 23:30:54 PST 2010
Revision: 4927
http://trac.macosforge.org/projects/ruby/changeset/4927
Author: martinlagardette at apple.com
Date: 2010-11-21 23:30:50 -0800 (Sun, 21 Nov 2010)
Log Message:
-----------
Change `+protocolWithName` signature
This will avoid the Obj-C runtime to think the returned object is an Obj-C object, which would issue warnings and crash.
Modified Paths:
--------------
MacRuby/trunk/objc.m
Modified: MacRuby/trunk/objc.m
===================================================================
--- MacRuby/trunk/objc.m 2010-11-22 06:37:29 UTC (rev 4926)
+++ MacRuby/trunk/objc.m 2010-11-22 07:30:50 UTC (rev 4927)
@@ -810,10 +810,10 @@
@end
@implementation Protocol (MRFindProtocol)
-+(id)protocolWithName:(NSString *)name
++ (Protocol *)protocolWithName:(NSString *)name
{
- return (id)objc_getProtocol([name UTF8String]);
-}
+ return (Protocol *)objc_getProtocol([name UTF8String]);
+}
@end
#if !defined(MACRUBY_STATIC)
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/macruby-changes/attachments/20101121/389934a9/attachment.html>
More information about the macruby-changes
mailing list