tp_dealloc: release the lean_object ref and free the instance. */
| 1077 | PyObject *ob_type; |
| 1078 | lean_object *ptr; /* owned reference */ |
| 1079 | } LeanObjHandle; |
| 1080 | |
| 1081 | /* Slots for the heap type created via PyType_FromSpec. */ |
| 1082 | |
| 1083 | /* METH_NOARGS = 0x0004 */ |
| 1084 | #define LEAN_METH_NOARGS 0x0004 |
| 1085 | |
| 1086 | /* tp_dealloc: release the lean_object ref and free the instance. */ |
| 1087 | static void lean_obj_handle_dealloc(PyObject *self) { |
| 1088 | LeanObjHandle *h = (LeanObjHandle *)self; |
| 1089 | if (h->ptr) { |
| 1090 | lean_dec(h->ptr); |
| 1091 | h->ptr = NULL; |
| 1092 | } |
nothing calls this directly
no test coverage detected