Skip to content

Commit fd823d2

Browse files
authored
Include Python.h first (#59929)
1 parent f738d97 commit fd823d2

File tree

6 files changed

+8
-4
lines changed

6 files changed

+8
-4
lines changed

pandas/_libs/include/pandas/datetime/date_conversions.h

+1
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ The full license is in the LICENSE file, distributed with this software.
99

1010
#define PY_SSIZE_T_CLEAN
1111
#include <Python.h>
12+
1213
#include <numpy/ndarraytypes.h>
1314

1415
// Scales value inplace from nanosecond resolution to unit resolution

pandas/_libs/include/pandas/parser/io.h

+2-1
Original file line numberDiff line numberDiff line change
@@ -10,9 +10,10 @@ The full license is in the LICENSE file, distributed with this software.
1010
#pragma once
1111

1212
#define PY_SSIZE_T_CLEAN
13-
#include "tokenizer.h"
1413
#include <Python.h>
1514

15+
#include "tokenizer.h"
16+
1617
#define FS(source) ((file_source *)source)
1718

1819
typedef struct _rd_source {

pandas/_libs/include/pandas/parser/pd_parser.h

+2-1
Original file line numberDiff line numberDiff line change
@@ -13,9 +13,10 @@ extern "C" {
1313
#endif
1414

1515
#define PY_SSIZE_T_CLEAN
16-
#include "pandas/parser/tokenizer.h"
1716
#include <Python.h>
1817

18+
#include "pandas/parser/tokenizer.h"
19+
1920
typedef struct {
2021
int (*to_double)(char *, double *, char, char, int *);
2122
int (*floatify)(PyObject *, double *, int *);

pandas/_libs/include/pandas/vendored/klib/khash_python.h

+1
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
#pragma once
44

55
#include <Python.h>
6+
67
#include <pymem.h>
78
#include <string.h>
89

pandas/_libs/src/vendored/ujson/python/JSONtoObj.c

+1-2
Original file line numberDiff line numberDiff line change
@@ -38,11 +38,10 @@ Numeric decoder derived from TCL library
3838

3939
// Licence at LICENSES/ULTRAJSON_LICENSE
4040

41-
// clang-format off
4241
#define PY_SSIZE_T_CLEAN
4342
#include <Python.h>
43+
4444
#include "pandas/vendored/ujson/lib/ultrajson.h"
45-
// clang-format on
4645

4746
static int Object_objectAddKey(void *Py_UNUSED(prv), JSOBJ obj, JSOBJ name,
4847
JSOBJ value) {

pandas/_libs/src/vendored/ujson/python/ujson.c

+1
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,7 @@ Numeric decoder derived from TCL library
4040

4141
#define PY_SSIZE_T_CLEAN
4242
#include <Python.h>
43+
4344
#define PY_ARRAY_UNIQUE_SYMBOL UJSON_NUMPY
4445
#include "numpy/arrayobject.h"
4546

0 commit comments

Comments
 (0)