8000 bpo-33178: Add BigEndianUnion, LittleEndianUnion classes to ctypes by ringof · Pull Request #25480 · python/cpython · GitHub
[go: up one dir, main page]

Skip to content

bpo-33178: Add BigEndianUnion, LittleEndianUnion classes to ctypes #25480

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 14 commits into from
Mar 29, 2022
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
GH-25480: fixed whitepace errors
  • Loading branch information
ringof committed May 17, 2021
commit 528ff2bb7d78d7d48841accd8cf583d5e7fc410c
6 changes: 3 additions & 3 deletions Lib/ctypes/test/test_byteswap.py
Original file line number Diff line number Diff line change
Expand Up @@ -214,7 +214,7 @@ def test_struct_struct(self):
for nested, data in (
(BigEndianStructure, b'\0\0\0\1\0\0\0\2'),
(LittleEndianStructure, b'\1\0\0\0\2\0\0\0'),
):
):
for parent in (
BigEndianStructure,
LittleEndianStructure,
Expand Down Expand Up @@ -319,7 +319,7 @@ def test_union_fields_unsupported_byte_order(self):

class T(base):
pass

fields = [
("a", c_ubyte),
("b", c_byte),
Expand All @@ -339,7 +339,7 @@ class T(base):
("b3", c_byte, 2),
("a", c_int * 3 * 3 * 3)
]

# these fields do not support different byte order:
for typ in c_wchar, c_void_p, POINTER(c_int):
with self.assertRaises(TypeError):
Expand Down
0