summaryrefslogtreecommitdiff
path: root/psycopg/microprotocols.c
diff options
context:
space:
mode:
authorDaniele Varrazzo <daniele.varrazzo@gmail.com>2010-12-25 12:03:15 +0100
committerDaniele Varrazzo <daniele.varrazzo@gmail.com>2010-12-31 03:18:27 +0100
commit3214c23f51c8effa7e78f9a7f59735c5b3e10868 (patch)
treee11d356c8ee4a70c7ab80cd6dbebe1b943a87693 /psycopg/microprotocols.c
parent2e22eef727fc3b57e63c7a6a1b5cbae9533cd632 (diff)
downloadpsycopg2-3214c23f51c8effa7e78f9a7f59735c5b3e10868.tar.gz
Fixed adaptation in several adapters.
The getquoted methods always return bytes. The str() convert this representation to string on the fly.
Diffstat (limited to 'psycopg/microprotocols.c')
-rw-r--r--psycopg/microprotocols.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/psycopg/microprotocols.c b/psycopg/microprotocols.c
index 45b26f8..2173815 100644
--- a/psycopg/microprotocols.c
+++ b/psycopg/microprotocols.c
@@ -138,7 +138,7 @@ microprotocols_adapt(PyObject *obj, PyObject *proto, PyObject *alt)
/* None is always adapted to NULL */
if (obj == Py_None)
- return Text_FromUTF8("NULL");
+ return Bytes_FromString("NULL");
Dprintf("microprotocols_adapt: trying to adapt %s",
Py_TYPE(obj)->tp_name);