mirror of
https://github.com/python/cpython.git
synced 2025-08-02 08:02:56 +00:00
Fix problems in x64 build that were discovered by the testsuite:
- Reenable modules on x64 that had been disabled aeons ago for Itanium. - Cleared up confusion about compilers for 64 bit windows. There is only Itanium and x64. Added macros MS_WINI64 and MS_WINX64 for those rare cases where it matters, such as the disabling of modules above. - Set target platform (_WIN32_WINNT and WINVER) to 0x0501 (XP) for x64, and 0x0400 (NT 4.0) otherwise, which are the targeted minimum platforms. - Fixed thread_nt.h. The emulated InterlockedCompareExchange function didn´t work on x64, probaby due to the lack of a "volatile" specifier. Anyway, win95 is no longer a target platform. - Itertools module used wrong constant to check for overflow in count() - PyInt_AsSsize_t couldn't deal with attribute error when accessing the __long__ member. - PyLong_FromSsize_t() incorrectly specified that the operand were unsigned. With these changes, the x64 passes the testsuite, for those modules present.
This commit is contained in:
parent
170eee9d6a
commit
f030394de3
7 changed files with 36 additions and 73 deletions
|
@ -215,6 +215,10 @@ PyInt_AsSsize_t(register PyObject *op)
|
|||
|
||||
if (nb->nb_long != 0) {
|
||||
io = (PyIntObject*) (*nb->nb_long) (op);
|
||||
if (io == NULL && PyErr_ExceptionMatches(PyExc_AttributeError)) {
|
||||
PyErr_Clear();
|
||||
io = (PyIntObject*) (*nb->nb_int) (op);
|
||||
}
|
||||
} else {
|
||||
io = (PyIntObject*) (*nb->nb_int) (op);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue