mirror of
https://github.com/python/cpython.git
synced 2025-08-04 17:08:35 +00:00
gh-135379: Move PyLong_CheckCompact to private header and rename it (GH-135707)
This commit is contained in:
parent
ff639af8ee
commit
0243260284
7 changed files with 26 additions and 26 deletions
|
@ -124,12 +124,6 @@ _PyLong_IsCompact(const PyLongObject* op) {
|
|||
return op->long_value.lv_tag < (2 << _PyLong_NON_SIZE_BITS);
|
||||
}
|
||||
|
||||
static inline int
|
||||
PyLong_CheckCompact(PyObject *op)
|
||||
{
|
||||
return PyLong_CheckExact(op) && _PyLong_IsCompact((const PyLongObject *)op);
|
||||
}
|
||||
|
||||
#define PyUnstable_Long_IsCompact _PyLong_IsCompact
|
||||
|
||||
static inline Py_ssize_t
|
||||
|
|
|
@ -312,6 +312,12 @@ _PyLong_FlipSign(PyLongObject *op) {
|
|||
#define _PyLong_FALSE_TAG TAG_FROM_SIGN_AND_SIZE(0, 0)
|
||||
#define _PyLong_TRUE_TAG TAG_FROM_SIGN_AND_SIZE(1, 1)
|
||||
|
||||
static inline int
|
||||
_PyLong_CheckExactAndCompact(PyObject *op)
|
||||
{
|
||||
return PyLong_CheckExact(op) && _PyLong_IsCompact((const PyLongObject *)op);
|
||||
}
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue