From 5c89aa4b525151847cef942aec499fac97a92c17 Mon Sep 17 00:00:00 2001 From: Sam Gross Date: Fri, 7 Nov 2025 13:15:52 -0500 Subject: [PATCH] Avoid "most vexing parse" warning in certain versions of NVCC --- pythoncapi_compat.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pythoncapi_compat.h b/pythoncapi_compat.h index bb45c18..02a0171 100644 --- a/pythoncapi_compat.h +++ b/pythoncapi_compat.h @@ -1992,6 +1992,8 @@ static inline int Py_fclose(FILE *file) #if 0x03080000 <= PY_VERSION_HEX && PY_VERSION_HEX < 0x030E0000 && !defined(PYPY_VERSION) +PyAPI_FUNC(const PyConfig*) _Py_GetConfig(void); + static inline PyObject* PyConfig_Get(const char *name) { @@ -2127,8 +2129,6 @@ PyConfig_Get(const char *name) return Py_NewRef(value); } - PyAPI_FUNC(const PyConfig*) _Py_GetConfig(void); - const PyConfig *config = _Py_GetConfig(); void *member = (char *)config + spec->offset; switch (spec->type) {