Skip to content

Commit 1ad5011

Browse files
Use fast API post not None check
1 parent 09c01c4 commit 1ad5011

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

Modules/_sqlite/row.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -154,7 +154,7 @@ pysqlite_row_subscript(PyObject *op, PyObject *idx)
154154
PyErr_Format(PyExc_IndexError, "No item with key %R", idx);
155155
return NULL;
156156
}
157-
Py_ssize_t nitems = PyTuple_Size(self->description);
157+
Py_ssize_t nitems = PyTuple_GET_SIZE(self->description);
158158

159159
for (Py_ssize_t i = 0; i < nitems; i++) {
160160
PyObject *obj;
@@ -208,7 +208,7 @@ pysqlite_row_keys_impl(pysqlite_Row *self)
208208
return list;
209209
}
210210

211-
Py_ssize_t nitems = PyTuple_Size(self->description);
211+
Py_ssize_t nitems = PyTuple_GET_SIZE(self->description);
212212
for (Py_ssize_t i = 0; i < nitems; i++) {
213213
PyObject *descr = PyTuple_GET_ITEM(self->description, i);
214214
PyObject *name = PyTuple_GET_ITEM(descr, 0);

0 commit comments

Comments
 (0)