[Pyrex] [Bug?] Pyrex cannot convert python object to unsigned char?

Alexander Belchenko bialix at ukr.net
Sat Sep 15 13:41:55 CEST 2007


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Simple example:

cdef extern "module.h":
    void c_func(unsigned char pixel)

class Foo(object):

    def write_pixel(self, unsigned char pixel):
        c_func(pixel)

When I try to compile this code I got error:

foo.pyx:6:26: Cannot convert Python object argument to type 'unsigned char'

If I change `unsigned char` to `unsigned short` then code translated without errors.
Is it known bug or feature?
I use Pyrex 0.9.5.1a on win32.

[µ]
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.5 (MingW32)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFG68UDzYr338mxwCURAttGAJ9u7rw2eUyRSYTgOSVvZ0TC/CXnoQCfUoHP
H8RNFwGos/UEihq2jV3dRDw=
=3WM/
-----END PGP SIGNATURE-----




More information about the Pyrex mailing list