Skip to content

Commit 3d327f4

Browse files
committed
char * -> const char*
Also, fix some whitespace.
1 parent ae93f8e commit 3d327f4

File tree

1 file changed

+4
-9
lines changed

1 file changed

+4
-9
lines changed

Modules/_datetimemodule.c

Lines changed: 4 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -2290,7 +2290,7 @@ delta_repr(PyDateTime_Delta *self)
22902290
return NULL;
22912291
}
22922292

2293-
char *sep = "";
2293+
const char *sep = "";
22942294

22952295
if (GET_TD_DAYS(self) != 0) {
22962296
Py_SETREF(args, PyUnicode_FromFormat("days=%d", GET_TD_DAYS(self)));
@@ -2301,9 +2301,7 @@ delta_repr(PyDateTime_Delta *self)
23012301
}
23022302

23032303
if (GET_TD_SECONDS(self) != 0) {
2304-
Py_SETREF(args, PyUnicode_FromFormat("%U%sseconds=%d",
2305-
args,
2306-
sep,
2304+
Py_SETREF(args, PyUnicode_FromFormat("%U%sseconds=%d", args, sep,
23072305
GET_TD_SECONDS(self)));
23082306
if (args == NULL) {
23092307
return NULL;
@@ -2312,9 +2310,7 @@ delta_repr(PyDateTime_Delta *self)
23122310
}
23132311

23142312
if (GET_TD_MICROSECONDS(self) != 0) {
2315-
Py_SETREF(args, PyUnicode_FromFormat("%U%smicroseconds=%d",
2316-
args,
2317-
sep,
2313+
Py_SETREF(args, PyUnicode_FromFormat("%U%smicroseconds=%d", args, sep,
23182314
GET_TD_MICROSECONDS(self)));
23192315
if (args == NULL) {
23202316
return NULL;
@@ -2328,8 +2324,7 @@ delta_repr(PyDateTime_Delta *self)
23282324
}
23292325
}
23302326

2331-
PyObject *repr = PyUnicode_FromFormat("%s(%S)",
2332-
Py_TYPE(self)->tp_name,
2327+
PyObject *repr = PyUnicode_FromFormat("%s(%S)", Py_TYPE(self)->tp_name,
23332328
args);
23342329
Py_DECREF(args);
23352330
return repr;

0 commit comments

Comments
 (0)