Skip to content

Commit fd92889

Browse files
committed
remove partial duplicated logic
1 parent 17decdc commit fd92889

File tree

1 file changed

+1
-9
lines changed

1 file changed

+1
-9
lines changed

Modules/_datetimemodule.c

Lines changed: 1 addition & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -2226,15 +2226,7 @@ delta_to_microseconds(PyDateTime_Delta *self)
22262226
x2 = PyLong_FromLong(GET_TD_MICROSECONDS(self));
22272227
if (x2 == NULL)
22282228
goto Done;
2229-
x3 = PyNumber_Add(x1, x2);
2230-
Py_SETREF(x1, NULL);
2231-
Py_SETREF(x2, NULL);
2232-
if (x3 == NULL)
2233-
goto Done;
2234-
x1 = PyLong_FromLong(GET_TD_NANOSECONDS(self));
2235-
if (x1 == NULL)
2236-
goto Done;
2237-
result = PyNumber_Add(x3, x1);
2229+
result = PyNumber_Add(x1, x2);
22382230
assert(result == NULL || PyLong_CheckExact(result));
22392231

22402232
Done:

0 commit comments

Comments
 (0)