summaryrefslogtreecommitdiffstats
path: root/Modules/_sqlite/connection.c
diff options
context:
space:
mode:
authorGerhard Häring <gh@ghaering.de>2006-06-19 21:17:35 (GMT)
committerGerhard Häring <gh@ghaering.de>2006-06-19 21:17:35 (GMT)
commitecd2010951cac5a525a36906bdb803de1f619bb1 (patch)
tree9e601cc025c4e5854fffb04614ccf73096a5d9bf /Modules/_sqlite/connection.c
parent7cea65cc273e9cfde13c38752a60714dfadffa1e (diff)
downloadcpython-ecd2010951cac5a525a36906bdb803de1f619bb1.zip
cpython-ecd2010951cac5a525a36906bdb803de1f619bb1.tar.gz
cpython-ecd2010951cac5a525a36906bdb803de1f619bb1.tar.bz2
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.
Diffstat (limited to 'Modules/_sqlite/connection.c')
-rw-r--r--Modules/_sqlite/connection.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/Modules/_sqlite/connection.c b/Modules/_sqlite/connection.c
index ca7aad8..703af15 100644
--- a/Modules/_sqlite/connection.c
+++ b/Modules/_sqlite/connection.c
@@ -664,7 +664,7 @@ void _drop_unused_statement_references(Connection* self)
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;