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.
This commit is contained in:
Inada Naoki 2019-03-19 22:10:18 +09:00 committed by GitHub
parent 943395fab9
commit 29198ea1c6
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
9 changed files with 9 additions and 0 deletions

View File

@ -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

View File

@ -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"

View File

@ -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"

View File

@ -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 **/

View File

@ -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"

View File

@ -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

View File

@ -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

View File

@ -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"

View File

@ -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"