summaryrefslogtreecommitdiff
path: root/psycopg/adapter_pboolean.c
diff options
context:
space:
mode:
authorDaniele Varrazzo <daniele.varrazzo@gmail.com>2010-12-12 21:48:54 +0000
committerDaniele Varrazzo <daniele.varrazzo@gmail.com>2010-12-21 04:24:36 +0000
commitcb6b52945b4c114d39613e6a7b35c73762e5045f (patch)
tree30fd118d454aa4008174f0aac71fc15023612867 /psycopg/adapter_pboolean.c
parente182201e6ee8075a88b63c9d8338f833bd2471b0 (diff)
downloadpsycopg2-cb6b52945b4c114d39613e6a7b35c73762e5045f.tar.gz
The library can be compiled with Python 3.
Just compiled! No test run yet and many points to review, marked in the code. The patch is largely Martin von Löwis work, simplified after refactoring in the previous commits and adapted to the new code (as the patch was originally for Psycopg 2.0.9)
Diffstat (limited to 'psycopg/adapter_pboolean.c')
-rw-r--r--psycopg/adapter_pboolean.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/psycopg/adapter_pboolean.c b/psycopg/adapter_pboolean.c
index a74d9f3..cdd3ef4 100644
--- a/psycopg/adapter_pboolean.c
+++ b/psycopg/adapter_pboolean.c
@@ -39,17 +39,17 @@ pboolean_str(pbooleanObject *self)
{
#ifdef PSYCOPG_NEW_BOOLEAN
if (PyObject_IsTrue(self->wrapped)) {
- return PyString_FromString("true");
+ return Text_FromUTF8("true");
}
else {
- return PyString_FromString("false");
+ return Text_FromUTF8("false");
}
#else
if (PyObject_IsTrue(self->wrapped)) {
- return PyString_FromString("'t'");
+ return Text_FromUTF8("'t'");
}
else {
- return PyString_FromString("'f'");
+ return Text_FromUTF8("'f'");
}
#endif
}