summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFederico Di Gregorio <fog@initd.org>2008-04-14 04:27:22 +0000
committerFederico Di Gregorio <fog@initd.org>2008-04-14 04:27:22 +0000
commitf3438f2961ba9513d49d98c8427aac415469a3e9 (patch)
tree6fb9c66c6ec00d5098decaf31585f9eb47902c50
parent1fddaa856239c01d475301c99131658b5db35f32 (diff)
downloadpsycopg2-f3438f2961ba9513d49d98c8427aac415469a3e9.tar.gz
Preparing release 2.0.7.
-rw-r--r--psycopg/adapter_datetime.c8
-rw-r--r--setup.cfg2
2 files changed, 6 insertions, 4 deletions
diff --git a/psycopg/adapter_datetime.c b/psycopg/adapter_datetime.c
index 1a68a67..e9fcc1e 100644
--- a/psycopg/adapter_datetime.c
+++ b/psycopg/adapter_datetime.c
@@ -400,7 +400,7 @@ psyco_TimestampFromTicks(PyObject *self, PyObject *args)
time_t t;
double ticks;
- if (!PyArg_ParseTuple(args,"d", &ticks))
+ if (!PyArg_ParseTuple(args, "d", &ticks))
return NULL;
t = (time_t)round(ticks);
@@ -412,8 +412,10 @@ psyco_TimestampFromTicks(PyObject *self, PyObject *args)
(double)tm.tm_sec + ticks,
pyPsycopgTzLOCAL);
if (value) {
- /* we don't decref the value here because the call to
- psyco_Timestamp will do that by calling PyArg_ParseTuple */
+ /* FIXME: not decref'ing the value here is a memory leak
+ but, on the other hand, if we decref we get a clean nice
+ segfault (on my 64 bit Python 2.4 box). So this leaks
+ will stay until after 2.0.7 when we'll try to plug it */
res = psyco_Timestamp(self, value);
}
}
diff --git a/setup.cfg b/setup.cfg
index 26c5693..cdc5efb 100644
--- a/setup.cfg
+++ b/setup.cfg
@@ -1,5 +1,5 @@
[build_ext]
-define=PSYCOPG_EXTENSIONS,PSYCOPG_NEW_BOOLEAN,HAVE_PQFREEMEM,HAVE_PQPROTOCOL3,PSYCOPG_DEBUG
+define=PSYCOPG_EXTENSIONS,PSYCOPG_NEW_BOOLEAN,HAVE_PQFREEMEM,HAVE_PQPROTOCOL3
# PSYCOPG_EXTENSIONS enables extensions to PEP-249 (you really want this)
# PSYCOPG_DISPLAY_SIZE enable display size calculation (a little slower)
# HAVE_PQFREEMEM should be defined on PostgreSQL >= 7.4