#ifndef Py_BUILD_CORE_BUILTIN #define Py_BUILD_CORE_MODULE … #endif #include "Python.h" // windows.h must be included before pycore internal headers #ifdef MS_WIN32 # include <windows.h> #endif #include "pycore_call.h" // _PyObject_CallNoArgs() #include "pycore_dict.h" // _PyDict_SizeOf() #include <ffi.h> #ifdef MS_WIN32 # include <malloc.h> #endif #include "ctypes.h" /* This file relates to StgInfo -- type-specific information for ctypes. * See ctypes.h for details. */ int PyCStgInfo_clone(StgInfo *dst_info, StgInfo *src_info) { … } /* descr is the descriptor for a field marked as anonymous. Get all the _fields_ descriptors from descr->proto, create new descriptors with offset and index adjusted, and stuff them into type. */ static int MakeFields(PyObject *type, CFieldObject *descr, Py_ssize_t index, Py_ssize_t offset) { … } /* Iterate over the names in the type's _anonymous_ attribute, if present, */ static int MakeAnonFields(PyObject *type) { … } /* Retrieve the (optional) _pack_ attribute from a type, the _fields_ attribute, and initialize StgInfo. Used for Structure and Union subclasses. */ int PyCStructUnionType_update_stginfo(PyObject *type, PyObject *fields, int isStruct) { … }