This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

classification
Title: stdint (eg. uint64_t) for ctypes
Type: enhancement Stage:
Components: Extension Modules Versions:
process
Status: closed Resolution: not a bug
Dependencies: Superseder:
Assigned To: Nosy List: vstinner
Priority: normal Keywords:

Created on 2009-09-07 23:58 by vstinner, last changed 2022-04-11 14:56 by admin. This issue is now closed.

Files
File name Uploaded Description Edit
stdint.py vstinner, 2009-09-07 23:58
Messages (2)
msg92403 - (view) Author: STINNER Victor (vstinner) * (Python committer) Date: 2009-09-07 23:58
It would be nice to have (at least) some stdint.h types in ctypes:
- uint8_t, int8_t
- int16_t, uint16_t
- int32_t, uint32_t
- uint64_t, int64_t

Attached fle is a Python implementation of that.

stdint.h contains much more types, but I don't think that
(u)int_leastXX_t/(u)int_fastXX_t are used in public structures/functions.

Other interesting types/constants from stdint.h:
- intptr_t / uintptr_t
- (U)INT(8|16|32|64)_(MIN|MAX)
- PTRDIFF_MAX
msg92404 - (view) Author: STINNER Victor (vstinner) * (Python committer) Date: 2009-09-08 00:00
Oooh. I just see that ctypes already includes ctypes.c_(u)int(8|16|32|64)
types... Sorry for the noise :-)
History
Date User Action Args
2022-04-11 14:56:52adminsetgithub: 51108
2009-09-08 00:00:34vstinnersetresolution: not a bug
2009-09-08 00:00:21vstinnersetstatus: open -> closed

messages: + msg92404
2009-09-07 23:58:07vstinnercreate