[issue19904] Add 128-bit integer support to struct
Fil Mackay
report at bugs.python.org
Fri Dec 6 03:04:23 CET 2013
New submission from Fil Mackay:
I've been looking at adding 128-bit support to the struct module. Currently only named integer types are supported, which vary in implementation. These include:
short
int
long
long long
Depending on the platform, none may translate to 128-bit integer (the case with all platforms today?).
One approach would be to make a new type that relates specifically to 128-bit integer, side-stepping the naming approaches to integer in C.
The other, would be to make new types for all integer sizes that relate to specific sizes, instead of relying on C namings. Much bigger implications?
I propose creating new types:
"o": __int128_t
"O": __uint128_t
"t": __int256_t (why not?)
"T": __uint256_t
"v": __int512_t (what, too far?)
"V": __int512_t
What implications are there here in killing the connection between a C named type and a specific size?
----------
components: ctypes
messages: 205344
nosy: fil
priority: normal
severity: normal
status: open
title: Add 128-bit integer support to struct
type: enhancement
versions: Python 2.7, Python 3.4, Python 3.5
_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue19904>
_______________________________________
More information about the Python-bugs-list
mailing list