X-Git-Url: https://git.dogcows.com/gitweb?p=chaz%2Fthecheat;a=blobdiff_plain;f=ThreadedTask.m;fp=ThreadedTask.m;h=eefe568be3d4df9484210ecf0aeb662ce1c93639;hp=19a91abcd666aef372c4d98fc1375aab48baaa8a;hb=556707a7a26ac2dc4d10eff8e4b2abcc893cfce3;hpb=179538478d0db2e5f8f2b50ccb3ff889b474aa01 diff --git a/ThreadedTask.m b/ThreadedTask.m index 19a91ab..eefe568 100644 --- a/ThreadedTask.m +++ b/ThreadedTask.m @@ -3,7 +3,7 @@ // ThreadedTask 0.3 // Perform a long task without blocking the main thread. // -// Copyright (c) 2004-2005, Chaz McGarvey +// Copyright (c) 2004-2005, Charles McGarvey // All rights reserved. // // Redistribution and use in source and binary forms, with or without modification, are @@ -16,10 +16,6 @@ // list of conditions and the following disclaimer in the documentation and/or other // materials provided with the distribution. // -// 3. Neither the name of the BrokenZipper nor the names of its contributors may be -// used to endorse or promote products derived from this software without specific -// prior written permission. -// // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY // EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES // OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT @@ -31,9 +27,6 @@ // ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH // DAMAGE. // -// Web: http://www.brokenzipper.com/ -// Email: chaz@brokenzipper.com -// #import "ThreadedTask.h" @@ -298,8 +291,12 @@ NSAutoreleasePool *pool; unsigned iteration; +#if MAC_OS_X_VERSION_10_5 <= MAC_OS_X_VERSION_MAX_ALLOWED + NSInteger returnCode; +#else int returnCode; - +#endif + // create the ever-so-important pool pool = [[NSAutoreleasePool alloc] init]; @@ -317,7 +314,11 @@ // do the actual work loopPool = [[NSAutoreleasePool alloc] init]; +#if MAC_OS_X_VERSION_10_5 <= MAC_OS_X_VERSION_MAX_ALLOWED + returnCode = (NSInteger)objc_msgSend( _target, _selector, self, iteration ); +#else returnCode = (int)objc_msgSend( _target, _selector, self, iteration ); +#endif [loopPool release]; iteration++;