Skip to content

Commit 841a72a

Browse files
author
Erlend E. Aasland
committed
Only include Python.h in module.h
1 parent 004d092 commit 841a72a

11 files changed

Lines changed: 14 additions & 20 deletions

File tree

Modules/_sqlite/connection.h

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -23,13 +23,12 @@
2323

2424
#ifndef PYSQLITE_CONNECTION_H
2525
#define PYSQLITE_CONNECTION_H
26-
#define PY_SSIZE_T_CLEAN
27-
#include "Python.h"
28-
#include "pythread.h"
29-
#include "structmember.h"
3026

3127
#include "module.h"
3228

29+
#include "pythread.h"
30+
#include "structmember.h"
31+
3332
#include "sqlite3.h"
3433

3534
typedef struct _callback_context

Modules/_sqlite/cursor.c

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,6 @@
2222
*/
2323

2424
#include "cursor.h"
25-
#include "module.h"
2625
#include "util.h"
2726

2827
#define clinic_state() (pysqlite_get_state_by_type(Py_TYPE(self)))

Modules/_sqlite/cursor.h

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -23,12 +23,10 @@
2323

2424
#ifndef PYSQLITE_CURSOR_H
2525
#define PYSQLITE_CURSOR_H
26-
#define PY_SSIZE_T_CLEAN
27-
#include "Python.h"
2826

27+
#include "module.h"
2928
#include "statement.h"
3029
#include "connection.h"
31-
#include "module.h"
3230

3331
typedef struct
3432
{

Modules/_sqlite/microprotocols.c

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -23,10 +23,8 @@
2323
* 3. This notice may not be removed or altered from any source distribution.
2424
*/
2525

26-
#include <Python.h>
27-
28-
#include "cursor.h"
2926
#include "microprotocols.h"
27+
#include "cursor.h"
3028
#include "prepare_protocol.h"
3129

3230

Modules/_sqlite/microprotocols.h

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,8 +26,7 @@
2626
#ifndef PSYCOPG_MICROPROTOCOLS_H
2727
#define PSYCOPG_MICROPROTOCOLS_H 1
2828

29-
#define PY_SSIZE_T_CLEAN
30-
#include <Python.h>
29+
#include "module.h"
3130

3231
/** exported functions **/
3332

Modules/_sqlite/module.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@
2121
* 3. This notice may not be removed or altered from any source distribution.
2222
*/
2323

24+
#include "module.h"
2425
#include "connection.h"
2526
#include "statement.h"
2627
#include "cursor.h"

Modules/_sqlite/prepare_protocol.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@
2323

2424
#ifndef PYSQLITE_PREPARE_PROTOCOL_H
2525
#define PYSQLITE_PREPARE_PROTOCOL_H
26+
2627
#include "module.h"
2728

2829
typedef struct

Modules/_sqlite/row.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,8 +23,8 @@
2323

2424
#ifndef PYSQLITE_ROW_H
2525
#define PYSQLITE_ROW_H
26-
#define PY_SSIZE_T_CLEAN
27-
#include "Python.h"
26+
27+
#include "module.h"
2828

2929
typedef struct _Row
3030
{

Modules/_sqlite/statement.h

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,9 +23,8 @@
2323

2424
#ifndef PYSQLITE_STATEMENT_H
2525
#define PYSQLITE_STATEMENT_H
26-
#define PY_SSIZE_T_CLEAN
27-
#include "Python.h"
2826

27+
#include "module.h"
2928
#include "connection.h"
3029
#include "sqlite3.h"
3130

Modules/_sqlite/util.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@
2121
* 3. This notice may not be removed or altered from any source distribution.
2222
*/
2323

24-
#include "module.h"
24+
#include "util.h"
2525
#include "connection.h"
2626

2727
int

0 commit comments

Comments
 (0)