Lines Matching defs:self
13 Custom_traverse(CustomObject *self, visitproc visit, void *arg)
15 Py_VISIT(self->first);
16 Py_VISIT(self->last);
21 Custom_clear(CustomObject *self)
23 Py_CLEAR(self->first);
24 Py_CLEAR(self->last);
29 Custom_dealloc(CustomObject *self)
31 PyObject_GC_UnTrack(self);
32 Custom_clear(self);
33 Py_TYPE(self)->tp_free((PyObject *) self);
39 CustomObject *self;
40 self = (CustomObject *) type->tp_alloc(type, 0);
41 if (self != NULL) {
42 self->first = PyUnicode_FromString("");
43 if (self->first == NULL) {
44 Py_DECREF(self);
47 self->last = PyUnicode_FromString("");
48 if (self->last == NULL) {
49 Py_DECREF(self);
52 self->number = 0;
54 return (PyObject *) self;
58 Custom_init(CustomObject *self, PyObject *args, PyObject *kwds)
65 &self->number))
69 tmp = self->first;
71 self->first = first;
75 tmp = self->last;
77 self->last = last;
90 Custom_getfirst(CustomObject *self, void *closure)
92 Py_INCREF(self->first);
93 return self->first;
97 Custom_setfirst(CustomObject *self, PyObject *value, void *closure)
109 Py_CLEAR(self->first);
110 self->first = value;
115 Custom_getlast(CustomObject *self, void *closure)
117 Py_INCREF(self->last);
118 return self->last;
122 Custom_setlast(CustomObject *self, PyObject *value, void *closure)
134 Py_CLEAR(self->last);
135 self->last = value;
148 Custom_name(CustomObject *self, PyObject *Py_UNUSED(ignored))
150 return PyUnicode_FromFormat("%S %S", self->first, self->last);