diff options
-rw-r--r-- | Modules/_sqlite/cache.h | 3 | ||||
-rw-r--r-- | Modules/_sqlite/module.h | 1 | ||||
-rw-r--r-- | Modules/_sqlite/prepare_protocol.h | 3 | ||||
-rw-r--r-- | PCbuild/_sqlite3.vcxproj | 1 | ||||
-rw-r--r-- | setup.py | 5 |
5 files changed, 3 insertions, 10 deletions
diff --git a/Modules/_sqlite/cache.h b/Modules/_sqlite/cache.h index 4a1977f..083356f 100644 --- a/Modules/_sqlite/cache.h +++ b/Modules/_sqlite/cache.h @@ -23,8 +23,7 @@ #ifndef PYSQLITE_CACHE_H #define PYSQLITE_CACHE_H -#define PY_SSIZE_T_CLEAN -#include "Python.h" +#include "module.h" /* The LRU cache is implemented as a combination of a doubly-linked with a * dictionary. The list items are of type 'Node' and the dictionary has the diff --git a/Modules/_sqlite/module.h b/Modules/_sqlite/module.h index 3185ec9..9aede92 100644 --- a/Modules/_sqlite/module.h +++ b/Modules/_sqlite/module.h @@ -27,6 +27,7 @@ #include "Python.h" #define PYSQLITE_VERSION "2.6.0" +#define MODULE_NAME "sqlite3" extern PyObject* pysqlite_Error; extern PyObject* pysqlite_Warning; diff --git a/Modules/_sqlite/prepare_protocol.h b/Modules/_sqlite/prepare_protocol.h index 42d07cb..5939613 100644 --- a/Modules/_sqlite/prepare_protocol.h +++ b/Modules/_sqlite/prepare_protocol.h @@ -23,8 +23,7 @@ #ifndef PYSQLITE_PREPARE_PROTOCOL_H #define PYSQLITE_PREPARE_PROTOCOL_H -#define PY_SSIZE_T_CLEAN -#include "Python.h" +#include "module.h" typedef struct { diff --git a/PCbuild/_sqlite3.vcxproj b/PCbuild/_sqlite3.vcxproj index 7e00626..5eb8559 100644 --- a/PCbuild/_sqlite3.vcxproj +++ b/PCbuild/_sqlite3.vcxproj @@ -94,7 +94,6 @@ <ItemDefinitionGroup> <ClCompile> <AdditionalIncludeDirectories>$(sqlite3Dir);%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> - <PreprocessorDefinitions>MODULE_NAME="sqlite3";%(PreprocessorDefinitions)</PreprocessorDefinitions> </ClCompile> </ItemDefinitionGroup> <ItemGroup> @@ -1571,12 +1571,7 @@ class PyBuildExt(build_ext): '_sqlite/row.c', '_sqlite/statement.c', '_sqlite/util.c', ] - sqlite_defines = [] - if not MS_WINDOWS: - sqlite_defines.append(('MODULE_NAME', '"sqlite3"')) - else: - sqlite_defines.append(('MODULE_NAME', '\\"sqlite3\\"')) # Enable support for loadable extensions in the sqlite3 module # if --enable-loadable-sqlite-extensions configure option is used. |