[Cython] Py3, TypeConversion.c, PyLong internals

Lisandro Dalcin dalcinl at gmail.com
Tue Mar 10 15:28:36 CET 2015


Robert, please look at this line:
https://github.com/cython/cython/blob/0.22.x/Cython/Utility/TypeConversion.c#L559

You are still using a PyLong internal detail to test for signedness.
I'm getting a strange error with PyPy3 that might be related to this,
see this traceback:
https://travis-ci.org/mpi4py/mpi4py/jobs/53793609#L5650

The code generating this traceback is linked below,
the__setitem__method of the variable "m" is coded to only accept
"usigned char" values.

https://bitbucket.org/mpi4py/mpi4py/src/86e4235ee2ec31832031ce020421810c51d4910b/test/test_rma.py?at=master#cl-13

Any suggestions about how to check signedness in Python 3 (CPython and
PyPy) without using Py_SIZE() ?

-- 
Lisandro Dalcin
============
Research Scientist
Computer, Electrical and Mathematical Sciences & Engineering (CEMSE)
Numerical Porous Media Center (NumPor)
King Abdullah University of Science and Technology (KAUST)
http://numpor.kaust.edu.sa/

4700 King Abdullah University of Science and Technology
al-Khawarizmi Bldg (Bldg 1), Office # 4332
Thuwal 23955-6900, Kingdom of Saudi Arabia
http://www.kaust.edu.sa

Office Phone: +966 12 808-0459


More information about the cython-devel mailing list