From 49ce622a86d76b8f3e495f81b44a35307720e4d9 Mon Sep 17 00:00:00 2001 From: Daniele Varrazzo Date: Sat, 17 Jun 2017 01:36:39 +0100 Subject: [PATCH] Fixed parsing interval from micros on 32 bit Using integers the wrong size. Faithfully segfaulting since 1970. --- psycopg/typecast_datetime.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/psycopg/typecast_datetime.c b/psycopg/typecast_datetime.c index b0b257bc..f24223cb 100644 --- a/psycopg/typecast_datetime.c +++ b/psycopg/typecast_datetime.c @@ -305,8 +305,7 @@ interval_from_usecs(const char *str) } rv = PyObject_CallFunction( - (PyObject*)PyDateTimeAPI->DeltaType, "LLO", - 0L, 0L, us); + (PyObject*)PyDateTimeAPI->DeltaType, "iiO", 0, 0, us); exit: Py_XDECREF(us);