Skip to content

Commit dfb0fb7

Browse files
ntollsdispater
authored andcommitted
Fix memory leak in local_time in C extension. (#81)
1 parent a4d3716 commit dfb0fb7

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

pendulum/_extensions/_helpers.c

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -185,8 +185,7 @@ PyObject* local_time(PyObject *self, PyObject *args) {
185185
minute = seconds / SECS_PER_MIN;
186186
second = seconds % SECS_PER_MIN;
187187

188-
return PyTuple_Pack(
189-
7,
188+
return Py_BuildValue("NNNNNNN",
190189
PyLong_FromLong(year),
191190
PyLong_FromLong(month),
192191
PyLong_FromLong(day),

0 commit comments

Comments
 (0)