Skip to content

MAINT: Fix some undef warnings #29216

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
Jun 17, 2025
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
2 changes: 1 addition & 1 deletion numpy/_core/src/_simd/_simd.c
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ PyMODINIT_FUNC PyInit__simd(void)
NPY_MTARGETS_CONF_DISPATCH(NPY_CPU_HAVE, ATTACH_MODULE, MAKE_MSVC_HAPPY)
NPY_MTARGETS_CONF_BASELINE(ATTACH_BASELINE_MODULE, MAKE_MSVC_HAPPY)

#if Py_GIL_DISABLED
#ifdef Py_GIL_DISABLED
// signal this module supports running with the GIL disabled
PyUnstable_Module_SetGIL(m, Py_MOD_GIL_NOT_USED);
#endif
Expand Down
2 changes: 1 addition & 1 deletion numpy/_core/src/multiarray/descriptor.c
Original file line number Diff line number Diff line change
Expand Up @@ -2095,7 +2095,7 @@ static PyMemberDef arraydescr_members[] = {
{"alignment",
T_PYSSIZET, offsetof(PyArray_Descr, alignment), READONLY, NULL},
{"flags",
#if NPY_ULONGLONG == NPY_UINT64
#if NPY_SIZEOF_LONGLONG == 8
T_ULONGLONG, offsetof(PyArray_Descr, flags), READONLY, NULL},
#else
#error Assuming long long is 64bit, if not replace with getter function.
Expand Down
2 changes: 1 addition & 1 deletion numpy/_core/src/umath/_operand_flag_tests.c
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ PyMODINIT_FUNC PyInit__operand_flag_tests(void)
((PyUFuncObject*)ufunc)->iter_flags = NPY_ITER_REDUCE_OK;
PyModule_AddObject(m, "inplace_add", (PyObject*)ufunc);

#if Py_GIL_DISABLED
#ifdef Py_GIL_DISABLED
// signal this module supports running with the GIL disabled
PyUnstable_Module_SetGIL(m, Py_MOD_GIL_NOT_USED);
#endif
Expand Down
2 changes: 1 addition & 1 deletion numpy/_core/src/umath/_rational_tests.c
Original file line number Diff line number Diff line change
Expand Up @@ -1355,7 +1355,7 @@ PyMODINIT_FUNC PyInit__rational_tests(void) {
GCD_LCM_UFUNC(gcd,NPY_INT64,"greatest common denominator of two integers");
GCD_LCM_UFUNC(lcm,NPY_INT64,"least common multiple of two integers");

#if Py_GIL_DISABLED
#ifdef Py_GIL_DISABLED
// signal this module supports running with the GIL disabled
PyUnstable_Module_SetGIL(m, Py_MOD_GIL_NOT_USED);
#endif
Expand Down
2 changes: 1 addition & 1 deletion numpy/_core/src/umath/_struct_ufunc_tests.c
Original file line number Diff line number Diff line change
Expand Up @@ -157,7 +157,7 @@ PyMODINIT_FUNC PyInit__struct_ufunc_tests(void)
PyDict_SetItemString(d, "add_triplet", add_triplet);
Py_DECREF(add_triplet);

#if Py_GIL_DISABLED
#ifdef Py_GIL_DISABLED
// signal this module supports running with the GIL disabled
PyUnstable_Module_SetGIL(m, Py_MOD_GIL_NOT_USED);
#endif
Expand Down
2 changes: 1 addition & 1 deletion numpy/_core/src/umath/_umath_tests.c.src
Original file line number Diff line number Diff line change
Expand Up @@ -944,7 +944,7 @@ PyMODINIT_FUNC PyInit__umath_tests(void) {

// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

#if Py_GIL_DISABLED
#ifdef Py_GIL_DISABLED
// signal this module supports running with the GIL disabled
PyUnstable_Module_SetGIL(m, Py_MOD_GIL_NOT_USED);
#endif
Expand Down
8 changes: 4 additions & 4 deletions numpy/_core/tests/examples/limited_api/limited_api_latest.c
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
#if Py_LIMITED_API != PY_VERSION_HEX & 0xffff0000
# error "Py_LIMITED_API not defined to Python major+minor version"
#endif

#include <Python.h>
#include <numpy/arrayobject.h>
#include <numpy/ufuncobject.h>

#if Py_LIMITED_API != PY_VERSION_HEX & 0xffff0000
# error "Py_LIMITED_API not defined to Python major+minor version"
#endif

static PyModuleDef moduledef = {
.m_base = PyModuleDef_HEAD_INIT,
.m_name = "limited_api_latest"
Expand Down
2 changes: 1 addition & 1 deletion numpy/f2py/rules.py
Original file line number Diff line number Diff line change
Expand Up @@ -286,7 +286,7 @@
#initcommonhooks#
#interface_usercode#

#if Py_GIL_DISABLED
#ifdef Py_GIL_DISABLED
// signal whether this module supports running with the GIL disabled
PyUnstable_Module_SetGIL(m , #gil_used#);
#endif
Expand Down
2 changes: 1 addition & 1 deletion numpy/f2py/tests/src/array_from_pyobj/wrapmodule.c
Original file line number Diff line number Diff line change
Expand Up @@ -223,7 +223,7 @@ PyMODINIT_FUNC PyInit_test_array_from_pyobj_ext(void) {
on_exit(f2py_report_on_exit,(void*)"array_from_pyobj.wrap.call");
#endif

#if Py_GIL_DISABLED
#ifdef Py_GIL_DISABLED
// signal whether this module supports running with the GIL disabled
PyUnstable_Module_SetGIL(m, Py_MOD_GIL_NOT_USED);
#endif
Expand Down
Loading
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