Skip to content

Commit fca595b

Browse files
Move a build-time check to the right file.
1 parent e7d41f2 commit fca595b

File tree

2 files changed

+5
-4
lines changed

2 files changed

+5
-4
lines changed

Include/internal/pycore_global_objects.h

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -12,10 +12,6 @@ extern "C" {
1212
#define _PY_NSMALLPOSINTS 257
1313
#define _PY_NSMALLNEGINTS 5
1414

15-
// _PyLong_GetZero() and _PyLong_GetOne() must always be available
16-
#if _PY_NSMALLPOSINTS < 2
17-
# error "_PY_NSMALLPOSINTS must be greater than 1"
18-
#endif
1915

2016

2117
// Only immutable objects should be considered runtime-global.

Include/internal/pycore_long.h

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,11 @@ extern PyStatus _PyLong_InitTypes(PyInterpreterState *);
2222

2323
#define _PyLong_SMALL_INTS _Py_SINGLETON(small_ints)
2424

25+
// _PyLong_GetZero() and _PyLong_GetOne() must always be available
26+
#if _PY_NSMALLPOSINTS < 2
27+
# error "_PY_NSMALLPOSINTS must be greater than 1"
28+
#endif
29+
2530
// Return a borrowed reference to the zero singleton.
2631
// The function cannot return NULL.
2732
static inline PyObject* _PyLong_GetZero(void)

0 commit comments

Comments
 (0)