From 66f9f09721647b635e4095c865653b8008c9552e Mon Sep 17 00:00:00 2001 From: stuconnolly Date: Sat, 8 Sep 2012 09:44:25 +0000 Subject: Revert logging changes. --- Frameworks/PostgresKit/Source/FLXPostgresConnection.m | 4 ++-- Frameworks/PostgresKit/Source/FLXPostgresConnectionEncoding.m | 2 +- Frameworks/PostgresKit/Source/FLXPostgresError.m | 2 +- Frameworks/PostgresKit/Source/FLXPostgresResult.h | 7 ++++--- Frameworks/PostgresKit/Source/FLXPostgresResult.m | 4 ++-- Frameworks/PostgresKit/Source/PostgresKit-Prefix.pch | 2 -- 6 files changed, 10 insertions(+), 11 deletions(-) (limited to 'Frameworks/PostgresKit') diff --git a/Frameworks/PostgresKit/Source/FLXPostgresConnection.m b/Frameworks/PostgresKit/Source/FLXPostgresConnection.m index de484802..d5d06c0f 100644 --- a/Frameworks/PostgresKit/Source/FLXPostgresConnection.m +++ b/Frameworks/PostgresKit/Source/FLXPostgresConnection.m @@ -336,7 +336,7 @@ static void _FLXPostgresConnectionNoticeProcessor(void *arg, const char *message // Register type extensions if (PQinitTypes(_connection)) { - _log(@"Failed initialise type extensions. Connection might return unexpected results!"); + NSLog(@"PostgresKit: Warning: Failed initialise type extensions. Connection might return unexpected results!"); } [self _loadDatabaseParameters]; @@ -360,7 +360,7 @@ static void _FLXPostgresConnectionNoticeProcessor(void *arg, const char *message BOOL success = [_parameters loadParameters]; - if (!success) _log(@"PostgresKit: Warning: Failed to load database parameters."); + if (!success) NSLog(@"PostgresKit: Warning: Failed to load database parameters."); } /** diff --git a/Frameworks/PostgresKit/Source/FLXPostgresConnectionEncoding.m b/Frameworks/PostgresKit/Source/FLXPostgresConnectionEncoding.m index 0566b8ef..ddecee64 100644 --- a/Frameworks/PostgresKit/Source/FLXPostgresConnectionEncoding.m +++ b/Frameworks/PostgresKit/Source/FLXPostgresConnectionEncoding.m @@ -147,7 +147,7 @@ return CFStringConvertEncodingToNSStringEncoding(kCFStringEncodingDOSThai); } - _log(@"PostgresKit: Warning: Unable to process unknown PostgreSQL encoding '%s'; falling back to UTF8.", charset); + NSLog(@"PostgresKit: Warning: Unable to process unknown PostgreSQL encoding '%s'; falling back to UTF8.", charset); return FLXPostgresConnectionDefaultStringEncoding; } diff --git a/Frameworks/PostgresKit/Source/FLXPostgresError.m b/Frameworks/PostgresKit/Source/FLXPostgresError.m index 033c56b0..927100f8 100644 --- a/Frameworks/PostgresKit/Source/FLXPostgresError.m +++ b/Frameworks/PostgresKit/Source/FLXPostgresError.m @@ -68,7 +68,7 @@ _errorMessageHint = nil; _errorStatementPosition = -1; - if (result) [self _extractErrorDetailsFromResult:(PGresult *)result]; + if (result) [self _extractErrorDetailsFromResult:(const PGresult *)result]; } return self; diff --git a/Frameworks/PostgresKit/Source/FLXPostgresResult.h b/Frameworks/PostgresKit/Source/FLXPostgresResult.h index 0e941a7a..b779e1b1 100644 --- a/Frameworks/PostgresKit/Source/FLXPostgresResult.h +++ b/Frameworks/PostgresKit/Source/FLXPostgresResult.h @@ -30,9 +30,10 @@ void **_typeHandlers; unsigned long long _row; - unsigned int _numberOfFields; unsigned long long _numberOfRows; + NSUInteger _numberOfFields; + NSString **_fields; NSStringEncoding _stringEncoding; @@ -43,7 +44,7 @@ /** * @property numberOfFields The number of fields this result has. */ -@property (readonly) unsigned int numberOfFields; +@property (readonly) NSUInteger numberOfFields; /** * @property numberOfRows The number or rows this result has. @@ -57,7 +58,7 @@ - (id)initWithResult:(void *)result connection:(FLXPostgresConnection *)connection; -- (unsigned int)numberOfFields; +- (NSUInteger)numberOfFields; - (void)seekToRow:(unsigned long long)row; diff --git a/Frameworks/PostgresKit/Source/FLXPostgresResult.m b/Frameworks/PostgresKit/Source/FLXPostgresResult.m index 5180a9cb..7136b819 100644 --- a/Frameworks/PostgresKit/Source/FLXPostgresResult.m +++ b/Frameworks/PostgresKit/Source/FLXPostgresResult.m @@ -176,7 +176,7 @@ static NSString *FLXPostgresResultError = @"FLXPostgresResultError"; { _fields = malloc(sizeof(NSString *) * _numberOfFields); - for (unsigned int i = 0; i < _numberOfFields; i++) + for (NSUInteger i = 0; i < _numberOfFields; i++) { const char *bytes = PQfname(_result, i); @@ -207,7 +207,7 @@ static NSString *FLXPostgresResultError = @"FLXPostgresResultError"; id handler = [self _typeHandlerForColumn:column withType:type]; if (!handler) { - _log(@"PostgresKit: Warning: No type handler found for type %d, return NSData.", type); + NSLog(@"PostgresKit: Warning: No type handler found for type %d, return NSData.", type); const void *bytes = PQgetvalue(_result, row, column); NSUInteger length = PQgetlength(_result, row, column); diff --git a/Frameworks/PostgresKit/Source/PostgresKit-Prefix.pch b/Frameworks/PostgresKit/Source/PostgresKit-Prefix.pch index 04232f8a..093e3126 100644 --- a/Frameworks/PostgresKit/Source/PostgresKit-Prefix.pch +++ b/Frameworks/PostgresKit/Source/PostgresKit-Prefix.pch @@ -34,6 +34,4 @@ // Global types #import "FLXPostgresTypes.h" - - #define _log(x) NSLog(@"PostgresKit: Warning: %@", x); #endif -- cgit v1.2.3