Lines Matching defs:self
13 Custom_dealloc(CustomObject *self)
15 Py_XDECREF(self->first);
16 Py_XDECREF(self->last);
17 Py_TYPE(self)->tp_free((PyObject *) self);
23 CustomObject *self;
24 self = (CustomObject *) type->tp_alloc(type, 0);
25 if (self != NULL) {
26 self->first = PyUnicode_FromString("");
27 if (self->first == NULL) {
28 Py_DECREF(self);
31 self->last = PyUnicode_FromString("");
32 if (self->last == NULL) {
33 Py_DECREF(self);
36 self->number = 0;
38 return (PyObject *) self;
42 Custom_init(CustomObject *self, PyObject *args, PyObject *kwds)
49 &self->number))
53 tmp = self->first;
55 self->first = first;
59 tmp = self->last;
61 self->last = last;
74 Custom_getfirst(CustomObject *self, void *closure)
76 Py_INCREF(self->first);
77 return self->first;
81 Custom_setfirst(CustomObject *self, PyObject *value, void *closure)
93 tmp = self->first;
95 self->first = value;
101 Custom_getlast(CustomObject *self, void *closure)
103 Py_INCREF(self->last);
104 return self->last;
108 Custom_setlast(CustomObject *self, PyObject *value, void *closure)
120 tmp = self->last;
122 self->last = value;
136 Custom_name(CustomObject *self, PyObject *Py_UNUSED(ignored))
138 return PyUnicode_FromFormat("%S %S", self->first, self->last);