-
-
Notifications
You must be signed in to change notification settings - Fork 32k
gh-74695: Add support for ctypes.c_bool on opposite endian systems #127280
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
base: main
Are you sure you want to change the base?
Changes from all commits
704613b
3e185c1
d04f922
2e378c6
356d934
3a14f6a
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -263,6 +263,8 @@ class c_void_p(_SimpleCData): | |
|
||
class c_bool(_SimpleCData): | ||
_type_ = "?" | ||
c_bool.__ctype_le__ = c_bool.__ctype_be__ = c_bool | ||
_check_size(c_bool) | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Not disagreeing that this should be here, I'd prefer to keep unrelated changes out of a PR. Could you open a seperate PR that adds this? (No need for an issue or blurb entry on it, just the one line change should be fine; tag me and I'll add
Suggested change
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I appreciate the input but it's not really worth my time to split this single line out into a separate PR. Any real reason it can't ride along with this one? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. We don't really like to accept changes that are unrelated to the actual fix. You can leave it in, but expect pushback from other reviewers. |
||
|
||
from _ctypes import POINTER, pointer, _pointer_type_cache | ||
|
||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
Added support for :class:`ctypes.c_bool` for structs/unions that have an endianness opposite of the current system. |
Uh oh!
There was an error while loading. Please reload this page.