Skip to content

Commit 86985df

Browse files
committed
Fix nullptr detection with AppleClang
1 parent 48740ac commit 86985df

File tree

4 files changed

+4
-3
lines changed

4 files changed

+4
-3
lines changed

.travis.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# Copyright (c) 2012-2016 Sebastien Rombauts ([email protected])
1+
# Copyright (c) 2012-2017 Sebastien Rombauts ([email protected])
22

33
# request for Ubuntu 14.04 Trusty VM
44
sudo: true

CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -125,7 +125,7 @@ set(SQLITECPP_INC
125125
${PROJECT_SOURCE_DIR}/include/SQLiteCpp/Utils.h
126126
${PROJECT_SOURCE_DIR}/include/SQLiteCpp/VariadicBind.h
127127
)
128-
source_group(inc FILES ${SQLITECPP_INC})
128+
source_group(include FILES ${SQLITECPP_INC})
129129

130130
# list of test files of the library
131131
set(SQLITECPP_TESTS

include/SQLiteCpp/Utils.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,7 @@
3030
#define nullptr NULL
3131
#endif // nullptr
3232
#endif // _MSC_VER < 1600
33+
#elif defined(__APPLE__) // AppleClang
3334
#elif defined(__clang__) && __has_feature(cxx_nullptr) // Clang 3.0+
3435
#else // GCC or older Clang
3536
#if (__cplusplus < 201103L) && !defined(__GXX_EXPERIMENTAL_CXX0X__) // before C++11 on GCC4.7 and Visual Studio 2010

src/Database.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -217,7 +217,7 @@ void Database::loadExtension(const char* apExtensionName, const char *apEntryPoi
217217

218218
throw std::runtime_error("sqlite extensions are disabled");
219219
#else
220-
#ifdef SQLITE_DBCONFIG_ENABLE_LOAD_EXTENSION // Since SQLite 3.13 (2017-05-18):
220+
#ifdef SQLITE_DBCONFIG_ENABLE_LOAD_EXTENSION // Since SQLite 3.13 (2016-05-18):
221221
// Security warning:
222222
// It is recommended that the SQLITE_DBCONFIG_ENABLE_LOAD_EXTENSION method be used to enable only this interface.
223223
// The use of the sqlite3_enable_load_extension() interface should be avoided to keep the SQL load_extension()

0 commit comments

Comments
 (0)