Skip to content

Commit 77a2143

Browse files
committed
Fix for python 3.10 on windows
1 parent 10d2741 commit 77a2143

File tree

5 files changed

+5
-4
lines changed

5 files changed

+5
-4
lines changed

pdffit2module/PyFileStreambuf.h

+1
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@
2525

2626
#ifndef PYFILESTREAMBUF_H_INCLUDED
2727
#define PYFILESTREAMBUF_H_INCLUDED
28+
#define PY_SSIZE_T_CLEAN
2829

2930
#include <Python.h>
3031
#include <streambuf>

pdffit2module/bindings.cc

+1-1
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
* Comments:
1818
*
1919
***********************************************************************/
20-
20+
#define PY_SSIZE_T_CLEAN
2121
#include <Python.h>
2222

2323
#include "bindings.h"

pdffit2module/misc.cc

+1-1
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
* Comments:
1818
*
1919
***********************************************************************/
20-
20+
#define PY_SSIZE_T_CLEAN
2121
#include <Python.h>
2222
#include <vector>
2323
#include <string>

pdffit2module/pdffit2module.cc

+1-1
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
* Comments:
1818
*
1919
***********************************************************************/
20-
20+
#define PY_SSIZE_T_CLEAN
2121
#include <Python.h>
2222
#include <ostream>
2323

pdffit2module/pyexceptions.cc

+1-1
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
* Comments:
1818
*
1919
***********************************************************************/
20-
20+
#define PY_SSIZE_T_CLEAN
2121
#include <Python.h>
2222

2323
PyObject *pypdffit2_runtimeError = 0;

0 commit comments

Comments
 (0)