Permalink
Browse files

Updated for 32/64 bit architecture. Note that direct obj-c isa access…

… is deprecated in the modern runtime. These warnings have not yet been resolved as there may be performance penalties on all arithmetic. However, the change may be necessary.
  • Loading branch information...
1 parent dbe71da commit 6bfb258e34f7b7b90386c7e78dc4310096665123 @mugginsoft committed Nov 25, 2012
View

Large diffs are not rendered by default.

Oops, something went wrong.
@@ -2,7 +2,7 @@
/* This software is open source. See the license. */
#import "FSNewlyAllocatedObject.h"
-
+#import <objc/objc-runtime.h>
@implementation FSNewlyAllocatedObject
@@ -13,7 +13,7 @@ + (id)newlyAllocatedObjectWithTarget:(id)theTarget
- (NSString *)description
{
- return [[@"Proxy for a newly allocated " stringByAppendingString:NSStringFromClass(target->isa)] stringByAppendingString:@". Don't forget to initialize it and to use the object returned by the init... method instead of this proxy." ];
+ return [[@"Proxy for a newly allocated " stringByAppendingString:NSStringFromClass(object_getClass(target))] stringByAppendingString:@". Don't forget to initialize it and to use the object returned by the init... method instead of this proxy." ];
}
- (void)forwardInvocation:(NSInvocation *)anInvocation
@@ -3627,7 +3627,7 @@
8F2881E908F9C040005B3C5A /* Debug */ = {
isa = XCBuildConfiguration;
buildSettings = {
- ARCHS = "$(NATIVE_ARCH)";
+ ARCHS = "$(ARCHS_STANDARD_32_64_BIT)";
COMBINE_HIDPI_IMAGES = YES;
COPY_PHASE_STRIP = "$(value) NO";
DYLIB_COMPATIBILITY_VERSION = 1;
@@ -3666,6 +3666,7 @@
8F2881EA08F9C040005B3C5A /* Release */ = {
isa = XCBuildConfiguration;
buildSettings = {
+ ARCHS = "$(ARCHS_STANDARD_32_64_BIT)";
COMBINE_HIDPI_IMAGES = YES;
COPY_PHASE_STRIP = YES;
DYLIB_COMPATIBILITY_VERSION = 1;
@@ -3868,7 +3869,7 @@
isa = XCBuildConfiguration;
buildSettings = {
ALWAYS_SEARCH_USER_PATHS = NO;
- ARCHS = "$(ARCHS_STANDARD_64_BIT)";
+ ARCHS = "$(ARCHS_STANDARD_32_64_BIT)";
GCC_C_LANGUAGE_STANDARD = gnu99;
GCC_ENABLE_CPP_EXCEPTIONS = NO;
GCC_ENABLE_CPP_RTTI = NO;
@@ -3902,10 +3903,7 @@
isa = XCBuildConfiguration;
buildSettings = {
ALWAYS_SEARCH_USER_PATHS = NO;
- ARCHS = (
- x86_64,
- i386,
- );
+ ARCHS = "$(ARCHS_STANDARD_32_64_BIT)";
GCC_C_LANGUAGE_STANDARD = gnu99;
GCC_ENABLE_CPP_EXCEPTIONS = NO;
GCC_ENABLE_CPP_RTTI = NO;
@@ -3920,7 +3918,6 @@
MACOSX_DEPLOYMENT_TARGET = 10.6;
OTHER_LDFLAGS = "";
SDKROOT = macosx;
- VALID_ARCHS = "i386 x86_64";
};
name = Release;
};
@@ -85,7 +85,7 @@ - (NSString *)description
break;
}
- [r appendFormat:@", \n subnodeList ( %ld elements)", [subnodes count]];
+ [r appendFormat:@", \n subnodeList ( %ld elements)", (long)[subnodes count]];
for (i = 0; i < [subnodes count]; i++)
[r appendString:[[subnodes objectAtIndex:i] description]];
@@ -2,7 +2,7 @@
/* This software is open source. See the license. */
#import "FSNewlyAllocatedObjectHolder.h"
-
+#import <objc/objc-runtime.h>
@implementation FSNewlyAllocatedObjectHolder
@@ -25,7 +25,7 @@ - (id)object {return object;}
- (NSString *)printString
{
- return [[@"Holder for a newly allocated " stringByAppendingString:NSStringFromClass(object->isa)] stringByAppendingString:@". Don't forget to initialize it (use an init... method) and to use the object returned by the init... method instead of this holder." ];
+ return [[@"Holder for a newly allocated " stringByAppendingString:NSStringFromClass(object_getClass(object))] stringByAppendingString:@". Don't forget to initialize it (use an init... method) and to use the object returned by the init... method instead of this holder." ];
}
@end
@@ -365,7 +365,7 @@ + (NSInteger *)pointer
{ NSLog(@"TestFS return %p", &p); return &p;}
+ (NSInteger *)pointerWith:object with:(NSInteger)i
-{ NSLog(@"object received: %@, int received:%ld . TestFS return %p",object, i, &p); return &p;}
+{ NSLog(@"object received: %@, int received:%ld . TestFS return %p",object, (long)i, &p); return &p;}
+ (void) setPValue:(NSInteger)new
{ p = new; }
@@ -375,7 +375,7 @@ + (NSInteger)pValue {return p;}
+ (void)setPointer:(NSInteger *)p
{
NSLog(@"setPointer: received pointer to %p", p);
- NSLog(@"%ld",*p);
+ NSLog(@"%ld", (long)*p);
}
+ (FSPointer *)fsPointer

0 comments on commit 6bfb258

Please sign in to comment.