Skip to content

Commit ce9f84a

Browse files
encukoupicnixz
andauthored
gh-97588: Move ctypes struct/union layout logic to Python (GH-123352)
Co-authored-by: Bénédikt Tran <[email protected]>
1 parent 1fdfce9 commit ce9f84a

12 files changed

+805
-667
lines changed

Include/internal/pycore_global_objects_fini_generated.h

+6-4
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Include/internal/pycore_global_strings.h

+6-4
Original file line numberDiff line numberDiff line change
@@ -227,7 +227,6 @@ struct _Py_global_strings {
227227
STRUCT_FOR_ID(_abc_impl)
228228
STRUCT_FOR_ID(_abstract_)
229229
STRUCT_FOR_ID(_active)
230-
STRUCT_FOR_ID(_align_)
231230
STRUCT_FOR_ID(_anonymous_)
232231
STRUCT_FOR_ID(_argtypes_)
233232
STRUCT_FOR_ID(_as_parameter_)
@@ -248,21 +247,18 @@ struct _Py_global_strings {
248247
STRUCT_FOR_ID(_initializing)
249248
STRUCT_FOR_ID(_io)
250249
STRUCT_FOR_ID(_is_text_encoding)
251-
STRUCT_FOR_ID(_layout_)
252250
STRUCT_FOR_ID(_length_)
253251
STRUCT_FOR_ID(_limbo)
254252
STRUCT_FOR_ID(_lock_unlock_module)
255253
STRUCT_FOR_ID(_loop)
256254
STRUCT_FOR_ID(_needs_com_addref_)
257255
STRUCT_FOR_ID(_only_immortal)
258-
STRUCT_FOR_ID(_pack_)
259256
STRUCT_FOR_ID(_restype_)
260257
STRUCT_FOR_ID(_showwarnmsg)
261258
STRUCT_FOR_ID(_shutdown)
262259
STRUCT_FOR_ID(_slotnames)
263260
STRUCT_FOR_ID(_strptime)
264261
STRUCT_FOR_ID(_strptime_datetime)
265-
STRUCT_FOR_ID(_swappedbytes_)
266262
STRUCT_FOR_ID(_type_)
267263
STRUCT_FOR_ID(_uninitialized_submodules)
268264
STRUCT_FOR_ID(_warn_unawaited_coroutine)
@@ -276,6 +272,7 @@ struct _Py_global_strings {
276272
STRUCT_FOR_ID(after_in_parent)
277273
STRUCT_FOR_ID(aggregate_class)
278274
STRUCT_FOR_ID(alias)
275+
STRUCT_FOR_ID(align)
279276
STRUCT_FOR_ID(allow_code)
280277
STRUCT_FOR_ID(append)
281278
STRUCT_FOR_ID(arg)
@@ -295,6 +292,7 @@ struct _Py_global_strings {
295292
STRUCT_FOR_ID(before)
296293
STRUCT_FOR_ID(big)
297294
STRUCT_FOR_ID(binary_form)
295+
STRUCT_FOR_ID(bit_size)
298296
STRUCT_FOR_ID(block)
299297
STRUCT_FOR_ID(bound)
300298
STRUCT_FOR_ID(buffer)
@@ -423,6 +421,7 @@ struct _Py_global_strings {
423421
STRUCT_FOR_ID(fd2)
424422
STRUCT_FOR_ID(fdel)
425423
STRUCT_FOR_ID(fget)
424+
STRUCT_FOR_ID(fields)
426425
STRUCT_FOR_ID(file)
427426
STRUCT_FOR_ID(file_actions)
428427
STRUCT_FOR_ID(filename)
@@ -439,6 +438,7 @@ struct _Py_global_strings {
439438
STRUCT_FOR_ID(fold)
440439
STRUCT_FOR_ID(follow_symlinks)
441440
STRUCT_FOR_ID(format)
441+
STRUCT_FOR_ID(format_spec)
442442
STRUCT_FOR_ID(from_param)
443443
STRUCT_FOR_ID(fromlist)
444444
STRUCT_FOR_ID(fromtimestamp)
@@ -475,6 +475,7 @@ struct _Py_global_strings {
475475
STRUCT_FOR_ID(importlib)
476476
STRUCT_FOR_ID(in_fd)
477477
STRUCT_FOR_ID(incoming)
478+
STRUCT_FOR_ID(index)
478479
STRUCT_FOR_ID(indexgroup)
479480
STRUCT_FOR_ID(inf)
480481
STRUCT_FOR_ID(infer_variance)
@@ -495,6 +496,7 @@ struct _Py_global_strings {
495496
STRUCT_FOR_ID(intersection)
496497
STRUCT_FOR_ID(interval)
497498
STRUCT_FOR_ID(is_running)
499+
STRUCT_FOR_ID(is_struct)
498500
STRUCT_FOR_ID(isatty)
499501
STRUCT_FOR_ID(isinstance)
500502
STRUCT_FOR_ID(isoformat)

Include/internal/pycore_runtime_init_generated.h

+6-4
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Include/internal/pycore_unicodeobject_generated.h

+24-16
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)