Skip to content

Include Python.h first #59929

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Oct 2, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions pandas/_libs/include/pandas/datetime/date_conversions.h
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ The full license is in the LICENSE file, distributed with this software.

#define PY_SSIZE_T_CLEAN
#include <Python.h>

#include <numpy/ndarraytypes.h>

// Scales value inplace from nanosecond resolution to unit resolution
Expand Down
3 changes: 2 additions & 1 deletion pandas/_libs/include/pandas/parser/io.h
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,10 @@ The full license is in the LICENSE file, distributed with this software.
#pragma once

#define PY_SSIZE_T_CLEAN
#include "tokenizer.h"
#include <Python.h>

#include "tokenizer.h"

#define FS(source) ((file_source *)source)

typedef struct _rd_source {
Expand Down
3 changes: 2 additions & 1 deletion pandas/_libs/include/pandas/parser/pd_parser.h
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,10 @@ extern "C" {
#endif

#define PY_SSIZE_T_CLEAN
#include "pandas/parser/tokenizer.h"
#include <Python.h>

#include "pandas/parser/tokenizer.h"

typedef struct {
int (*to_double)(char *, double *, char, char, int *);
int (*floatify)(PyObject *, double *, int *);
Expand Down
1 change: 1 addition & 0 deletions pandas/_libs/include/pandas/vendored/klib/khash_python.h
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
#pragma once

#include <Python.h>

#include <pymem.h>
#include <string.h>

Expand Down
3 changes: 1 addition & 2 deletions pandas/_libs/src/vendored/ujson/python/JSONtoObj.c
Original file line number Diff line number Diff line change
Expand Up @@ -38,11 +38,10 @@ Numeric decoder derived from TCL library

// Licence at LICENSES/ULTRAJSON_LICENSE

// clang-format off
#define PY_SSIZE_T_CLEAN
#include <Python.h>

#include "pandas/vendored/ujson/lib/ultrajson.h"
// clang-format on

static int Object_objectAddKey(void *Py_UNUSED(prv), JSOBJ obj, JSOBJ name,
JSOBJ value) {
Expand Down
1 change: 1 addition & 0 deletions pandas/_libs/src/vendored/ujson/python/ujson.c
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@ Numeric decoder derived from TCL library

#define PY_SSIZE_T_CLEAN
#include <Python.h>

#define PY_ARRAY_UNIQUE_SYMBOL UJSON_NUMPY
#include "numpy/arrayobject.h"

Expand Down
Loading