Mercurial > cpython-lru_cache-weakref
diff Modules/_sqlite/connection.c @ 38883:408d2a596f99 legacy-trunk
Fixed a memory leak that was introduced with incorrect usage of the Python weak
reference API in pysqlite 2.2.1.
Bumbed pysqlite version number to upcoming pysqlite 2.3.1 release.
| author | Gerhard Häring <gh@ghaering.de> |
|---|---|
| date | Mon, 19 Jun 2006 21:17:35 +0000 |
| parents | 0a8b851b0375 |
| children | 69ea12db9b28 b9d4ced23506 |
line wrap: on
line diff
--- a/Modules/_sqlite/connection.c Mon Jun 19 17:31:16 2006 +0000 +++ b/Modules/_sqlite/connection.c Mon Jun 19 21:17:35 2006 +0000 @@ -664,7 +664,7 @@ for (i = 0; i < PyList_Size(self->statements); i++) { weakref = PyList_GetItem(self->statements, i); - if (weakref != Py_None) { + if (PyWeakref_GetObject(weakref) != Py_None) { if (PyList_Append(new_list, weakref) != 0) { Py_DECREF(new_list); return;
