Revision: 4292
http://skim-app.svn.sourceforge.net/skim-app/?rev=4292&view=rev
Author: hofman
Date: 2008-07-24 11:21:34 +0000 (Thu, 24 Jul 2008)
Log Message:
-----------
return NULL when setting an undefined method
Modified Paths:
--------------
trunk/NSObject_SKExtensions.m
Modified: trunk/NSObject_SKExtensions.m
===================================================================
--- trunk/NSObject_SKExtensions.m 2008-07-24 10:45:49 UTC (rev 4291)
+++ trunk/NSObject_SKExtensions.m 2008-07-24 11:21:34 UTC (rev 4292)
@@ -44,7 +44,7 @@
+ (IMP)setMethod:(IMP)anImp typeEncoding:(const char *)types
forSelector:(SEL)aSelector {
Method method = class_getClassMethod(self, aSelector);
- IMP imp = SK_method_getImplementation(method);
+ IMP imp = method ? SK_method_getImplementation(method) : NULL;
if (method && types == NULL)
types = SK_method_getTypeEncoding(method);
SK_class_replaceMethod(SK_object_getClass(self), aSelector, anImp, types);
@@ -57,7 +57,7 @@
+ (IMP)setInstanceMethod:(IMP)anImp typeEncoding:(const char *)types
forSelector:(SEL)aSelector {
Method method = class_getInstanceMethod(self, aSelector);
- IMP imp = SK_method_getImplementation(method);
+ IMP imp = method ? SK_method_getImplementation(method) : NULL;
if (method && types == NULL)
types = SK_method_getTypeEncoding(method);
SK_class_replaceMethod(self, aSelector, anImp, types);
This was sent by the SourceForge.net collaborative development platform, the
world's largest Open Source development site.
-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
Skim-app-commit mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/skim-app-commit