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

Created on 2018-03-29 13:48 by emezh, last changed 2022-01-14 17:44 by dpg.

Pull Requests
URL Status Linked Edit
PR 25480 open dpg, 2021-04-20 11:28
Messages (5)
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
msg314649 - (view) Author: emezh (emezh) Date: 2018-03-29 13:52
updated nosy list
msg355937 - (view) Author: Tomas Hyland (tohyland) * Date: 2019-11-04 11:10
Hi there, I'm taking part in 'EnHackathon' spending several days over the next few weeks working on issues. I think this could be a good issue for a small team of first-time contributors with experience in C to work on.
Would anyone be able to offer guidance if we encounter problems?
msg397291 - (view) Author: David Goncalves (dpg) * Date: 2021-07-12 09:37
PR 25480 passes checks and awaits core review. All comments thus far have been addressed.
msg410574 - (view) Author: David Goncalves (dpg) * Date: 2022-01-14 17:44
Any core developers available to review this PR?
Date User Action Args
2022-01-14 17:44:36dpgsetmessages: + msg410574
2021-07-12 09:37:24dpgsetmessages: + msg397291
2021-04-20 11:28:04dpgsetkeywords: + patch
nosy: + dpg

pull_requests: + pull_request24204
stage: patch review
2019-11-04 11:10:04tohylandsetnosy: + tohyland
messages: + msg355937
2018-03-29 13:52:51emezhsetnosy: + theller, amaury.forgeotdarc, belopolsky, meador.inge
messages: + msg314649
2018-03-29 13:48:23emezhcreate