aboutsummaryrefslogtreecommitdiffstats
path: root/Frameworks/PostgresKit
diff options
context:
space:
mode:
Diffstat (limited to 'Frameworks/PostgresKit')
-rw-r--r--Frameworks/PostgresKit/Source/PGPostgresTypeBinaryHandler.m2
-rw-r--r--Frameworks/PostgresKit/Source/PGPostgresTypeNumberHandler.m18
2 files changed, 12 insertions, 8 deletions
diff --git a/Frameworks/PostgresKit/Source/PGPostgresTypeBinaryHandler.m b/Frameworks/PostgresKit/Source/PGPostgresTypeBinaryHandler.m
index 6c40ca14..aab09b54 100644
--- a/Frameworks/PostgresKit/Source/PGPostgresTypeBinaryHandler.m
+++ b/Frameworks/PostgresKit/Source/PGPostgresTypeBinaryHandler.m
@@ -67,7 +67,7 @@ static PGPostgresOid PGPostgresTypeBinaryTypes[] =
if (!_result || !_type) return [NSNull null];
- if (!PQgetf(_result, _row, PGPostgresResultValueByteA, _column)) return [NSNull null];
+ if (!PQgetf(_result, (int)_row, PGPostgresResultValueByteA, (int)_column, &data)) return [NSNull null];
if (!data.data || !data.len) return [NSData data];
diff --git a/Frameworks/PostgresKit/Source/PGPostgresTypeNumberHandler.m b/Frameworks/PostgresKit/Source/PGPostgresTypeNumberHandler.m
index 106fce21..f3eddb69 100644
--- a/Frameworks/PostgresKit/Source/PGPostgresTypeNumberHandler.m
+++ b/Frameworks/PostgresKit/Source/PGPostgresTypeNumberHandler.m
@@ -113,15 +113,15 @@ static PGPostgresOid PGPostgresTypeNumberTypes[] =
switch (length)
{
case 2:
- if (!PQgetf(_result, _row, PGPostgresResultValueInt2, &int2)) return [NSNull null];
+ if (!PQgetf(_result, (int)_row, PGPostgresResultValueInt2, (int)_column, &int2)) return [NSNull null];
return [NSNumber numberWithShort:int2];
case 4:
- if (!PQgetf(_result, _row, PGPostgresResultValueInt4, &int4)) return [NSNull null];
+ if (!PQgetf(_result, (int)_row, PGPostgresResultValueInt4, (int)_column, &int4)) return [NSNull null];
return [NSNumber numberWithInteger:int4];
case 8:
- if (!PQgetf(_result, _row, PGPostgresResultValueInt8, &int8)) return [NSNull null];
+ if (!PQgetf(_result, (int)_row, PGPostgresResultValueInt8, (int)_column, &int8)) return [NSNull null];
return [NSNumber numberWithLongLong:int8];
}
@@ -149,11 +149,11 @@ static PGPostgresOid PGPostgresTypeNumberTypes[] =
switch (length)
{
case 4:
- if (!PQgetf(_result, _row, PGPostgresResultValueFloat4, &float4)) return [NSNull null];
+ if (!PQgetf(_result, (int)_row, PGPostgresResultValueFloat4, (int)_column, &float4)) return [NSNull null];
return [NSNumber numberWithFloat:float4];
case 8:
- if (!PQgetf(_result, _row, PGPostgresResultValueFloat8, &float8)) return [NSNull null];
+ if (!PQgetf(_result, (int)_row, PGPostgresResultValueFloat8, (int)_column, &float8)) return [NSNull null];
return [NSNumber numberWithDouble:float8];
}
@@ -173,7 +173,7 @@ static PGPostgresOid PGPostgresTypeNumberTypes[] =
{
PGbool b;
- if (!PQgetf(_result, _row, PGPostgresResultValueBool, &b)) return [NSNull null];
+ if (!PQgetf(_result, (int)_row, PGPostgresResultValueBool, (int)_column, &b)) return [NSNull null];
return [NSNumber numberWithInt:b];
}
@@ -196,7 +196,11 @@ static PGPostgresOid PGPostgresTypeNumberTypes[] =
double value = [stringValue doubleValue];
- if (value == HUGE_VAL || value == -HUGE_VAL) return [NSNull null];
+ if (value == HUGE_VAL || value == -HUGE_VAL) {
+ [stringValue release];
+
+ return [NSNull null];
+ }
[stringValue release];