Revision: 5260
http://skim-app.svn.sourceforge.net/skim-app/?rev=5260&view=rev
Author: hofman
Date: 2009-03-16 18:53:31 +0000 (Mon, 16 Mar 2009)
Log Message:
-----------
replace NULL by kUnresolvedCFragSymbolAddress for checking weakly linked symbols
Modified Paths:
--------------
trunk/SKRuntime.m
Modified: trunk/SKRuntime.m
===================================================================
--- trunk/SKRuntime.m 2009-03-16 10:01:51 UTC (rev 5259)
+++ trunk/SKRuntime.m 2009-03-16 18:53:31 UTC (rev 5260)
@@ -48,15 +48,15 @@
extern void _objc_flush_caches(Class);
static inline Class SK_object_getClass(id object) {
- return object_getClass != NULL ? object_getClass(object) : object->isa;
+ return object_getClass != kUnresolvedCFragSymbolAddress ?
object_getClass(object) : object->isa;
}
static inline IMP SK_method_getImplementation(Method aMethod) {
- return method_getImplementation != NULL ?
method_getImplementation(aMethod) : aMethod->method_imp;
+ return method_getImplementation != kUnresolvedCFragSymbolAddress ?
method_getImplementation(aMethod) : aMethod->method_imp;
}
static inline const char *SK_method_getTypeEncoding(Method aMethod) {
- return method_getTypeEncoding != NULL ? method_getTypeEncoding(aMethod) :
aMethod->method_types;
+ return method_getTypeEncoding != kUnresolvedCFragSymbolAddress ?
method_getTypeEncoding(aMethod) : aMethod->method_types;
}
// generic implementation for class_addMethod/class_replaceMethod, but only
for old API, modeled after actual runtime implementation of _class_addMethod
@@ -96,7 +96,7 @@
}
static inline IMP SK_class_replaceMethod(Class aClass, SEL selector, IMP
methodImp, const char *methodTypes) {
- if (class_replaceMethod != NULL)
+ if (class_replaceMethod != kUnresolvedCFragSymbolAddress)
return class_replaceMethod(aClass, selector, methodImp, methodTypes);
else
return _SK_class_addMethod(aClass, selector, methodImp, methodTypes,
YES);
This was sent by the SourceForge.net collaborative development platform, the
world's largest Open Source development site.
------------------------------------------------------------------------------
Apps built with the Adobe(R) Flex(R) framework and Flex Builder(TM) are
powering Web 2.0 with engaging, cross-platform capabilities. Quickly and
easily build your RIAs with Flex Builder, the Eclipse(TM)based development
software that enables intelligent coding and step-through debugging.
Download the free 60 day trial. http://p.sf.net/sfu/www-adobe-com
_______________________________________________
Skim-app-commit mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/skim-app-commit