Skip to content

Add converters for standard fixed size unsigned integers in Argument Clinic #133583

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
serhiy-storchaka opened this issue May 7, 2025 · 0 comments
Assignees
Labels
topic-argument-clinic type-feature A feature request or enhancement

Comments

@serhiy-storchaka
Copy link
Member

serhiy-storchaka commented May 7, 2025

Several modules use converters to unsigned integers of fixed size: uint16_t, uint32_t, uint64_t. We could add support for these types in Argument Clinic and add the private C API for reuse the code.

A larger part of the work was already done in #132987 to support unsigned_int, etc converters. We can now just make the code even more general.

Linked PRs

@serhiy-storchaka serhiy-storchaka self-assigned this May 7, 2025
@picnixz picnixz added the type-feature A feature request or enhancement label May 7, 2025
serhiy-storchaka added a commit to serhiy-storchaka/cpython that referenced this issue May 7, 2025
…ment parsing

* Add Argument Clinic converters: uint8, uint16, uint32, uint64.
* Add private C API: _PyLong_UInt8_Converter(),
  _PyLong_UInt16_Converter(), _PyLong_UInt32_Converter(),
  _PyLong_UInt64_Converter().
serhiy-storchaka added a commit to serhiy-storchaka/cpython that referenced this issue May 7, 2025
…ment parsing

* Add Argument Clinic converters: uint8, uint16, uint32, uint64.
* Add private C API: _PyLong_UInt8_Converter(),
  _PyLong_UInt16_Converter(), _PyLong_UInt32_Converter(),
  _PyLong_UInt64_Converter().
serhiy-storchaka added a commit to serhiy-storchaka/cpython that referenced this issue May 7, 2025
…ment parsing

* Add Argument Clinic converters: uint8, uint16, uint32, uint64.
* Add private C API: _PyLong_UInt8_Converter(),
  _PyLong_UInt16_Converter(), _PyLong_UInt32_Converter(),
  _PyLong_UInt64_Converter().
serhiy-storchaka added a commit that referenced this issue May 8, 2025
…arsing (GH-133584)

* Add Argument Clinic converters: uint8, uint16, uint32, uint64.
* Add private C API: _PyLong_UInt8_Converter(),
  _PyLong_UInt16_Converter(), _PyLong_UInt32_Converter(),
  _PyLong_UInt64_Converter().
miss-islington pushed a commit to miss-islington/cpython that referenced this issue May 8, 2025
…ment parsing (pythonGH-133584)

* 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 4c914e7)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
serhiy-storchaka added a commit that referenced this issue May 8, 2025
…ument 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 4c914e7)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
topic-argument-clinic type-feature A feature request or enhancement
Projects
None yet
Development

No branches or pull requests

2 participants