Пример #1
0
static int
WorkRequest_tp_clear(WorkRequest *self)
{
    Py_CLEAR(self->work_cb);
    Py_CLEAR(self->done_cb);
    return RequestType.tp_clear((PyObject *)self);
}
Пример #2
0
static int
FSRequest_tp_clear(FSRequest *self)
{
    Py_CLEAR(self->callback);
    Py_CLEAR(self->path);
    Py_CLEAR(self->result);
    Py_CLEAR(self->error);
    return RequestType.tp_clear((PyObject *)self);
}
Пример #3
0
static void __Pyx_call_next_tp_clear(PyObject* obj, inquiry current_tp_clear) {
    PyTypeObject* type = Py_TYPE(obj);
    /* try to find the first parent type that has a different tp_clear() function */
    while (type && type->tp_clear != current_tp_clear)
        type = type->tp_base;
    while (type && type->tp_clear == current_tp_clear)
        type = type->tp_base;
    if (type && type->tp_clear)
        type->tp_clear(obj);
}
Пример #4
0
static int
GNIRequest_tp_clear(GNIRequest *self)
{
    Py_CLEAR(self->callback);
    return RequestType.tp_clear((PyObject *)self);
}