mirror of https://github.com/python/cpython
bpo-43444: Move sqlite3 MODULE_NAME from setup.py to module.h (GH-24801)
This commit is contained in:
parent
75048c8a38
commit
2256a2876b
|
@ -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
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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
|
||||
{
|
||||
|
|
|
@ -94,7 +94,6 @@
|
|||
<ItemDefinitionGroup>
|
||||
<ClCompile>
|
||||
<AdditionalIncludeDirectories>$(sqlite3Dir);%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<PreprocessorDefinitions>MODULE_NAME="sqlite3";%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
</ClCompile>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemGroup>
|
||||
|
|
5
setup.py
5
setup.py
|
@ -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.
|
||||
|
|
Loading…
Reference in New Issue