Skip to content

Commit

Permalink
Merge pull request #589 from robertmryan/master
Browse files Browse the repository at this point in the history
2.7.1
  • Loading branch information
ccgus authored Jun 4, 2017
2 parents d02456a + 61b9fb7 commit 6617390
Show file tree
Hide file tree
Showing 7 changed files with 27 additions and 8 deletions.
7 changes: 7 additions & 0 deletions CHANGES_AND_TODO_LIST.txt
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,13 @@ Zip, nada, zilch. Got any ideas?

If you would like to contribute some code ... awesome! I just ask that you make it conform to the coding conventions already set in here, and to add the necessary of tests for your new code to tests target. And of course, the code should be of general use to more than just a couple of folks. Send your patches to [email protected].


2017.06.01 Version 2.7.1

Adjust `valueLong` return type and `resultLong` parameter to suppress warning.

Fix pointer comparison to avoid static analysis warning in `columnIndexForName`.

2017.05.26 Version 2.7
Audited library for nullability, offering informational warnings for Objective-C users during static analysis, but significantly changes interface for Swift users, more accurately representing parameters and return values as optional or non-optional, as appropriate.

Expand Down
2 changes: 1 addition & 1 deletion FMDB.podspec
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
Pod::Spec.new do |s|
s.name = 'FMDB'
s.version = '2.7'
s.version = '2.7.1'
s.summary = 'A Cocoa / Objective-C wrapper around SQLite.'
s.homepage = 'https://github.com/ccgus/fmdb'
s.license = 'MIT'
Expand Down
2 changes: 1 addition & 1 deletion Tests/FMDatabaseTests.m
Original file line number Diff line number Diff line change
Expand Up @@ -1125,7 +1125,7 @@ - (void)createCustomFunctions {
}

- (void)testVersionNumber {
XCTAssertTrue([FMDatabase FMDBVersion] == 0x0270); // this is going to break everytime we bump it.
XCTAssertTrue([FMDatabase FMDBVersion] == 0x0271); // this is going to break everytime we bump it.
}

- (void)testExecuteStatements {
Expand Down
12 changes: 12 additions & 0 deletions fmdb.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -724,6 +724,7 @@
isa = XCBuildConfiguration;
buildSettings = {
CLANG_ENABLE_OBJC_ARC = YES;
CLANG_WARN_DOCUMENTATION_COMMENTS = YES;
CLANG_WARN_IMPLICIT_SIGN_CONVERSION = YES;
CLANG_WARN_OBJC_IMPLICIT_ATOMIC_PROPERTIES = YES;
CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES;
Expand All @@ -745,6 +746,7 @@
isa = XCBuildConfiguration;
buildSettings = {
CLANG_ENABLE_OBJC_ARC = YES;
CLANG_WARN_DOCUMENTATION_COMMENTS = YES;
CLANG_WARN_IMPLICIT_SIGN_CONVERSION = YES;
CLANG_WARN_OBJC_IMPLICIT_ATOMIC_PROPERTIES = YES;
CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES;
Expand Down Expand Up @@ -828,6 +830,7 @@
CLANG_ENABLE_MODULES = YES;
CLANG_ENABLE_OBJC_ARC = YES;
CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
CLANG_WARN_DOCUMENTATION_COMMENTS = YES;
CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
COPY_PHASE_STRIP = NO;
DSTROOT = /tmp/FMDB_IOS.dst;
Expand Down Expand Up @@ -860,6 +863,7 @@
CLANG_ENABLE_MODULES = YES;
CLANG_ENABLE_OBJC_ARC = YES;
CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
CLANG_WARN_DOCUMENTATION_COMMENTS = YES;
CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
COPY_PHASE_STRIP = YES;
DSTROOT = /tmp/FMDB_IOS.dst;
Expand Down Expand Up @@ -888,6 +892,7 @@
CLANG_ENABLE_MODULES = YES;
CLANG_ENABLE_OBJC_ARC = YES;
CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
CLANG_WARN_DOCUMENTATION_COMMENTS = YES;
CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "";
COPY_PHASE_STRIP = NO;
Expand Down Expand Up @@ -931,6 +936,7 @@
CLANG_ENABLE_MODULES = YES;
CLANG_ENABLE_OBJC_ARC = YES;
CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
CLANG_WARN_DOCUMENTATION_COMMENTS = YES;
CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "";
COPY_PHASE_STRIP = NO;
Expand Down Expand Up @@ -971,6 +977,7 @@
CLANG_ENABLE_MODULES = YES;
CLANG_ENABLE_OBJC_ARC = YES;
CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
CLANG_WARN_DOCUMENTATION_COMMENTS = YES;
CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
CODE_SIGN_IDENTITY = "-";
COMBINE_HIDPI_IMAGES = YES;
Expand Down Expand Up @@ -1014,6 +1021,7 @@
CLANG_ENABLE_MODULES = YES;
CLANG_ENABLE_OBJC_ARC = YES;
CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
CLANG_WARN_DOCUMENTATION_COMMENTS = YES;
CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
CODE_SIGN_IDENTITY = "-";
COMBINE_HIDPI_IMAGES = YES;
Expand Down Expand Up @@ -1053,6 +1061,7 @@
CLANG_ENABLE_OBJC_ARC = YES;
CLANG_WARN_BOOL_CONVERSION = YES;
CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
CLANG_WARN_DOCUMENTATION_COMMENTS = YES;
CLANG_WARN_EMPTY_BODY = YES;
CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
COMBINE_HIDPI_IMAGES = YES;
Expand Down Expand Up @@ -1097,6 +1106,7 @@
CLANG_ENABLE_OBJC_ARC = YES;
CLANG_WARN_BOOL_CONVERSION = YES;
CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
CLANG_WARN_DOCUMENTATION_COMMENTS = YES;
CLANG_WARN_EMPTY_BODY = YES;
CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
COMBINE_HIDPI_IMAGES = YES;
Expand Down Expand Up @@ -1130,6 +1140,7 @@
isa = XCBuildConfiguration;
buildSettings = {
ALWAYS_SEARCH_USER_PATHS = NO;
CLANG_WARN_DOCUMENTATION_COMMENTS = YES;
COMBINE_HIDPI_IMAGES = YES;
COPY_PHASE_STRIP = NO;
GCC_DYNAMIC_NO_PIC = NO;
Expand All @@ -1144,6 +1155,7 @@
isa = XCBuildConfiguration;
buildSettings = {
ALWAYS_SEARCH_USER_PATHS = NO;
CLANG_WARN_DOCUMENTATION_COMMENTS = YES;
COMBINE_HIDPI_IMAGES = YES;
COPY_PHASE_STRIP = YES;
DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
Expand Down
4 changes: 2 additions & 2 deletions src/fmdb/FMDatabase.h
Original file line number Diff line number Diff line change
Expand Up @@ -1065,14 +1065,14 @@ typedef NS_ENUM(int, SqliteValueType) {
- (SqliteValueType)valueType:(void *)argv;

- (int)valueInt:(void *)value;
- (long)valueLong:(void *)value;
- (long long)valueLong:(void *)value;
- (double)valueDouble:(void *)value;
- (NSData * _Nullable)valueData:(void *)value;
- (NSString * _Nullable)valueString:(void *)value;

- (void)resultNullInContext:(void *)context NS_SWIFT_NAME(resultNull(context:));
- (void)resultInt:(int) value context:(void *)context;
- (void)resultLong:(long)value context:(void *)context;
- (void)resultLong:(long long)value context:(void *)context;
- (void)resultDouble:(double)value context:(void *)context;
- (void)resultData:(NSData *)data context:(void *)context;
- (void)resultString:(NSString *)value context:(void *)context;
Expand Down
6 changes: 3 additions & 3 deletions src/fmdb/FMDatabase.m
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ - (NSURL *)databaseURL {
}

+ (NSString*)FMDBUserVersion {
return @"2.7.0";
return @"2.7.1";
}

// returns 0x0240 for version 2.4. This makes it super easy to do things like:
Expand Down Expand Up @@ -1491,7 +1491,7 @@ - (int)valueInt:(void *)value {
return sqlite3_value_int(value);
}

- (long)valueLong:(void *)value {
- (long long)valueLong:(void *)value {
return sqlite3_value_int64(value);
}

Expand All @@ -1518,7 +1518,7 @@ - (void)resultInt:(int) value context:(void *)context {
sqlite3_result_int(context, value);
}

- (void)resultLong:(long)value context:(void *)context {
- (void)resultLong:(long long)value context:(void *)context {
sqlite3_result_int64(context, value);
}

Expand Down
2 changes: 1 addition & 1 deletion src/fmdb/FMResultSet.m
Original file line number Diff line number Diff line change
Expand Up @@ -221,7 +221,7 @@ - (int)columnIndexForName:(NSString*)columnName {

NSNumber *n = [[self columnNameToIndexMap] objectForKey:columnName];

if (n) {
if (n != nil) {
return [n intValue];
}

Expand Down

0 comments on commit 6617390

Please sign in to comment.