Lines Matching refs:self

10    local variables other than 'self'.  If your object type is needed in
19 def __init__(self):
21 self._x_attr = {}
22 self._x_exports = 0
24 def __getattr__(self, name):
25 return self._x_attr[name]
27 def __setattr__(self, name, value):
28 self._x_attr[name] = value
30 def __delattr__(self, name):
31 del self._x_attr[name]
34 def x_exports(self):
38 return self._x_exports
99 XxoObject *self;
100 self = PyObject_GC_New(XxoObject, (PyTypeObject*)state->Xxo_Type);
101 if (self == NULL) {
104 self->x_attr = NULL;
105 memset(self->x_buffer, 0, BUFSIZE);
106 self->x_exports = 0;
107 return self;
119 XxoObject *self = (XxoObject *)self_obj;
120 Py_VISIT(self->x_attr);
125 Xxo_clear(XxoObject *self)
127 Py_CLEAR(self->x_attr);
134 XxoObject *self = (XxoObject *)self_obj;
135 Py_CLEAR(self->x_attr);
139 Xxo_dealloc(PyObject *self)
141 PyObject_GC_UnTrack(self);
142 Xxo_finalize(self);
143 PyTypeObject *tp = Py_TYPE(self);
145 free(self);
153 Xxo_getattro(XxoObject *self, PyObject *name)
155 if (self->x_attr != NULL) {
156 PyObject *v = PyDict_GetItemWithError(self->x_attr, name);
165 return PyObject_GenericGetAttr((PyObject *)self, name);
169 Xxo_setattro(XxoObject *self, PyObject *name, PyObject *v)
171 if (self->x_attr == NULL) {
173 self->x_attr = PyDict_New();
174 if (self->x_attr == NULL) {
180 int rv = PyDict_DelItem(self->x_attr, name);
190 return PyDict_SetItem(self->x_attr, name, v);
197 Xxo_demo(XxoObject *self, PyTypeObject *defining_class,
236 Xxo_getbuffer(XxoObject *self, Py_buffer *view, int flags)
238 int res = PyBuffer_FillInfo(view, (PyObject*)self,
239 (void *)self->x_buffer, BUFSIZE,
242 self->x_exports++;
248 Xxo_releasebuffer(XxoObject *self, Py_buffer *view)
250 self->x_exports--;
254 Xxo_get_x_exports(XxoObject *self, void *c)
256 return PyLong_FromSsize_t(self->x_exports);