From fca595b4374738b277a9cd19c398254112b74da7 Mon Sep 17 00:00:00 2001 From: Eric Snow Date: Mon, 13 Dec 2021 12:42:31 -0700 Subject: [PATCH] Move a build-time check to the right file. --- Include/internal/pycore_global_objects.h | 4 ---- Include/internal/pycore_long.h | 5 +++++ 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/Include/internal/pycore_global_objects.h b/Include/internal/pycore_global_objects.h index 0bf84ee26866ee..88cdc92e1ac029 100644 --- a/Include/internal/pycore_global_objects.h +++ b/Include/internal/pycore_global_objects.h @@ -12,10 +12,6 @@ extern "C" { #define _PY_NSMALLPOSINTS 257 #define _PY_NSMALLNEGINTS 5 -// _PyLong_GetZero() and _PyLong_GetOne() must always be available -#if _PY_NSMALLPOSINTS < 2 -# error "_PY_NSMALLPOSINTS must be greater than 1" -#endif // Only immutable objects should be considered runtime-global. diff --git a/Include/internal/pycore_long.h b/Include/internal/pycore_long.h index 58e00baee78108..299988d6b385b7 100644 --- a/Include/internal/pycore_long.h +++ b/Include/internal/pycore_long.h @@ -22,6 +22,11 @@ extern PyStatus _PyLong_InitTypes(PyInterpreterState *); #define _PyLong_SMALL_INTS _Py_SINGLETON(small_ints) +// _PyLong_GetZero() and _PyLong_GetOne() must always be available +#if _PY_NSMALLPOSINTS < 2 +# error "_PY_NSMALLPOSINTS must be greater than 1" +#endif + // Return a borrowed reference to the zero singleton. // The function cannot return NULL. static inline PyObject* _PyLong_GetZero(void)