Revision: 5261
          http://skim-app.svn.sourceforge.net/skim-app/?rev=5261&view=rev
Author:   hofman
Date:     2009-03-16 22:18:30 +0000 (Mon, 16 Mar 2009)

Log Message:
-----------
replace kUnresolvedCFragSymbolAddress by WEAK_NULL macro for checking weakly 
linked symbols

Modified Paths:
--------------
    trunk/SKRuntime.m
    trunk/SKTransitionController.m

Modified: trunk/SKRuntime.m
===================================================================
--- trunk/SKRuntime.m   2009-03-16 18:53:31 UTC (rev 5260)
+++ trunk/SKRuntime.m   2009-03-16 22:18:30 UTC (rev 5261)
@@ -39,6 +39,8 @@
 #import "SKRuntime.h"
 #import <objc/objc-runtime.h>
 
+#define WEAK_NULL NULL
+
 // wrappers around 10.5 only functions, use 10.4 API when the function is not 
defined
 
 #if MAC_OS_X_VERSION_MIN_REQUIRED < MAC_OS_X_VERSION_10_5
@@ -48,15 +50,15 @@
 extern void _objc_flush_caches(Class);
 
 static inline Class SK_object_getClass(id object) {
-    return object_getClass != kUnresolvedCFragSymbolAddress ? 
object_getClass(object) : object->isa;
+    return object_getClass != WEAK_NULL ? object_getClass(object) : 
object->isa;
 }
 
 static inline IMP SK_method_getImplementation(Method aMethod) {
-    return method_getImplementation != kUnresolvedCFragSymbolAddress ? 
method_getImplementation(aMethod) : aMethod->method_imp;
+    return method_getImplementation != WEAK_NULL ? 
method_getImplementation(aMethod) : aMethod->method_imp;
 }
 
 static inline const char *SK_method_getTypeEncoding(Method aMethod) {
-    return method_getTypeEncoding != kUnresolvedCFragSymbolAddress ? 
method_getTypeEncoding(aMethod) : aMethod->method_types;
+    return method_getTypeEncoding != WEAK_NULL ? 
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 +98,7 @@
 }
 
 static inline IMP SK_class_replaceMethod(Class aClass, SEL selector, IMP 
methodImp, const char *methodTypes) {
-    if (class_replaceMethod != kUnresolvedCFragSymbolAddress)
+    if (class_replaceMethod != WEAK_NULL)
         return class_replaceMethod(aClass, selector, methodImp, methodTypes);
     else
         return _SK_class_addMethod(aClass, selector, methodImp, methodTypes, 
YES);

Modified: trunk/SKTransitionController.m
===================================================================
--- trunk/SKTransitionController.m      2009-03-16 18:53:31 UTC (rev 5260)
+++ trunk/SKTransitionController.m      2009-03-16 22:18:30 UTC (rev 5261)
@@ -47,6 +47,8 @@
 #import <OpenGL/OpenGL.h>
 #import <OpenGL/gl.h>
 
+#define WEAK_NULL NULL
+
 #pragma mark Private Core Graphics types and functions
 
 typedef int CGSConnection;
@@ -101,10 +103,10 @@
 #pragma mark Check whether the above functions are actually defined at run time
 
 static BOOL CoreGraphicsServicesTransitionsDefined() {
-    return _CGSDefaultConnection != (void *)kUnresolvedCFragSymbolAddress &&
-           CGSNewTransition != (void *)kUnresolvedCFragSymbolAddress &&
-           CGSInvokeTransition != (void *)kUnresolvedCFragSymbolAddress &&
-           CGSReleaseTransition != (void *)kUnresolvedCFragSymbolAddress;
+    return _CGSDefaultConnection != WEAK_NULL &&
+           CGSNewTransition != WEAK_NULL &&
+           CGSInvokeTransition != WEAK_NULL &&
+           CGSReleaseTransition != WEAK_NULL;
 }
 
 #pragma mark -


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

Reply via email to