diff options
-rw-r--r-- | psycopg/adapter_datetime.c | 8 | ||||
-rw-r--r-- | setup.cfg | 2 |
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); } } @@ -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 |