GeezerVisonThe World Wide Web, restored to 800 pixels of glory. |
| Home|About|Gaming cabinet|Archives|How it works|Starter sites |
GeezerVison is showing github.com — TypeError when using ctypes.BigEndianUnion nested in ctypes.BigEndianStructure on a little endian system (or vice versa) · Issue #105102 · python/cpython Closed Labels 3.11only security fixesonly security fixes3.12only security fixesonly security fixes3.13only security fixesonly security fixesstdlibStandard Library Python modules in the Lib/ directoryStandard Library Python modules in the Lib/ directorytopic-ctypestype-bugAn unexpected behavior, bug, or errorAn unexpected behavior, bug, or error DescriptionBug reportThe classes ctypes.BigEndianUnion and ctypes.LittleEndianUnion was added in Python 3.11. In the case of the use of an # coding: utf-8 import sys import ctypes as c assert sys.byteorder == "little" """ struct MyStruct { unsigned char a; unsigned char b: }; struct MainStruct { union { struct MyStruct my_struct; short field_ab; } my_union; unsigned char foo; }; """ class MyStruct(c.BigEndianStructure): _fields_ = [("a", c.c_byte), ("b", c.c_byte)] class MyUnion(c.BigEndianUnion): _fields_ = [("my_struct", MyStruct), ("ab", c.c_short)] class MainStruct(c.BigEndianStructure): _fields_ = [("my_union", MyUnion), ("foo", c.c_byte)] The following traceback is given by the interpretor: Your environment
Linked PRs
Activity
MetadataMetadataAssigneesLabels3.11only security fixesonly security fixes3.12only security fixesonly security fixes3.13only security fixesonly security fixesstdlibStandard Library Python modules in the Lib/ directoryStandard Library Python modules in the Lib/ directorytopic-ctypestype-bugAn unexpected behavior, bug, or errorAn unexpected behavior, bug, or error Projects
MilestoneRelationshipsDevelopmentIssue actions |
| You are visitor 01402503 — GeezerVison does not store the pages you look up. Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required. |