gh-106320: Remove private _PyLong_IsCompact() function by vstinner · Pull Request #108742 · python/cpython
@gvanrossum @markshannon: Are the private _PyLong_IsCompact() and _PyLong_CompactValue() functions exposed by <Python.h> on purpose? Or are you are ok to move them to the internal C API?
I don't know the impact on performance. I'm more in favor of hiding implementation details.
If these functions are moved to the internal C API, are you ok to also make this change in Python 3.12?
Remove "const" qualifier from PyUnstable_Long_IsCompact() and PyUnstable_Long_CompactValue() parameter type.
I don't have a strong opinion on that, I'm also fine with keeping const if you prefer :-) It's just that in the past, I tried to use const in the public C API and "I got issues".