Skip to content

Commit 747ca92

Browse files
committed
revert timezone Py_INCREF
1 parent ffe7e74 commit 747ca92

1 file changed

Lines changed: 1 addition & 9 deletions

File tree

‎Modules/_datetimemodule.c‎

Lines changed: 1 addition & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -4367,15 +4367,7 @@ static PyObject *
43674367
timezone_new_impl(PyTypeObject *type, PyObject *offset, PyObject *name)
43684368
/*[clinic end generated code: output=41a2dda500424187 input=8901a8befbc52561]*/
43694369
{
4370-
/* vectorcall passes borrowed references; hold strong references before
4371-
new_timezone() can execute arbitrary Python code. */
4372-
PyObject *result;
4373-
Py_INCREF(offset);
4374-
Py_XINCREF(name);
4375-
result = new_timezone(offset, name);
4376-
Py_DECREF(offset);
4377-
Py_XDECREF(name);
4378-
return result;
4370+
return new_timezone(offset, name);
43794371
}
43804372

43814373
static void

0 commit comments

Comments
 (0)