Skip to content

Commit

Permalink
Merge pull request #39 from NextThought/issue38
Browse files Browse the repository at this point in the history
Fix #38 by returning the correct type from TimeStamp_hash.
  • Loading branch information
tseaver committed May 26, 2016
2 parents 1df6a6e + edd3e63 commit 68c26c4
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 1 deletion.
6 changes: 6 additions & 0 deletions CHANGES.rst
@@ -1,6 +1,12 @@
``persistent`` Changelog
========================

4.2.1 (TBD)
-----------

- Fix the hashcode of C ``TimeStamp`` objects on 64-bit Python 3 on
Windows.

4.2.0 (2016-05-05)
------------------

Expand Down
5 changes: 4 additions & 1 deletion appveyor.yml
Expand Up @@ -6,8 +6,11 @@ environment:
- python : 27
- python : 27-x64
- python : 33
- python : 33-x64
- python : 34
- python : 35
- python : 34-x64
- python : 35
- python : 35-x64

install:
- "SET PATH=C:\\Python%PYTHON%;c:\\Python%PYTHON%\\scripts;%PATH%"
Expand Down
5 changes: 5 additions & 0 deletions persistent/_timestamp.c
Expand Up @@ -152,7 +152,12 @@ TimeStamp_richcompare(TimeStamp *self, TimeStamp *other, int op)
return result;
}


#ifdef PY3K
static Py_hash_t
#else
static long
#endif
TimeStamp_hash(TimeStamp *self)
{
register unsigned char *p = (unsigned char *)self->data;
Expand Down

0 comments on commit 68c26c4

Please sign in to comment.