Skip to content

Commit 6dfba7f

Browse files
committed
Address comments
1 parent b5ebbc5 commit 6dfba7f

File tree

1 file changed

+8
-5
lines changed

1 file changed

+8
-5
lines changed

Modules/_datetimemodule.c

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1046,7 +1046,8 @@ new_datetime_ex(int year, int month, int day, int hour, int minute,
10461046
&PyDateTime_DateTimeType)
10471047

10481048
static PyObject *
1049-
call_subclass_fold(PyObject *cls, int fold, const char *format, ...) {
1049+
call_subclass_fold(PyObject *cls, int fold, const char *format, ...)
1050+
{
10501051
PyObject *kwargs = NULL, *res = NULL;
10511052
va_list va;
10521053

@@ -1065,9 +1066,9 @@ call_subclass_fold(PyObject *cls, int fold, const char *format, ...) {
10651066
if (obj == NULL) {
10661067
goto Done;
10671068
}
1068-
int res = PyDict_SetItemString(kwargs, "fold", obj);
1069+
int err = PyDict_SetItemString(kwargs, "fold", obj);
10691070
Py_DECREF(obj);
1070-
if (res < 0) {
1071+
if (err < 0) {
10711072
goto Done;
10721073
}
10731074
}
@@ -1087,7 +1088,8 @@ new_datetime_subclass_fold_ex(int year, int month, int day, int hour, int minute
10871088
// Use the fast path constructor
10881089
dt = new_datetime(year, month, day, hour, minute, second, usecond,
10891090
tzinfo, fold);
1090-
} else {
1091+
}
1092+
else {
10911093
// Subclass
10921094
dt = call_subclass_fold(cls, fold, "iiiiiiiO", year, month, day,
10931095
hour, minute, second, usecond, tzinfo);
@@ -1154,7 +1156,8 @@ new_time_subclass_fold_ex(int hour, int minute, int second, int usecond,
11541156
if ((PyTypeObject*)cls == &PyDateTime_TimeType) {
11551157
// Use the fast path constructor
11561158
t = new_time(hour, minute, second, usecond, tzinfo, fold);
1157-
} else {
1159+
}
1160+
else {
11581161
// Subclass
11591162
t = call_subclass_fold(cls, fold, "iiiiO", hour, minute, second,
11601163
usecond, tzinfo);

0 commit comments

Comments
 (0)