Skip to content

Commit fd1c821

Browse files
add assert (as in other branches)
1 parent a174d67 commit fd1c821

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

Modules/_datetimemodule.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1666,6 +1666,7 @@ wrap_strftime(PyObject *object, PyObject *format, PyObject *timetuple,
16661666
}
16671667
}
16681668
assert(*replacement_p != NULL);
1669+
assert(PyBytes_Check(*replacement_p));
16691670
ptoappend = PyBytes_AS_STRING(*replacement_p);
16701671
ntoappend = PyBytes_GET_SIZE(*replacement_p);
16711672
}

0 commit comments

Comments
 (0)