On Feb 27, 2009, at 1:13 PM, Dan wrote: >> I'm sure this can be done, but we'd need more details to answer your >> question. Are you using some Python wrapper of Qt, or are you calling >> Qt directly from Cython? How are you getting your data? >> >> -Robert > > I'm using PyQt. PyQt gives me Python ints which are the address of the > byte arrays and their lengths (both arrays are the same length). I'm > just passing those ints to a Cython function, Cython doesn't need > access to Qt or PyQt at all.
If x is the address to a byte array as a python int, you can do cdef byte *my_bytes = <byte*><size_t>x In Cython 0.11, size_t will be a native type, but until then you can use Py_ssize_t instead. - Robert _______________________________________________ Cython-dev mailing list [email protected] http://codespeak.net/mailman/listinfo/cython-dev
