Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code | Sign in
(1508)

Unified Diff: Modules/_datetimemodule.c

Issue 29140: time_hash() reads the wrong bytes to get microseconds
Patch Set: Created 2 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Please Sign in to add in-line comments.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
--- a/Modules/_datetimemodule.c Tue Jan 03 03:48:34 2017 +0300
+++ b/Modules/_datetimemodule.c Tue Jan 03 14:56:09 2017 +0100
@@ -3843,11 +3843,11 @@ time_hash(PyDateTime_Time *self)
{
if (self->hashcode == -1) {
PyObject *offset, *self0;
- if (DATE_GET_FOLD(self)) {
- self0 = new_time_ex2(DATE_GET_HOUR(self),
- DATE_GET_MINUTE(self),
- DATE_GET_SECOND(self),
- DATE_GET_MICROSECOND(self),
+ if (TIME_GET_FOLD(self)) {
+ self0 = new_time_ex2(TIME_GET_HOUR(self),
+ TIME_GET_MINUTE(self),
+ TIME_GET_SECOND(self),
+ TIME_GET_MICROSECOND(self),
HASTZINFO(self) ? self->tzinfo : Py_None,
0, Py_TYPE(self));
if (self0 == NULL)
« no previous file with comments | « no previous file | no next file » | no next file with comments »

RSS Feeds Recent Issues | This issue
This is Rietveld 894c83f36cb7+