summaryrefslogtreecommitdiffstats
path: root/Modules/_datetimemodule.c
diff options
context:
space:
mode:
authorSerhiy Storchaka <storchaka@gmail.com>2016-04-10 15:12:01 (GMT)
committerSerhiy Storchaka <storchaka@gmail.com>2016-04-10 15:12:01 (GMT)
commitf01e408c1688a207eba18444da8c151c872fba59 (patch)
tree3330812d856579add4526f10d5284164a15b6037 /Modules/_datetimemodule.c
parent47c5474aa0cbe8dc3cf2c370b19769edd3f2e8d8 (diff)
parent57a01d3a0ee20ee9eea69b658c6bac0f39541625 (diff)
downloadcpython-f01e408c1688a207eba18444da8c151c872fba59.zip
cpython-f01e408c1688a207eba18444da8c151c872fba59.tar.gz
cpython-f01e408c1688a207eba18444da8c151c872fba59.tar.bz2
Issue #26200: Added Py_SETREF and replaced Py_XSETREF with Py_SETREF
in places where Py_DECREF was used.
Diffstat (limited to 'Modules/_datetimemodule.c')
-rw-r--r--Modules/_datetimemodule.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/Modules/_datetimemodule.c b/Modules/_datetimemodule.c
index e5191a0..261c4bc 100644
--- a/Modules/_datetimemodule.c
+++ b/Modules/_datetimemodule.c
@@ -1058,7 +1058,7 @@ format_utcoffset(char *buf, size_t buflen, const char *sep,
/* Offset is normalized, so it is negative if days < 0 */
if (GET_TD_DAYS(offset) < 0) {
sign = '-';
- Py_XSETREF(offset, delta_negative((PyDateTime_Delta *)offset));
+ Py_SETREF(offset, delta_negative((PyDateTime_Delta *)offset));
if (offset == NULL)
return -1;
}
@@ -3045,7 +3045,7 @@ tzinfo_fromutc(PyDateTime_TZInfo *self, PyObject *dt)
if (dst == Py_None)
goto Inconsistent;
if (delta_bool((PyDateTime_Delta *)dst) != 0) {
- Py_XSETREF(result, add_datetime_timedelta((PyDateTime_DateTime *)result,
+ Py_SETREF(result, add_datetime_timedelta((PyDateTime_DateTime *)result,
(PyDateTime_Delta *)dst, 1));
if (result == NULL)
goto Fail;
@@ -4445,7 +4445,7 @@ datetime_subtract(PyObject *left, PyObject *right)
return NULL;
if (offdiff != NULL) {
- Py_XSETREF(result, delta_subtract(result, offdiff));
+ Py_SETREF(result, delta_subtract(result, offdiff));
Py_DECREF(offdiff);
}
}