classification
Title: Add support for BigEndianUnion and LittleEndianUnion in ctypes
Type: enhancement Stage:
Components: ctypes Versions: Python 3.6, Python 2.7
process
Status: open Resolution:
Dependencies: Superseder:
Assigned To: Nosy List: amaury.forgeotdarc, belopolsky, emezh, meador.inge, theller
Priority: normal Keywords:

Created on 2018-03-29 13:48 by emezh, last changed 2018-03-29 13:52 by emezh.

Messages (2)
msg314647 - (view) Author: emezh (emezh) Date: 2018-03-29 13:48
Python documentation says that "To build structures with non-native byte order, you can use one of the BigEndianStructure, LittleEndianStructure, BigEndianUnion, and LittleEndianUnion base classes"

However, BigEndianUnion ad LittleEndianUnion are not implemented

>>> from ctypes import *
>>> BigEndianStructure
<class 'ctypes._endian.BigEndianStructure'>
>>> BigEndianUnion
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
NameError: name 'BigEndianUnion' is not defined

Is that something that can be added?

See also https://bugs.python.org/issue19023
msg314649 - (view) Author: emezh (emezh) Date: 2018-03-29 13:52
updated nosy list
History
Date User Action Args
2018-03-29 13:52:51emezhsetnosy: + theller, amaury.forgeotdarc, belopolsky, meador.inge
messages: + msg314649
2018-03-29 13:48:23emezhcreate