mirror of
https://github.com/python/cpython.git
synced 2025-09-26 10:19:53 +00:00
[3.14] gh-133583: Add support for fixed size unsigned integers in argument parsing (GH-133584) (GH-133650)
* Add Argument Clinic converters: uint8, uint16, uint32, uint64.
* Add private C API: _PyLong_UInt8_Converter(),
_PyLong_UInt16_Converter(), _PyLong_UInt32_Converter(),
_PyLong_UInt64_Converter().
(cherry picked from commit 4c914e7a36
)
Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
This commit is contained in:
parent
a020336256
commit
0f7046b187
7 changed files with 87 additions and 93 deletions
|
@ -158,6 +158,11 @@ PyAPI_FUNC(int) _PyLong_UnsignedLongLong_Converter(PyObject *, void *);
|
|||
// Export for '_testclinic' shared extension (Argument Clinic code)
|
||||
PyAPI_FUNC(int) _PyLong_Size_t_Converter(PyObject *, void *);
|
||||
|
||||
PyAPI_FUNC(int) _PyLong_UInt8_Converter(PyObject *, void *);
|
||||
PyAPI_FUNC(int) _PyLong_UInt16_Converter(PyObject *, void *);
|
||||
PyAPI_FUNC(int) _PyLong_UInt32_Converter(PyObject *, void *);
|
||||
PyAPI_FUNC(int) _PyLong_UInt64_Converter(PyObject *, void *);
|
||||
|
||||
/* Long value tag bits:
|
||||
* 0-1: Sign bits value = (1-sign), ie. negative=2, positive=0, zero=1.
|
||||
* 2: Set to 1 for the small ints
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue