Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

gh-128715: Expose ctypes.CField, with info attributes #128950

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 35 commits into from
Mar 24, 2025
Merged
Changes from 1 commit
Commits
Show all changes
35 commits
Select commit Hold shift + click to select a range
9d4be49
Restore max field size to sys.maxsize, as in Python 3.13 & below
encukou Dec 18, 2024
09c81a8
PyCField: Split out bit/byte sizes/offsets.
encukou Jan 9, 2025
c397cf4
Expose CField
encukou Jan 10, 2025
20ecd84
Add generic checks for all the test structs/unions
encukou Jan 17, 2025
60e7b32
More testing
encukou Jan 17, 2025
18334d8
Tests: import CField from ctypes
encukou Jan 17, 2025
294b1b8
Clarify bit_offset
encukou Jan 17, 2025
52114fa
Add a blurb
encukou Jan 17, 2025
32d41f3
Regen
encukou Jan 17, 2025
f6f596f
Merge in the main branch
encukou Jan 17, 2025
9b0e7eb
include <stdbool.h> in the common header
encukou Jan 17, 2025
d7bd835
Explicit casts
encukou Jan 17, 2025
06458f6
Remove problematic assert
encukou Jan 17, 2025
bb41481
Merge in the main branch
encukou Jan 24, 2025
91365b0
Add a test for the new info, and fix 'name' for nested anonymous structs
encukou Jan 24, 2025
b6d0510
Use subTest
encukou Jan 24, 2025
6e279e2
Use PyUnicode_FromObject to get an exact PyUnicode
encukou Jan 27, 2025
176de87
Normalize exception message
encukou Jan 31, 2025
085720e
Fix refcounting
encukou Jan 31, 2025
05c9591
Add pretty spaces
encukou Jan 31, 2025
b77074c
Merge in the main branch
encukou Jan 31, 2025
4e95755
Fix bit-packed size test for big-endian machines
encukou Jan 31, 2025
9cde20e
Remove `size` from _layout.py
encukou Jan 31, 2025
34865e8
Fix bit_offset for big-endian structs (where bitfields are laid out f…
encukou Feb 7, 2025
89fc44d
Merge in the main branch
encukou Feb 7, 2025
f327ffb
Name the magic constant
encukou Feb 7, 2025
14270ad
Remove unused variable
encukou Feb 7, 2025
7ce3cb9
Remove an unacceptable blank line
encukou Feb 7, 2025
d9d593c
Update documentation for tp_basicsize & tp_itemsize
encukou Feb 8, 2025
d52b8c9
Merge in the main branch
encukou Feb 21, 2025
2cdcb5b
Skip "is in" test for bitfields of underaligned types (bug filed)
encukou Feb 21, 2025
753090a
Merge in the main branch
encukou Mar 14, 2025
fde4204
Address review
encukou Mar 14, 2025
b2fddd8
One more alignment
encukou Mar 14, 2025
5ce595c
Don't use `self` while it's NULL
encukou Mar 17, 2025
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
Don't use self while it's NULL
  • Loading branch information
encukou committed Mar 17, 2025
commit 5ce595c8e4f474ee1c9e7e88582de7250fdede07
2 changes: 1 addition & 1 deletion 2 Modules/_ctypes/cfield.c
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ PyCField_new_impl(PyTypeObject *type, PyObject *name, PyObject *proto,
}
if (info == NULL) {
PyErr_Format(PyExc_TypeError,
"type of field %R must be a C type", self->name);
"type of field %R must be a C type", name);
goto error;
}
assert(byte_size == info->size);
Expand Down
Loading
Morty Proxy This is a proxified and sanitized view of the page, visit original site.