From 5df70ff0bff429d5ca0acc279ea4d8cb94eb0a90 Mon Sep 17 00:00:00 2001 From: Daniele Varrazzo Date: Thu, 5 Jun 2014 12:45:39 +0200 Subject: [PATCH] Fixed callproc return value refcount Temporary anyway: I want to go back returning a list (or dict). --- psycopg/cursor_type.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/psycopg/cursor_type.c b/psycopg/cursor_type.c index 8ab2d3a6..05241de8 100644 --- a/psycopg/cursor_type.c +++ b/psycopg/cursor_type.c @@ -1132,8 +1132,9 @@ psyco_curs_callproc(cursorObject *self, PyObject *args) if (0 <= _psyco_curs_execute( self, operation, pvals, self->conn->async, 0)) { - /* return None from this until it's DBAPI compliant... */ - res = Py_None; + /* return None from this until it's DBAPI compliant... */ + Py_INCREF(Py_None); + res = Py_None; } exit: