Skip to content

Commit 79ab767

Browse files
committed
STY: Include Python.h explicitly and add comments explaining why it's there.
1 parent 83c46c9 commit 79ab767

File tree

2 files changed

+10
-0
lines changed

2 files changed

+10
-0
lines changed

numpy/_core/src/common/blas_utils.c

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,8 @@
1+
/* Any file that includes Python.h must include it before any other files */
2+
/* https://docs.python.org/3/extending/extending.html#a-simple-example */
3+
/* npy_common.h includes Python.h so it also counts in this list */
4+
#include <Python.h>
5+
16
#include "numpy/numpyconfig.h" // NPY_VISIBILITY_HIDDEN
27
#include "numpy/npy_math.h" // npy_get_floatstatus_barrier
38
#include "blas_utils.h"

numpy/_core/src/common/blas_utils.h

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,8 @@
1+
/* Any file that includes Python.h must include it before any other files */
2+
/* https://docs.python.org/3/extending/extending.html#a-simple-example */
3+
/* npy_common.h includes Python.h so it also counts in this list */
4+
#include <Python.h>
5+
16
#include "numpy/numpyconfig.h" // for NPY_VISIBILITY_HIDDEN
27

38
#include <stdbool.h>

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy