summaryrefslogtreecommitdiffstats
path: root/Include/cpython/longobject.h
Commit message (Collapse)AuthorAgeFilesLines
* gh-121115: Skip __index__ in PyLong_AsNativeBytes by default (GH-121118)Miss Islington (bot)2024-06-281-2/+5
| | | | | (cherry picked from commit 2894aa14f22430e9b6d4676afead6da7c79209ca) Co-authored-by: Steve Dower <steve.dower@python.org>
* [3.13] gh-119336: Restore removed _PyLong_NumBits() function (GH-119418) ↵Miss Islington (bot)2024-06-031-0/+9
| | | | | | | | | | (#119970) gh-119336: Restore removed _PyLong_NumBits() function (GH-119418) It is used by the pywin32 project. (cherry picked from commit e50fac96e82d857ecc024b4cd4e012493b077064) Co-authored-by: Ethan Smith <ethan@ethanhs.me>
* gh-111140: PyLong_From/AsNativeBytes: Take *flags* rather than just ↵Steve Dower2024-04-051-5/+19
| | | | *endianness* (GH-116053)
* gh-111140: Adds PyLong_AsNativeBytes and PyLong_FromNative[Unsigned]Bytes ↵Steve Dower2024-02-121-1/+35
| | | | functions (GH-114886)
* gh-112026: Restore removed private C API (#112115)Victor Stinner2023-11-151-0/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Restore removed private C API functions, macros and structures which have no simple replacement for now: * _PyDict_GetItem_KnownHash() * _PyDict_NewPresized() * _PyHASH_BITS * _PyHASH_IMAG * _PyHASH_INF * _PyHASH_MODULUS * _PyHASH_MULTIPLIER * _PyLong_Copy() * _PyLong_FromDigits() * _PyLong_New() * _PyLong_Sign() * _PyObject_CallMethodId() * _PyObject_CallMethodNoArgs() * _PyObject_CallMethodOneArg() * _PyObject_CallOneArg() * _PyObject_EXTRA_INIT * _PyObject_FastCallDict() * _PyObject_GetAttrId() * _PyObject_Vectorcall() * _PyObject_VectorcallMethod() * _PyStack_AsDict() * _PyThread_CurrentFrames() * _PyUnicodeWriter structure * _PyUnicodeWriter_Dealloc() * _PyUnicodeWriter_Finish() * _PyUnicodeWriter_Init() * _PyUnicodeWriter_Prepare() * _PyUnicodeWriter_PrepareKind() * _PyUnicodeWriter_WriteASCIIString() * _PyUnicodeWriter_WriteChar() * _PyUnicodeWriter_WriteLatin1String() * _PyUnicodeWriter_WriteStr() * _PyUnicodeWriter_WriteSubstring() * _PyUnicode_AsString() * _PyUnicode_FromId() * _PyVectorcall_Function() * _Py_HashDouble() * _Py_HashPointer() * _Py_IDENTIFIER() * _Py_c_abs() * _Py_c_diff() * _Py_c_neg() * _Py_c_pow() * _Py_c_prod() * _Py_c_quot() * _Py_c_sum() * _Py_static_string() * _Py_static_string_init()
* gh-106320: Re-add some PyLong/PyDict C-API functions (GH-#111162)scoder2023-10-251-0/+42
| | | | | | | | * gh-106320: Re-add _PyLong_FromByteArray(), _PyLong_AsByteArray() and _PyLong_GCD() to the public header files since they are used by third-party packages and there is no efficient replacement. See https://github.com/python/cpython/issues/111140 See https://github.com/python/cpython/issues/111139 * gh-111262: Re-add _PyDict_Pop() to have a C-API until a new public one is designed.
* gh-106320: Remove private _PyLong_Sign() (#108743)Victor Stinner2023-09-011-15/+0
| | | | | | Move the private _PyLong_Sign() and _PyLong_NumBits() functions to the internal C API (pycore_long.h). Modules/_testcapi/long.c now uses the internal C API.
* gh-106320: Remove private _PyLong_FileDescriptor_Converter() (#108503)Victor Stinner2023-08-261-2/+0
| | | | | | | | | Move the private _PyLong converter functions to the internal C API * _PyLong_FileDescriptor_Converter(): moved to pycore_fileutils.h * _PyLong_Size_t_Converter(): moved to pycore_long.h Argument Clinic now emits includes for pycore_fileutils.h and pycore_long.h when these functions are used.
* gh-106320: Remove private _PyLong converter functions (#108499)Victor Stinner2023-08-261-4/+0
| | | | | | | | | | | Move these private functions to the internal C API (pycore_long.h): * _PyLong_UnsignedInt_Converter() * _PyLong_UnsignedLongLong_Converter() * _PyLong_UnsignedLong_Converter() * _PyLong_UnsignedShort_Converter() Argument Clinic now emits #include "pycore_long.h" when these functions are used.
* gh-108444: Remove _PyLong_AsInt() function (#108461)Victor Stinner2023-08-251-3/+0
| | | | * Update Parser/asdl_c.py to regenerate Python/Python-ast.c. * Remove _PyLong_AsInt() alias to PyLong_AsInt().
* gh-108444: Add PyLong_AsInt() public function (#108445)Victor Stinner2023-08-241-1/+2
| | | | | | * Rename _PyLong_AsInt() to PyLong_AsInt(). * Add documentation. * Add test. * For now, keep _PyLong_AsInt() as an alias to PyLong_AsInt().
* gh-106320: Remove private PyLong C API functions (#108429)Victor Stinner2023-08-241-69/+1
| | | | | | | | | | | | | | | | Remove private PyLong C API functions: * _PyLong_AsByteArray() * _PyLong_DivmodNear() * _PyLong_Format() * _PyLong_Frexp() * _PyLong_FromByteArray() * _PyLong_FromBytes() * _PyLong_GCD() * _PyLong_Lshift() * _PyLong_Rshift() Move these functions to the internal C API. No longer export _PyLong_FromBytes() function.
* GH-101291: Add low level, unstable API for pylong (GH-101685)Mark Shannon2023-05-211-0/+5
| | | Co-authored-by: Petr Viktorin <encukou@gmail.com>
* bpo-35134: Add Include/cpython/longobject.h (GH-29044)Victor Stinner2021-10-191-0/+95
Move Include/longobject.h non-limited API to a new Include/cpython/longobject.h header file. Move the following definitions to the internal C API: * _PyLong_DigitValue * _PyLong_FormatAdvancedWriter() * _PyLong_FormatWriter()