[Python-checkins] r47030 - python/trunk/Modules/_sqlite/connection.c python/trunk/Modules/_sqlite/module.h
gerhard.haering
python-checkins at python.org
Mon Jun 19 23:17:36 CEST 2006
Author: gerhard.haering
Date: Mon Jun 19 23:17:35 2006
New Revision: 47030
Modified:
python/trunk/Modules/_sqlite/connection.c
python/trunk/Modules/_sqlite/module.h
Log:
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.
Modified: python/trunk/Modules/_sqlite/connection.c
==============================================================================
--- python/trunk/Modules/_sqlite/connection.c (original)
+++ python/trunk/Modules/_sqlite/connection.c Mon Jun 19 23:17:35 2006
@@ -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;
Modified: python/trunk/Modules/_sqlite/module.h
==============================================================================
--- python/trunk/Modules/_sqlite/module.h (original)
+++ python/trunk/Modules/_sqlite/module.h Mon Jun 19 23:17:35 2006
@@ -25,7 +25,7 @@
#define PYSQLITE_MODULE_H
#include "Python.h"
-#define PYSQLITE_VERSION "2.3.0"
+#define PYSQLITE_VERSION "2.3.1"
extern PyObject* Error;
extern PyObject* Warning;
More information about the Python-checkins
mailing list