Permalink
Browse files

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.



git-svn-id: http://svn.macosforge.org/repository/ruby/MacRuby/trunk@4927 23306eb0-4c56-4727-a40e-e92c0eb68959
  • Loading branch information...
Thibault Martin-Lagardette
Thibault Martin-Lagardette committed Nov 22, 2010
1 parent a3a0414 commit e3ee11d3a52c49deb2025fe5f7686bf4d440f186
Showing with 3 additions and 3 deletions.
  1. +3 −3 objc.m
View
6 objc.m
@@ -810,10 +810,10 @@ @interface Protocol
@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)

0 comments on commit e3ee11d

Please sign in to comment.