Lines Matching defs:self
38 row_clear(pysqlite_Row *self)
40 Py_CLEAR(self->data);
41 Py_CLEAR(self->description);
46 row_traverse(pysqlite_Row *self, visitproc visit, void *arg)
48 Py_VISIT(Py_TYPE(self));
49 Py_VISIT(self->data);
50 Py_VISIT(self->description);
55 pysqlite_row_dealloc(PyObject *self)
57 PyTypeObject *tp = Py_TYPE(self);
58 PyObject_GC_UnTrack(self);
59 tp->tp_clear(self);
60 tp->tp_free(self);
79 pysqlite_Row *self;
83 self = (pysqlite_Row *) type->tp_alloc(type, 0);
84 if (self == NULL)
87 self->data = Py_NewRef(data);
88 self->description = Py_NewRef(cursor->description);
90 return (PyObject *) self;
93 PyObject* pysqlite_row_item(pysqlite_Row* self, Py_ssize_t idx)
95 PyObject *item = PyTuple_GetItem(self->data, idx);
128 pysqlite_row_subscript(pysqlite_Row *self, PyObject *idx)
138 _idx += PyTuple_GET_SIZE(self->data);
140 PyObject *item = PyTuple_GetItem(self->data, _idx);
143 nitems = PyTuple_Size(self->description);
147 obj = PyTuple_GET_ITEM(self->description, i);
155 PyObject *item = PyTuple_GetItem(self->data, i);
164 return PyObject_GetItem(self->data, idx);
173 pysqlite_row_length(pysqlite_Row* self)
175 return PyTuple_GET_SIZE(self->data);
185 pysqlite_row_keys_impl(pysqlite_Row *self)
195 nitems = PyTuple_Size(self->description);
198 if (PyList_Append(list, PyTuple_GET_ITEM(PyTuple_GET_ITEM(self->description, i), 0)) != 0) {
207 static PyObject* pysqlite_iter(pysqlite_Row* self)
209 return PyObject_GetIter(self->data);
212 static Py_hash_t pysqlite_row_hash(pysqlite_Row *self)
214 return PyObject_Hash(self->description) ^ PyObject_Hash(self->data);
217 static PyObject* pysqlite_row_richcompare(pysqlite_Row *self, PyObject *_other, int opid)
222 pysqlite_state *state = pysqlite_get_state_by_type(Py_TYPE(self));
225 int eq = PyObject_RichCompareBool(self->description, other->description, Py_EQ);
230 return PyObject_RichCompare(self->data, other->data, opid);