Revision: 4173
          http://skim-app.svn.sourceforge.net/skim-app/?rev=4173&view=rev
Author:   hofman
Date:     2008-07-10 02:07:37 -0700 (Thu, 10 Jul 2008)

Log Message:
-----------
Don't make tool CG safe and set it to unsupported in the config file. There is 
no reason to use it anyway.

Modified Paths:
--------------
    trunk/SkimNotes/Configurations/SkimNotes-Tool.xcconfig
    trunk/SkimNotes/SKNAgentListener.m
    trunk/SkimNotes/SkimNotes.rtf
    trunk/SkimNotes/skimnotes.m

Modified: trunk/SkimNotes/Configurations/SkimNotes-Tool.xcconfig
===================================================================
--- trunk/SkimNotes/Configurations/SkimNotes-Tool.xcconfig      2008-07-10 
00:55:39 UTC (rev 4172)
+++ trunk/SkimNotes/Configurations/SkimNotes-Tool.xcconfig      2008-07-10 
09:07:37 UTC (rev 4173)
@@ -5,3 +5,6 @@
 
 GCC_PRECOMPILE_PREFIX_HEADER = YES
 GCC_PREFIX_HEADER = SkimNotes_Tool_Prefix.pch
+
+// the code for the tool is not GC safe, this should not be relevant anyway
+GCC_ENABLE_OBJC_GC = unsupported

Modified: trunk/SkimNotes/SKNAgentListener.m
===================================================================
--- trunk/SkimNotes/SKNAgentListener.m  2008-07-10 00:55:39 UTC (rev 4172)
+++ trunk/SkimNotes/SKNAgentListener.m  2008-07-10 09:07:37 UTC (rev 4173)
@@ -79,15 +79,6 @@
     [super dealloc];
 }
 
-#if defined(MAC_OS_X_VERSION_10_5) && MAC_OS_X_VERSION_MAX_ALLOWED >= 
MAC_OS_X_VERSION_10_5
-- (void)finalize
-{
-    [[NSNotificationCenter defaultCenter] removeObserver:self];
-    [self destroyConnection];
-    [super finalize];
-}
-#endif
-
 - (NSString *)notesFileWithExtension:(NSString *)extension atPath:(NSString 
*)path error:(NSError **)error {
     NSString *filePath = nil;
     

Modified: trunk/SkimNotes/SkimNotes.rtf
===================================================================
--- trunk/SkimNotes/SkimNotes.rtf       2008-07-10 00:55:39 UTC (rev 4172)
+++ trunk/SkimNotes/SkimNotes.rtf       2008-07-10 09:07:37 UTC (rev 4173)
@@ -101,6 +101,10 @@
 \b0 \
 \
 The built versions of the SkimNotes framework and skimnotes tool included in 
the release are built using the Release configuration.  This means that Garbage 
Collection (GC) and 64-bits are not supported.  The Xcode project has a build 
configuration called "Release (GC dual-mode)" that builds the framework with GC 
supported (not required) and includes a 64-bit binary for Intel.  The framework 
should be safe for GC and 64-bits when build with this configuration, but you 
should be aware that it has not been tested in these environment.  The 
framework built with this configuration requires Mac OSX 10.5.\
+\
+The tool will never use GC, even when built using the "Release (GC dual-mode)" 
build configuration.\
+\
+If you want to support 64-bits but not GC, you could create a new build 
configuration (at the project level) duplicated from Release, but based on the 
"SkimNotes-Release-64Bit" configuration (choose this in the popup at the bottom 
of the Build section of the project Info window).\
 
 \b \
 Smaller SkimNotes Framework

Modified: trunk/SkimNotes/skimnotes.m
===================================================================
--- trunk/SkimNotes/skimnotes.m 2008-07-10 00:55:39 UTC (rev 4172)
+++ trunk/SkimNotes/skimnotes.m 2008-07-10 09:07:37 UTC (rev 4173)
@@ -68,14 +68,6 @@
     return path;
 }
 
-#if !defined(MAC_OS_X_VERSION_10_5) || MAC_OS_X_VERSION_MAX_ALLOWED < 
MAC_OS_X_VERSION_10_5
-#define DRAIN(pool) [pool release]
-#elif MAC_OS_X_VERSION_MIN_REQUIRED < MAC_OS_X_VERSION_10_5
-#define DRAIN(pool) ([pool respondsToSelector:@selector(drain)] ? [pool drain] 
: [pool release])
-#else
-#define DRAIN(pool) [pool drain]
-#endif
-
 int main (int argc, const char * argv[]) {
     NSAutoreleasePool *pool = [NSAutoreleasePool new];
  
@@ -83,7 +75,7 @@
     
     if (argc < 2) {
         fprintf (stderr, "%s\n%s\n", usageStr, versionStr);
-        DRAIN(pool);
+        [pool release];
         exit (1);
     }
     
@@ -98,20 +90,14 @@
         
         NSRunLoop *rl = [NSRunLoop currentRunLoop];
         BOOL didRun;
-        NSDate *distantFuture = (id)CFRetain([NSDate distantFuture]);
         
-        [(id)CFRetain(listener) release];
-        
-        DRAIN(pool);
         do {
+            [pool release];
             pool = [NSAutoreleasePool new];
-            didRun = [rl runMode:NSDefaultRunLoopMode 
beforeDate:distantFuture];
-            DRAIN(pool);
+            didRun = [rl runMode:NSDefaultRunLoopMode beforeDate:[NSDate 
distantFuture]];
         } while (listener && didRun);
-        pool = [NSAutoreleasePool new];
         
-        CFRelease(listener);
-        CFRelease(distantFuture);
+        [listener release];
         
         success = YES;
         
@@ -159,7 +145,7 @@
         
         if (argc < 3) {
             fprintf (stderr, "%s\n%s\n", usageStr, versionStr);
-            DRAIN(pool);
+            [pool release];
             exit (1);
         }
         
@@ -170,7 +156,7 @@
         if ([[args objectAtIndex:2] isEqualToString:@"-format"]) {
             if (argc < 5) {
                 fprintf (stderr, "%s\n%s\n", usageStr, versionStr);
-                DRAIN(pool);
+                [pool release];
                 exit (1);
             }
             offset = 4;
@@ -273,7 +259,7 @@
         
     }
     
-    DRAIN(pool);
+    [pool release];
     
     return success ? 0 : 1;
 }


This was sent by the SourceForge.net collaborative development platform, the 
world's largest Open Source development site.

-------------------------------------------------------------------------
Sponsored by: SourceForge.net Community Choice Awards: VOTE NOW!
Studies have shown that voting for your favorite open source project,
along with a healthy diet, reduces your potential for chronic lameness
and boredom. Vote Now at http://www.sourceforge.net/community/cca08
_______________________________________________
Skim-app-commit mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/skim-app-commit

Reply via email to