diff options
| author | Mike Bayer <mike_mp@zzzcomputing.com> | 2010-11-24 12:22:17 -0500 |
|---|---|---|
| committer | Mike Bayer <mike_mp@zzzcomputing.com> | 2010-11-24 12:22:17 -0500 |
| commit | aab439abc73976b077f1058f488be3e914b5861f (patch) | |
| tree | b47199cd4104154485f479836cad5d1978898ff2 /lib/sqlalchemy | |
| parent | c848624f9db325213ddf2fde9819946f9eb235cd (diff) | |
| parent | bb6ed3e111362b4656b4bc6a9f189882170f7770 (diff) | |
| download | sqlalchemy-aab439abc73976b077f1058f488be3e914b5861f.tar.gz | |
merge tip
Diffstat (limited to 'lib/sqlalchemy')
| -rw-r--r-- | lib/sqlalchemy/cextension/processors.c | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/lib/sqlalchemy/cextension/processors.c b/lib/sqlalchemy/cextension/processors.c index 327462fa8..193fb19f3 100644 --- a/lib/sqlalchemy/cextension/processors.c +++ b/lib/sqlalchemy/cextension/processors.c @@ -289,6 +289,7 @@ DecimalResultProcessor_process(DecimalResultProcessor *self, PyObject *value) return NULL; str = PyString_Format(self->format, args); + Py_DECREF(args); if (str == NULL) return NULL; @@ -300,6 +301,14 @@ DecimalResultProcessor_process(DecimalResultProcessor *self, PyObject *value) } } +static void +DecimalResultProcessor_dealloc(DecimalResultProcessor *self) +{ + Py_XDECREF(self->type); + Py_XDECREF(self->format); + self->ob_type->tp_free((PyObject*)self); +} + static PyMethodDef DecimalResultProcessor_methods[] = { {"process", (PyCFunction)DecimalResultProcessor_process, METH_O, "The value processor itself."}, @@ -312,7 +321,7 @@ static PyTypeObject DecimalResultProcessorType = { "sqlalchemy.DecimalResultProcessor", /* tp_name */ sizeof(DecimalResultProcessor), /* tp_basicsize */ 0, /* tp_itemsize */ - 0, /* tp_dealloc */ + (destructor)DecimalResultProcessor_dealloc, /* tp_dealloc */ 0, /* tp_print */ 0, /* tp_getattr */ 0, /* tp_setattr */ |
