8000 Merge pull request #13836 from tacaswell/fix_ssize_t · QuLogic/matplotlib@bf2c5f6 · GitHub
[go: up one dir, main page]

Skip to content

Commit bf2c5f6

Browse files
jklymaktacaswell
authored andcommitted
Merge pull request matplotlib#13836 from tacaswell/fix_ssize_t
MNT: account for cpython deprecations The conflicts were due to other changes in the #includes in the affected files.
1 parent 99903ba commit bf2c5f6

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
@@ -5,7 +5,7 @@
55
Undefining _POSIX_C_SOURCE and _XOPEN_SOURCE stops a couple
66
of harmless warnings.
77
*/
8-
8+
#define PY_SSIZE_T_CLEAN
99

1010
extern "C" {
1111
# 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 __FILE_COMPAT_H__
22
#define __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
#if defined(_MSC_VER) && _MSC_VER <= 1600
910
typedef unsigned __int8 uint8_t;

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 _NUMPY_CPP_H_
44
#define _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 __PY_ADAPTORS_H__
44
#define __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/noprefix.h"
1011
#include "libqhull/qhull_a.h"

0 commit comments

Comments
 (0)
0