diff options
author | Daniele Varrazzo <daniele.varrazzo@gmail.com> | 2017-06-17 01:36:39 +0100 |
---|---|---|
committer | Daniele Varrazzo <daniele.varrazzo@gmail.com> | 2017-06-17 01:36:39 +0100 |
commit | 49ce622a86d76b8f3e495f81b44a35307720e4d9 (patch) | |
tree | 5785b0058ba8d99d1554bd32ee0b515bcc9dd8c0 /psycopg | |
parent | 70a2d2238e84ea8382bf994f2f79a008dbf5984d (diff) | |
download | psycopg2-49ce622a86d76b8f3e495f81b44a35307720e4d9.tar.gz |
Fixed parsing interval from micros on 32 bit
Using integers the wrong size. Faithfully segfaulting since 1970.
Diffstat (limited to 'psycopg')
-rw-r--r-- | psycopg/typecast_datetime.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/psycopg/typecast_datetime.c b/psycopg/typecast_datetime.c index b0b257b..f24223c 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); |