Merge lp:~jameinel/bzr/2.1-pyrex-64bit into lp:bzr
Proposed by
John A Meinel
Status: | Merged |
---|---|
Approved by: | Ian Clatworthy |
Approved revision: | no longer in the source branch. |
Merged at revision: | not available |
Proposed branch: | lp:~jameinel/bzr/2.1-pyrex-64bit |
Merge into: | lp:bzr |
Diff against target: |
55 lines 1 file modified
bzrlib/_simple_set_pyx.pyx (+9/-11) |
To merge this branch: | bzr merge lp:~jameinel/bzr/2.1-pyrex-64bit |
Related bugs: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Andrew Bennetts | Approve | ||
Review via email: mp+13292@code.launchpad.net |
To post a comment you must log in.
Vincent's wonderful buildbot farm caught a regression with the new code.
Namely, pyrex 0.9.8.5 treats 'hash(obj)' as though it returns an int, rather than a long. So on 64-bit machines it truncates the hash value. This was an issue because sometimes we accessed the hash directly. (Py_TYPE( obj).tp_ hash(obj) ).
The attached patch just changes all lookups to go through PyObject_Hash() which is defined to give a stable interface. It also means we don't have to manually do exception checking, because the return of -1 can be defined as an exception condition.
Note that pyrex 0.9.7.2 was doing the right thing here, which is why Vincent's 64-bit Ubuntu machines were not failing, but the 64-bit Freebsd machines were. (freebsd had a newer pyrex...)