| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
Sorry, something went wrong.
Move types to the ctypes_state structure: * PyCArray_Type * PyCData_Type * PyCFuncPtr_Type * PyCPointer_Type * Simple_Type The following macros get an additional state parameter: * ArrayObject_Check() * CDataObject_Check() * CDataObject_CheckExact() * PointerObject_Check() * PyCFuncPtrObject_Check() The following function gets an additional state parameter: * _PyCData_set() Co-Authored-By: neonene <53406459+neonene@users.noreply.github.com>
|
This change only prepares the code to convert static types to heap types. It doesn't change the behavior. It only moves references to types from global variables to the _ctypes state and pass the state to macros and functions using it. |
Sorry, something went wrong.
|
To keep this change as small as possible, I didn't change the following macros to add a new state parameter. #define PyCSimpleTypeObject_CheckExact(v) Py_IS_TYPE(v, GLOBAL_STATE()->PyCSimpleType_Type) #define PyCSimpleTypeObject_Check(v) PyObject_TypeCheck(v, GLOBAL_STATE()->PyCSimpleType_Type) #define PyCArrayTypeObject_Check(v) PyObject_TypeCheck(v, GLOBAL_STATE()->PyCArrayType_Type) #define PyCPointerTypeObject_Check(v) PyObject_TypeCheck(v, GLOBAL_STATE()->PyCPointerType_Type) #define PyCFuncPtrTypeObject_Check(v) PyObject_TypeCheck(v, GLOBAL_STATE()->PyCFuncPtrType_Type) #define PyCStructTypeObject_Check(v) PyObject_TypeCheck(v, GLOBAL_STATE()->PyCStructType_Type) These macros can be changed afterwards. |
Sorry, something went wrong.
Sorry, something went wrong.
|
PR #113857, which expects fewer follow-up PRs, can be closed after this is landed. |
Sorry, something went wrong.
| Back | FazBrowse Home | New Git URL |
Move types to the ctypes_state structure:
The following macros get an additional state parameter:
The following function gets an additional state parameter: