summaryrefslogtreecommitdiff
path: root/lib/sqlalchemy/cextension/resultproxy.c
diff options
context:
space:
mode:
authorGaëtan de Menten <gdementen@gmail.com>2010-11-27 22:27:42 +0100
committerGaëtan de Menten <gdementen@gmail.com>2010-11-27 22:27:42 +0100
commit20418096d5862ed40f22b6c7b7cc53dd212bbd21 (patch)
tree564cb709dc0d96d6b47754d898cfd362ff6bd850 /lib/sqlalchemy/cextension/resultproxy.c
parent77f641429f019d06cc467ec4e57ae94f808d70bd (diff)
downloadsqlalchemy-20418096d5862ed40f22b6c7b7cc53dd212bbd21.tar.gz
fixed a small potential memory leak in UnicodeResultProcessor (for some weird
reason, it didn't actually leak in my tests) by providing a dealloc method to the type, and added a test to ensure it stays that way. Closes #1981.
Diffstat (limited to 'lib/sqlalchemy/cextension/resultproxy.c')
-rw-r--r--lib/sqlalchemy/cextension/resultproxy.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/lib/sqlalchemy/cextension/resultproxy.c b/lib/sqlalchemy/cextension/resultproxy.c
index 73e127345..93471073b 100644
--- a/lib/sqlalchemy/cextension/resultproxy.c
+++ b/lib/sqlalchemy/cextension/resultproxy.c
@@ -107,11 +107,11 @@ BaseRowProxy_init(BaseRowProxy *self, PyObject *args, PyObject *kwds)
static PyObject *
BaseRowProxy_reduce(PyObject *self)
{
- PyObject *method, *state;
- PyObject *module, *reconstructor, *cls;
+ PyObject *method, *state;
+ PyObject *module, *reconstructor, *cls;
- method = PyObject_GetAttrString(self, "__getstate__");
- if (method == NULL)
+ method = PyObject_GetAttrString(self, "__getstate__");
+ if (method == NULL)
return NULL;
state = PyObject_CallObject(method, NULL);
@@ -503,8 +503,8 @@ static PyGetSetDef BaseRowProxy_getseters[] = {
static PyMethodDef BaseRowProxy_methods[] = {
{"values", (PyCFunction)BaseRowProxy_values, METH_NOARGS,
"Return the values represented by this BaseRowProxy as a list."},
- {"__reduce__", (PyCFunction)BaseRowProxy_reduce, METH_NOARGS,
- "Pickle support method."},
+ {"__reduce__", (PyCFunction)BaseRowProxy_reduce, METH_NOARGS,
+ "Pickle support method."},
{NULL} /* Sentinel */
};