blob: daf6d96b1ce607bd346993fc9d1f339e1d10a145 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
|
// Convert non-PyObject* deferences of "ob_type" to use Py_TYPE macro instead
@@
PyObject *py_obj_ptr;
type T;
T non_py_obj_ptr;
@@
(
py_obj_ptr->ob_type
|
- non_py_obj_ptr->ob_type
+ Py_TYPE(non_py_obj_ptr)
)
@@
identifier F; // FIXME: must be an initial field of a struct
type T;
T non_py_obj_ptr;
@@
- non_py_obj_ptr->F.ob_type
+ Py_TYPE(non_py_obj_ptr)
@@
PyTypeObject typeobj;
@@
- typeobj.ob_type
+ Py_TYPE(&typeobj)
|