From 71342537cf20cb1663d215aa3d7ecb7301cd4abf Mon Sep 17 00:00:00 2001 From: Jonathan Schleifer Date: Fri, 18 Jul 2014 21:40:09 +0000 Subject: [PATCH] Adjust to ObjFW changes FossilOrigin-Name: bec524d06bdfb4ce57a88ef307fb1fc93eaa01201ff20c221814f404891d1009 --- PGConnection.m | 2 +- PGResultRow.m | 6 +++--- exceptions/PGException.m | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/PGConnection.m b/PGConnection.m index 1607c45..39232cb 100644 --- a/PGConnection.m +++ b/PGConnection.m @@ -114,7 +114,7 @@ OFNumber *number = parameter; switch ([number type]) { - case OF_NUMBER_BOOL: + case OF_NUMBER_TYPE_BOOL: if ([number boolValue]) values[i++] = "t"; else diff --git a/PGResultRow.m b/PGResultRow.m index fa868db..60b7d47 100644 --- a/PGResultRow.m +++ b/PGResultRow.m @@ -1,7 +1,7 @@ #import "PGResultRow.h" static id -convert_type(PGresult *res, int column, OFString *string) +convertType(PGresult *res, int column, OFString *string) { switch (PQftype(res, column)) { case 16: /* BOOLOID */ @@ -94,7 +94,7 @@ convert_type(PGresult *res, int column, OFString *string) if (PQgetisnull(_res, _row, column)) return nil; - return convert_type(_res, column, + return convertType(_res, column, [OFString stringWithUTF8String: PQgetvalue(_res, _row, column)]); } @@ -200,7 +200,7 @@ convert_type(PGresult *res, int column, OFString *string) if (_pos >= _count) return nil; - return convert_type(_res, _pos, + return convertType(_res, _pos, [OFString stringWithUTF8String: PQgetvalue(_res, _row, _pos++)]); } @end diff --git a/exceptions/PGException.m b/exceptions/PGException.m index 4225d0d..b21bed6 100644 --- a/exceptions/PGException.m +++ b/exceptions/PGException.m @@ -14,7 +14,7 @@ _connection = [connection retain]; _error = [[OFString alloc] initWithCString: PQerrorMessage([_connection PG_connection]) - encoding: OF_STRING_ENCODING_NATIVE]; + encoding: [OFString nativeOSEncoding]]; } @catch (id e) { [self release]; @throw e;