Dropped PSYCOPG_NEW_BOOLEAN flag

Introduced in 2.0 beta 8, 2006 A.D. Went absolutely untouched in 8 years
of refactoring, when Python 2.5 and PostgreSQL 8.1 roamed the earth.

I would say it has stood the test of the time.
This commit is contained in:
Daniele Varrazzo 2014-08-24 01:25:02 +01:00
parent 6e841a41e6
commit 68a4308c3d
2 changed files with 1 additions and 11 deletions

View File

@ -37,21 +37,12 @@
static PyObject *
pboolean_getquoted(pbooleanObject *self, PyObject *args)
{
#ifdef PSYCOPG_NEW_BOOLEAN
if (PyObject_IsTrue(self->wrapped)) {
return Bytes_FromString("true");
}
else {
return Bytes_FromString("false");
}
#else
if (PyObject_IsTrue(self->wrapped)) {
return Bytes_FromString("'t'");
}
else {
return Bytes_FromString("'f'");
}
#endif
}
static PyObject *

View File

@ -1,10 +1,9 @@
[build_ext]
define=PSYCOPG_NEW_BOOLEAN,HAVE_PQFREEMEM
define=HAVE_PQFREEMEM
# PSYCOPG_DISPLAY_SIZE enable display size calculation (a little slower)
# HAVE_PQFREEMEM should be defined on PostgreSQL >= 7.4
# PSYCOPG_DEBUG can be added to enable verbose debug information
# PSYCOPG_NEW_BOOLEAN to format booleans as true/false vs 't'/'f'
# "pg_config" is required to locate PostgreSQL headers and libraries needed to
# build psycopg2. If pg_config is not in the path or is installed under a