Lines Matching refs:weakref
217 PyObject* weakref; in pysqlite_do_all_statements() local
222 weakref = PyList_GetItem(self->statements, i); in pysqlite_do_all_statements()
223 statement = PyWeakref_GetObject(weakref); in pysqlite_do_all_statements()
237 weakref = PyList_GetItem(self->cursors, i); in pysqlite_do_all_statements()
238 cursor = (pysqlite_Cursor*)PyWeakref_GetObject(weakref); in pysqlite_do_all_statements()
275 PyObject* weakref; in pysqlite_connection_register_cursor() local
277 weakref = PyWeakref_NewRef((PyObject*)cursor, NULL); in pysqlite_connection_register_cursor()
278 if (!weakref) { in pysqlite_connection_register_cursor()
282 if (PyList_Append(connection->cursors, weakref) != 0) { in pysqlite_connection_register_cursor()
283 Py_CLEAR(weakref); in pysqlite_connection_register_cursor()
287 Py_DECREF(weakref); in pysqlite_connection_register_cursor()
752 PyObject* weakref; in _pysqlite_drop_unused_statement_references() local
768 weakref = PyList_GetItem(self->statements, i); in _pysqlite_drop_unused_statement_references()
769 if (PyWeakref_GetObject(weakref) != Py_None) { in _pysqlite_drop_unused_statement_references()
770 if (PyList_Append(new_list, weakref) != 0) { in _pysqlite_drop_unused_statement_references()
783 PyObject* weakref; in _pysqlite_drop_unused_cursor_references() local
799 weakref = PyList_GetItem(self->cursors, i); in _pysqlite_drop_unused_cursor_references()
800 if (PyWeakref_GetObject(weakref) != Py_None) { in _pysqlite_drop_unused_cursor_references()
801 if (PyList_Append(new_list, weakref) != 0) { in _pysqlite_drop_unused_cursor_references()
1193 PyObject* weakref; in pysqlite_connection_call() local
1233 weakref = PyWeakref_NewRef((PyObject*)statement, NULL); in pysqlite_connection_call()
1234 if (weakref == NULL) in pysqlite_connection_call()
1236 if (PyList_Append(self->statements, weakref) != 0) { in pysqlite_connection_call()
1237 Py_DECREF(weakref); in pysqlite_connection_call()
1240 Py_DECREF(weakref); in pysqlite_connection_call()