Ticket #176 (closed defect: duplicate)

Opened 6 years ago

Last modified 5 years ago

long long and VC6

Reported by: xi Owned by: somebody
Priority: major Milestone: 0.12
Component: Code Generation Keywords:
Cc:

Description

The functions __Pyx_GetItemInt, __Pyx_SetItemInt and __Pyx_DelItemInt use type unsigned long long and literal 1ULL in the following expression:

PyObject *j = (likely(i >= 0) || !is_unsigned) ? PyInt_FromLong(i) : 
PyLong_FromUnsignedLongLong((sizeof(unsigned long long) > 
sizeof(Py_ssize_t) ? (1ULL << (sizeof(Py_ssize_t)*8)) : 0) + i);

It breaks compilation under MS Visual C++ 6.0.

Replacing long long with PY_LONG_LONG and 1ULL with ((unsigned PY_LONG_LONG) 1) fixes the problem with MSVC.

Attachments

py_long_long.patch Download (2.2 KB) - added by xi 6 years ago.
Replace long long with PY_LONG_LONG in the code generator

Change History

Changed 6 years ago by xi

Replace long long with PY_LONG_LONG in the code generator

Changed 5 years ago by robertwb

Revisit after #333

Changed 5 years ago by robertwb

  • status changed from new to closed
  • resolution set to duplicate

Looks like this has been resolved with the get/set/del item int rewrite.

Changed 5 years ago by robertwb

  • milestone changed from wishlist to 0.12
Note: See TracTickets for help on using tickets.