Index: generators/TableGenerator.h ================================================================== --- generators/TableGenerator.h +++ generators/TableGenerator.h @@ -22,12 +22,12 @@ { of_unichar_t uppercaseTable[0x110000]; of_unichar_t lowercaseTable[0x110000]; of_unichar_t titlecaseTable[0x110000]; of_unichar_t casefoldingTable[0x110000]; - BOOL uppercaseTableUsed[0x1100]; - BOOL lowercaseTableUsed[0x1100]; + char uppercaseTableUsed[0x1100]; + char lowercaseTableUsed[0x1100]; char titlecaseTableUsed[0x1100]; char casefoldingTableUsed[0x1100]; size_t uppercaseTableSize; size_t lowercaseTableSize; size_t titlecaseTableSize; Index: generators/TableGenerator.m ================================================================== --- generators/TableGenerator.m +++ generators/TableGenerator.m @@ -184,11 +184,11 @@ for (j = i; j < i + 0x100; j++) { if (uppercaseTable[j] != 0) { isEmpty = false; uppercaseTableSize = i >> 8; - uppercaseTableUsed[uppercaseTableSize] = YES; + uppercaseTableUsed[uppercaseTableSize] = 1; break; } } if (!isEmpty) { @@ -222,11 +222,11 @@ for (j = i; j < i + 0x100; j++) { if (lowercaseTable[j] != 0) { isEmpty = false; lowercaseTableSize = i >> 8; - lowercaseTableUsed[lowercaseTableSize] = YES; + lowercaseTableUsed[lowercaseTableSize] = 1; break; } } if (!isEmpty) { Index: src/OFArray_adjacent.m ================================================================== --- src/OFArray_adjacent.m +++ src/OFArray_adjacent.m @@ -215,24 +215,32 @@ return [_array items]; } - (id)objectAtIndex: (size_t)index { + id ret; + @try { - return *((id*)[_array itemAtIndex: index]); + ret = *((id*)[_array itemAtIndex: index]); } @catch (OFOutOfRangeException *e) { @throw [OFOutOfRangeException exceptionWithClass: [self class]]; } + + return ret; } - (id)objectAtIndexedSubscript: (size_t)index { + id ret; + @try { - return *((id*)[_array itemAtIndex: index]); + ret = *((id*)[_array itemAtIndex: index]); } @catch (OFOutOfRangeException *e) { @throw [OFOutOfRangeException exceptionWithClass: [self class]]; } + + return ret; } - (void)getObjects: (id*)buffer inRange: (of_range_t)range { Index: src/OFDictionary_hashtable.m ================================================================== --- src/OFDictionary_hashtable.m +++ src/OFDictionary_hashtable.m @@ -305,17 +305,21 @@ [super dealloc]; } - (id)objectForKey: (id)key { + id ret; + @try { - return [_mapTable valueForKey: key]; + ret = [_mapTable valueForKey: key]; } @catch (OFInvalidArgumentException *e) { @throw [OFInvalidArgumentException exceptionWithClass: [self class] selector: _cmd]; } + + return ret; } - (size_t)count { return [_mapTable count]; Index: src/bridge/NSArray_OFArray.m ================================================================== --- src/bridge/NSArray_OFArray.m +++ src/bridge/NSArray_OFArray.m @@ -36,11 +36,11 @@ - (id)objectAtIndex: (NSUInteger)index { id object = [_array objectAtIndex: index]; - if ([object conformsToProtocol: @protocol(OFBridging)]) + if ([(OFObject*)object conformsToProtocol: @protocol(OFBridging)]) return [object NSObject]; return object; } Index: src/bridge/NSDictionary_OFDictionary.m ================================================================== --- src/bridge/NSDictionary_OFDictionary.m +++ src/bridge/NSDictionary_OFDictionary.m @@ -38,16 +38,16 @@ - (id)objectForKey: (id)key { id object; - if ([key conformsToProtocol: @protocol(NSBridging)]) + if ([(NSObject*)key conformsToProtocol: @protocol(NSBridging)]) key = [key OFObject]; object = [_dictionary objectForKey: key]; - if ([object conformsToProtocol: @protocol(OFBridging)]) + if ([(OFObject*)object conformsToProtocol: @protocol(OFBridging)]) return [object NSObject]; return object; } Index: src/bridge/OFArray_NSArray.m ================================================================== --- src/bridge/OFArray_NSArray.m +++ src/bridge/OFArray_NSArray.m @@ -48,11 +48,11 @@ if (index > NSUIntegerMax) @throw [OFOutOfRangeException exceptionWithClass: [self class]]; object = [_array objectAtIndex: index]; - if ([object conformsToProtocol: @protocol(NSBridging)]) + if ([(NSObject*)object conformsToProtocol: @protocol(NSBridging)]) return [object OFObject]; return object; } Index: src/bridge/OFDictionary_NSDictionary.m ================================================================== --- src/bridge/OFDictionary_NSDictionary.m +++ src/bridge/OFDictionary_NSDictionary.m @@ -44,16 +44,16 @@ - (id)objectForKey: (id)key { id object; - if ([key conformsToProtocol: @protocol(OFBridging)]) + if ([(OFObject*)key conformsToProtocol: @protocol(OFBridging)]) key = [key NSObject]; object = [_dictionary objectForKey: key]; - if ([object conformsToProtocol: @protocol(NSBridging)]) + if ([(NSObject*)object conformsToProtocol: @protocol(NSBridging)]) return [object OFObject]; return object; }