Skip to content

Commit 49ce622

Browse files
committed
Fixed parsing interval from micros on 32 bit
Using integers the wrong size. Faithfully segfaulting since 1970.
1 parent 70a2d22 commit 49ce622

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

psycopg/typecast_datetime.c

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -305,8 +305,7 @@ interval_from_usecs(const char *str)
305305
}
306306

307307
rv = PyObject_CallFunction(
308-
(PyObject*)PyDateTimeAPI->DeltaType, "LLO",
309-
0L, 0L, us);
308+
(PyObject*)PyDateTimeAPI->DeltaType, "iiO", 0, 0, us);
310309

311310
exit:
312311
Py_XDECREF(us);

0 commit comments

Comments
 (0)