Commit 29198ea1 authored by Inada Naoki's avatar Inada Naoki Committed by GitHub

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.
parent 943395fa
...@@ -23,6 +23,7 @@ ...@@ -23,6 +23,7 @@
#ifndef PYSQLITE_CACHE_H #ifndef PYSQLITE_CACHE_H
#define PYSQLITE_CACHE_H #define PYSQLITE_CACHE_H
#define PY_SSIZE_T_CLEAN
#include "Python.h" #include "Python.h"
/* The LRU cache is implemented as a combination of a doubly-linked with a /* The LRU cache is implemented as a combination of a doubly-linked with a
......
...@@ -23,6 +23,7 @@ ...@@ -23,6 +23,7 @@
#ifndef PYSQLITE_CONNECTION_H #ifndef PYSQLITE_CONNECTION_H
#define PYSQLITE_CONNECTION_H #define PYSQLITE_CONNECTION_H
#define PY_SSIZE_T_CLEAN
#include "Python.h" #include "Python.h"
#include "pythread.h" #include "pythread.h"
#include "structmember.h" #include "structmember.h"
......
...@@ -23,6 +23,7 @@ ...@@ -23,6 +23,7 @@
#ifndef PYSQLITE_CURSOR_H #ifndef PYSQLITE_CURSOR_H
#define PYSQLITE_CURSOR_H #define PYSQLITE_CURSOR_H
#define PY_SSIZE_T_CLEAN
#include "Python.h" #include "Python.h"
#include "statement.h" #include "statement.h"
......
...@@ -26,6 +26,7 @@ ...@@ -26,6 +26,7 @@
#ifndef PSYCOPG_MICROPROTOCOLS_H #ifndef PSYCOPG_MICROPROTOCOLS_H
#define PSYCOPG_MICROPROTOCOLS_H 1 #define PSYCOPG_MICROPROTOCOLS_H 1
#define PY_SSIZE_T_CLEAN
#include <Python.h> #include <Python.h>
/** the names of the three mandatory methods **/ /** the names of the three mandatory methods **/
......
...@@ -23,6 +23,7 @@ ...@@ -23,6 +23,7 @@
#ifndef PYSQLITE_MODULE_H #ifndef PYSQLITE_MODULE_H
#define PYSQLITE_MODULE_H #define PYSQLITE_MODULE_H
#define PY_SSIZE_T_CLEAN
#include "Python.h" #include "Python.h"
#define PYSQLITE_VERSION "2.6.0" #define PYSQLITE_VERSION "2.6.0"
......
...@@ -23,6 +23,7 @@ ...@@ -23,6 +23,7 @@
#ifndef PYSQLITE_PREPARE_PROTOCOL_H #ifndef PYSQLITE_PREPARE_PROTOCOL_H
#define PYSQLITE_PREPARE_PROTOCOL_H #define PYSQLITE_PREPARE_PROTOCOL_H
#define PY_SSIZE_T_CLEAN
#include "Python.h" #include "Python.h"
typedef struct typedef struct
......
...@@ -23,6 +23,7 @@ ...@@ -23,6 +23,7 @@
#ifndef PYSQLITE_ROW_H #ifndef PYSQLITE_ROW_H
#define PYSQLITE_ROW_H #define PYSQLITE_ROW_H
#define PY_SSIZE_T_CLEAN
#include "Python.h" #include "Python.h"
typedef struct _Row typedef struct _Row
......
...@@ -23,6 +23,7 @@ ...@@ -23,6 +23,7 @@
#ifndef PYSQLITE_STATEMENT_H #ifndef PYSQLITE_STATEMENT_H
#define PYSQLITE_STATEMENT_H #define PYSQLITE_STATEMENT_H
#define PY_SSIZE_T_CLEAN
#include "Python.h" #include "Python.h"
#include "connection.h" #include "connection.h"
......
...@@ -23,6 +23,7 @@ ...@@ -23,6 +23,7 @@
#ifndef PYSQLITE_UTIL_H #ifndef PYSQLITE_UTIL_H
#define PYSQLITE_UTIL_H #define PYSQLITE_UTIL_H
#define PY_SSIZE_T_CLEAN
#include "Python.h" #include "Python.h"
#include "pythread.h" #include "pythread.h"
#include "sqlite3.h" #include "sqlite3.h"
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment