Opened 6 years ago

Closed 5 years ago

Last modified 5 years ago

#176 closed defect (duplicate)

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 (1)

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

Download all attachments as: .zip

Change History (4)

Changed 6 years ago by xi

Replace long long with PY_LONG_LONG in the code generator

comment:1 Changed 5 years ago by robertwb

Revisit after #333

comment:2 Changed 5 years ago by robertwb

  • Resolution set to duplicate
  • Status changed from new to closed

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

comment:3 Changed 5 years ago by robertwb

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