Closed syarra closed 8 years ago
Yes, indeed. What seemed to be a simple bug turned out to be much more difficult than that...
I added unittests for the find()
method. It turns out that this did find another "bug": CPython
PyInt_Check
doesn't detect int32_t
under an architecture with int == int64_t
... Great!
See https://docs.python.org/2/c-api/int.html#c.PyInt_Check:
Return true if o is of type PyInt_Type or a subtype of PyInt_Type.
and https://docs.python.org/2/c-api/int.html#c.PyInt_Type:
This instance of PyTypeObject represents the Python plain integer type. This is the same object as int and types.IntType.
This means that under an architecture in 64 bits where int == int64_t
, int32_t
is NOT recognized as an int
type...
line 470 of
cysparse/sparse/csc_mat_matrices/csc_mat.cpx
should be
instead of
@counterclocker