Skip to content

Commit d2930b4

Browse files
authored
Merge pull request #13846 from meeseeksmachine/auto-backport-of-pr-13836-on-v3.1.x
Backport PR #13836 on branch v3.1.x (MNT: account for cpython deprecations)
2 parents 4a4484b + 37b1205 commit d2930b4

10 files changed

+10
-7
lines changed

src/_macosx.m

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
#define PY_SSIZE_T_CLEAN
12
#include <Cocoa/Cocoa.h>
23
#include <ApplicationServices/ApplicationServices.h>
34
#include <sys/socket.h>

src/_png.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
Undefining _POSIX_C_SOURCE and _XOPEN_SOURCE stops a couple
1010
of harmless warnings.
1111
*/
12-
12+
#define PY_SSIZE_T_CLEAN
1313

1414
extern "C" {
1515
# include <png.h>

src/_tkagg.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
* See LICENSE/LICENSE.PIL for details.
88
*
99
*/
10-
10+
#define PY_SSIZE_T_CLEAN
1111
#include <Python.h>
1212
#include <cstdlib>
1313
#include <cstdio>

src/_ttconv.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
66
Python wrapper for TrueType conversion library in ../ttconv.
77
*/
8-
8+
#define PY_SSIZE_T_CLEAN
99
#include "mplutils.h"
1010

1111
#include <Python.h>

src/file_compat.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
#ifndef MPL_FILE_COMPAT_H
22
#define MPL_FILE_COMPAT_H
3-
3+
#define PY_SSIZE_T_CLEAN
44
#include <Python.h>
55
#include <stdio.h>
66
#include "numpy/npy_common.h"

src/mplutils.h

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

55
#ifndef MPLUTILS_H
66
#define MPLUTILS_H
7+
#define PY_SSIZE_T_CLEAN
78

89
#include <stdint.h>
910

src/numpy_cpp.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
#ifndef MPL_NUMPY_CPP_H
44
#define MPL_NUMPY_CPP_H
5-
5+
#define PY_SSIZE_T_CLEAN
66
/***************************************************************************
77
* This file is based on original work by Mark Wiebe, available at:
88
*

src/py_adaptors.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
#ifndef MPL_PY_ADAPTORS_H
44
#define MPL_PY_ADAPTORS_H
5-
5+
#define PY_SSIZE_T_CLEAN
66
/***************************************************************************
77
* This module contains a number of C++ classes that adapt Python data
88
* structures to C++ and Agg-friendly interfaces.

src/py_converters.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
#define NO_IMPORT_ARRAY
2-
2+
#define PY_SSIZE_T_CLEAN
33
#include "py_converters.h"
44
#include "numpy_cpp.h"
55

src/qhull_wrap.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
* triangulation, construct an instance of the matplotlib.tri.Triangulation
66
* class without specifying a triangles array.
77
*/
8+
#define PY_SSIZE_T_CLEAN
89
#include "Python.h"
910
#include "numpy/ndarrayobject.h"
1011
#include "libqhull/qhull_a.h"

0 commit comments

Comments
 (0)