From 3e0d8792a81d0d411845b348b3da0dc512aefb1f Mon Sep 17 00:00:00 2001 From: Federico Di Gregorio Date: Fri, 1 Sep 2006 12:42:03 +0000 Subject: [PATCH] Preparing 2.0.5. --- ChangeLog | 4 ++++ psycopg/adapter_binary.c | 9 +++------ 2 files changed, 7 insertions(+), 6 deletions(-) diff --git a/ChangeLog b/ChangeLog index 88c883af..6588a987 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,9 @@ 2006-09-01 Federico Di Gregorio + * Release 2.0.5. + + * Fixed patch from #119, see tracker for details. + * Preparing release 2.0.5. * psycopg/psycopgmodule.c: fixed filling of connection errors diff --git a/psycopg/adapter_binary.c b/psycopg/adapter_binary.c index 75cfa1c0..0fc8101e 100644 --- a/psycopg/adapter_binary.c +++ b/psycopg/adapter_binary.c @@ -149,14 +149,11 @@ binary_quote(binaryObject *self) return NULL; } - if (len > 0) { + if (len > 0) self->buffer = PyString_FromFormat("'%s'", to); - PQfreemem(to); - } - else { + else self->buffer = PyString_FromString("''"); - PQfreemem(to); - } + PQfreemem(to); } /* if the wrapped object is not a string or a buffer, this is an error */