I'm trying to interface a C++ library (pHash) with Python using Cython, but I have trouble with some of the types. The library functions use "unsigned long long" and I can't find a way to declare variables and parameters with this type. I searched for a list of the types that I can use with cdef but I found nothing. Can anyone point me to such a list (if it exists) or otherwise suggest a way to use 64 bit types in Cython? Thanks.
A:
I've been able to use both unsigned long long
and long long
just fine with cdef. See for instance my answer to this question here. I just tried running the same code there with unsigned long long
instead of long long
and it worked just fine. Can you be more specific about what problems you are having with these types? Maybe you could post some source code that isn't working for you?
Justin Peel
2010-06-10 22:05:18
I tried once more and now everything is working. I still can't figure out what I did wrong. Thank you for your reply.
Homayoon
2010-06-10 22:46:38
@Homayoon - great, can you please accept this answer then.
joefis
2010-06-11 10:44:07