[Cython] "long long" versus "PY_LONG_LONG"

2015-03-29 Thread Lisandro Dalcin
At some point Cython lost the ability of using PY_LONG_LONG instead of "long long" in generated C code. The big offenders are the following two files: Cython/Utility/Overflow.c Cython/Utility/TypeConversion.c Do we want to continue using PY_LONG_LONG? Otherwise, what about Microsoft compilers? Go

Re: [Cython] [cython-users] Re: Bringing Cython and PyPy closer together

2015-03-29 Thread Lisandro Dalcin
On 18 February 2012 at 19:11, Stefan Behnel wrote: > Stefan Behnel, 18.02.2012 09:54: >> Stefan Behnel, 15.02.2012 12:32: >>> The current state of the discussion seems to be that PyPy provides ways to >>> talk to C code, but nothing as complete as CPython's C-API in the sense >>> that it allows ef

Re: [Cython] "long long" versus "PY_LONG_LONG"

2015-03-29 Thread Stefan Behnel
Lisandro Dalcin schrieb am 29.03.2015 um 12:17: > At some point Cython lost the ability of using PY_LONG_LONG instead of > "long long" in generated C code. The big offenders are the following > two files: > > Cython/Utility/Overflow.c > Cython/Utility/TypeConversion.c > > Do we want to continue u

Re: [Cython] "long long" versus "PY_LONG_LONG"

2015-03-29 Thread Lisandro Dalcin
On 29 March 2015 at 13:33, Stefan Behnel wrote: > Lisandro Dalcin schrieb am 29.03.2015 um 12:17: >> At some point Cython lost the ability of using PY_LONG_LONG instead of >> "long long" in generated C code. The big offenders are the following >> two files: >> >> Cython/Utility/Overflow.c >> Cytho

Re: [Cython] [cython-users] Re: Bringing Cython and PyPy closer together

2015-03-29 Thread Stefan Behnel
Lisandro Dalcin schrieb am 29.03.2015 um 12:23: > One thing that Cython developers really need is PyPy defining a macro > such as PYPY_VERSION_HEX in such a way us we can properly use > conditional compilation. For example, a few days ago I was pushing > PyPy fixes to Cython. I tried to use _PyLong

Re: [Cython] [cython-users] Re: Bringing Cython and PyPy closer together

2015-03-29 Thread Lisandro Dalcin
On 29 March 2015 at 14:16, Stefan Behnel wrote: > Lisandro Dalcin schrieb am 29.03.2015 um 12:23: >> One thing that Cython developers really need is PyPy defining a macro >> such as PYPY_VERSION_HEX in such a way us we can properly use >> conditional compilation. For example, a few days ago I was

Re: [Cython] [cython-users] Re: Bringing Cython and PyPy closer together

2015-03-29 Thread Stefan Behnel
Lisandro Dalcin schrieb am 29.03.2015 um 14:52: >> Lisandro Dalcin schrieb am 29.03.2015 um 12:23: >>> One thing that Cython developers really need is PyPy defining a macro >>> such as PYPY_VERSION_HEX in such a way us we can properly use >>> conditional compilation. For example, a few days ago I w

Re: [Cython] "long long" versus "PY_LONG_LONG"

2015-03-29 Thread Lisandro Dalcin
On 29 March 2015 at 14:19, Lisandro Dalcin wrote: > On 29 March 2015 at 13:33, Stefan Behnel wrote: >> Lisandro Dalcin schrieb am 29.03.2015 um 12:17: >>> At some point Cython lost the ability of using PY_LONG_LONG instead of >>> "long long" in generated C code. The big offenders are the followin

Re: [Cython] [cython-users] Re: Bringing Cython and PyPy closer together

2015-03-29 Thread Lisandro Dalcin
On 29 March 2015 at 16:10, Stefan Behnel wrote: > Why not call PyObject_RichCompareBool() to make cpyext itself compare the > value to 0? That should definitely work. Let me try to put a patch together. -- Lisandro Dalcin Research Scientist Computer, Electrical and Mathematical S

Re: [Cython] [cython-users] Re: Bringing Cython and PyPy closer together

2015-03-29 Thread Lisandro Dalcin
On 29 March 2015 at 20:30, Lisandro Dalcin wrote: > On 29 March 2015 at 16:10, Stefan Behnel wrote: >> Why not call PyObject_RichCompareBool() to make cpyext itself compare the >> value to 0? > > That should definitely work. Let me try to put a patch together. > Stefan, how to you feel about abu

Re: [Cython] [cython-users] Re: Bringing Cython and PyPy closer together

2015-03-29 Thread Stefan Behnel
Lisandro Dalcin schrieb am 29.03.2015 um 19:40: > On 29 March 2015 at 20:30, Lisandro Dalcin wrote: >> On 29 March 2015 at 16:10, Stefan Behnel wrote: >>> Why not call PyObject_RichCompareBool() to make cpyext itself compare the >>> value to 0? >> >> That should definitely work. Let me try to put a

Re: [Cython] [cython-users] Re: Bringing Cython and PyPy closer together

2015-03-29 Thread Lisandro Dalcin
On 29 March 2015 at 21:02, Stefan Behnel wrote: > Lisandro Dalcin schrieb am 29.03.2015 um 19:40: >> On 29 March 2015 at 20:30, Lisandro Dalcin wrote: >>> On 29 March 2015 at 16:10, Stefan Behnel wrote: Why not call PyObject_RichCompareBool() to make cpyext itself compare the value to 0?