summaryrefslogtreecommitdiff
path: root/Modules/_sqlite
diff options
context:
space:
mode:
authorInada Naoki <songofacandy@gmail.com>2019-03-19 22:10:18 +0900
committerGitHub <noreply@github.com>2019-03-19 22:10:18 +0900
commit29198ea1c6d58f87389136b0ac0b8b2318dbac24 (patch)
tree397e7f507defd165cc106b44feb864df50c47aab /Modules/_sqlite
parent943395fab925a11ea90d078e771cdfc4443e8c34 (diff)
downloadcpython-git-29198ea1c6d58f87389136b0ac0b8b2318dbac24.tar.gz
bpo-8677: use PY_SSIZE_T_CLEAN in sqlite (GH-12434)
Modules/_sqlite/cursor.c uses "y#" format. It didn't declare PY_SSIZE_T_CLEAN, but the argument is Py_ssize_t already.
Diffstat (limited to 'Modules/_sqlite')
-rw-r--r--Modules/_sqlite/cache.h1
-rw-r--r--Modules/_sqlite/connection.h1
-rw-r--r--Modules/_sqlite/cursor.h1
-rw-r--r--Modules/_sqlite/microprotocols.h1
-rw-r--r--Modules/_sqlite/module.h1
-rw-r--r--Modules/_sqlite/prepare_protocol.h1
-rw-r--r--Modules/_sqlite/row.h1
-rw-r--r--Modules/_sqlite/statement.h1
-rw-r--r--Modules/_sqlite/util.h1
9 files changed, 9 insertions, 0 deletions
diff --git a/Modules/_sqlite/cache.h b/Modules/_sqlite/cache.h
index a133903961..529010967c 100644
--- a/Modules/_sqlite/cache.h
+++ b/Modules/_sqlite/cache.h
@@ -23,6 +23,7 @@
#ifndef PYSQLITE_CACHE_H
#define PYSQLITE_CACHE_H
+#define PY_SSIZE_T_CLEAN
#include "Python.h"
/* The LRU cache is implemented as a combination of a doubly-linked with a
diff --git a/Modules/_sqlite/connection.h b/Modules/_sqlite/connection.h
index 5fb410a62e..4e9d94c5f3 100644
--- a/Modules/_sqlite/connection.h
+++ b/Modules/_sqlite/connection.h
@@ -23,6 +23,7 @@
#ifndef PYSQLITE_CONNECTION_H
#define PYSQLITE_CONNECTION_H
+#define PY_SSIZE_T_CLEAN
#include "Python.h"
#include "pythread.h"
#include "structmember.h"
diff --git a/Modules/_sqlite/cursor.h b/Modules/_sqlite/cursor.h
index 28bbd5f911..4a20e756f7 100644
--- a/Modules/_sqlite/cursor.h
+++ b/Modules/_sqlite/cursor.h
@@ -23,6 +23,7 @@
#ifndef PYSQLITE_CURSOR_H
#define PYSQLITE_CURSOR_H
+#define PY_SSIZE_T_CLEAN
#include "Python.h"
#include "statement.h"
diff --git a/Modules/_sqlite/microprotocols.h b/Modules/_sqlite/microprotocols.h
index 99ff6f642b..5418c2b98f 100644
--- a/Modules/_sqlite/microprotocols.h
+++ b/Modules/_sqlite/microprotocols.h
@@ -26,6 +26,7 @@
#ifndef PSYCOPG_MICROPROTOCOLS_H
#define PSYCOPG_MICROPROTOCOLS_H 1
+#define PY_SSIZE_T_CLEAN
#include <Python.h>
/** the names of the three mandatory methods **/
diff --git a/Modules/_sqlite/module.h b/Modules/_sqlite/module.h
index 6f90934b32..3185ec9788 100644
--- a/Modules/_sqlite/module.h
+++ b/Modules/_sqlite/module.h
@@ -23,6 +23,7 @@
#ifndef PYSQLITE_MODULE_H
#define PYSQLITE_MODULE_H
+#define PY_SSIZE_T_CLEAN
#include "Python.h"
#define PYSQLITE_VERSION "2.6.0"
diff --git a/Modules/_sqlite/prepare_protocol.h b/Modules/_sqlite/prepare_protocol.h
index 924e16223a..3998a55e51 100644
--- a/Modules/_sqlite/prepare_protocol.h
+++ b/Modules/_sqlite/prepare_protocol.h
@@ -23,6 +23,7 @@
#ifndef PYSQLITE_PREPARE_PROTOCOL_H
#define PYSQLITE_PREPARE_PROTOCOL_H
+#define PY_SSIZE_T_CLEAN
#include "Python.h"
typedef struct
diff --git a/Modules/_sqlite/row.h b/Modules/_sqlite/row.h
index d014109032..4ad506f8dd 100644
--- a/Modules/_sqlite/row.h
+++ b/Modules/_sqlite/row.h
@@ -23,6 +23,7 @@
#ifndef PYSQLITE_ROW_H
#define PYSQLITE_ROW_H
+#define PY_SSIZE_T_CLEAN
#include "Python.h"
typedef struct _Row
diff --git a/Modules/_sqlite/statement.h b/Modules/_sqlite/statement.h
index fd88d7d662..5002f02dc5 100644
--- a/Modules/_sqlite/statement.h
+++ b/Modules/_sqlite/statement.h
@@ -23,6 +23,7 @@
#ifndef PYSQLITE_STATEMENT_H
#define PYSQLITE_STATEMENT_H
+#define PY_SSIZE_T_CLEAN
#include "Python.h"
#include "connection.h"
diff --git a/Modules/_sqlite/util.h b/Modules/_sqlite/util.h
index abaefd8b87..626191118f 100644
--- a/Modules/_sqlite/util.h
+++ b/Modules/_sqlite/util.h
@@ -23,6 +23,7 @@
#ifndef PYSQLITE_UTIL_H
#define PYSQLITE_UTIL_H
+#define PY_SSIZE_T_CLEAN
#include "Python.h"
#include "pythread.h"
#include "sqlite3.h"