Skip to content

Commit

Permalink
Move a build-time check to the right file.
Browse files Browse the repository at this point in the history
  • Loading branch information
ericsnowcurrently committed Dec 13, 2021
1 parent e7d41f2 commit fca595b
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
4 changes: 0 additions & 4 deletions Include/internal/pycore_global_objects.h
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
5 changes: 5 additions & 0 deletions Include/internal/pycore_long.h
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit fca595b

Please sign in to comment.