Skip to content

Commit

Permalink
fixed a few things for OS X 10.7 Lion
Browse files Browse the repository at this point in the history
  • Loading branch information
drjokepu committed Jun 7, 2013
1 parent 9824131 commit 08c35ad
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 3 deletions.
2 changes: 1 addition & 1 deletion PostgreSQL Inspector/PostgreSQL Inspector/PGDatabase.h
Expand Up @@ -20,7 +20,7 @@
@property (nonatomic, strong) NSArray *schemaObjectGroups;
@property (nonatomic, strong) NSArray *roles;
@property (nonatomic, assign) NSInteger publicSchemaIndex;
@property (nonatomic, weak) id<PGDatabaseDelegate> delegate;
@property (nonatomic, unsafe_unretained) id<PGDatabaseDelegate> delegate;

-(id)initWithConnectionEntry:(PGConnectionEntry*)theConnectionEntry;
-(void)loadSchema:(PGConnection*)connection;
Expand Down
2 changes: 1 addition & 1 deletion PostgreSQL Inspector/PostgreSQL Inspector/PGUUID.h
Expand Up @@ -10,7 +10,7 @@

bool system_has_NSUUID(void);

@interface PGUUID : NSObject
@interface PGUUID : NSObject <NSCopying>

+(id)UUID;
-(id)init;
Expand Down
7 changes: 7 additions & 0 deletions PostgreSQL Inspector/PostgreSQL Inspector/PGUUID.m
Expand Up @@ -101,6 +101,13 @@ -(void)getUUIDBytes:(uuid_t)uuidBytes
uuidBytes[15] = cfBytes.byte15;
}

-(id)copyWithZone:(NSZone *)zone
{
uuid_t cfBytes;
[self getUUIDBytes:cfBytes];
return [[PGUUID alloc] initWithUUIDBytes:cfBytes];
}

@end

bool system_has_NSUUID(void)
Expand Down
Expand Up @@ -14,7 +14,7 @@ @implementation PGUUIDFormatter

-(NSString *)stringForObjectValue:(id)obj
{
if ([obj isKindOfClass:[NSUUID class]] || [obj isKindOfClass:[PGUUID class]])
if ((system_has_NSUUID() && [obj isKindOfClass:[NSUUID class]]) || [obj isKindOfClass:[PGUUID class]])
{
NSString *str = [obj UUIDString];
if (![PGUserDefaults uppercaseUUIDs])
Expand Down

0 comments on commit 08c35ad

Please sign in to comment.