Hi,
Case Vanhorsen wrote:
> I am trying to access the internal structure of a Python long. The code
> fragment below works when I use Pyrex 0.9.8.4 but generates a compile error
> when using Cython 0.9.8.
> [...]
> The error:
>
> Error converting Pyrex file to C:
> ------------------------------------------------------------
> ...
> int ob_size
> unsigned int * ob_digit
> def test(temp = long(0)):
> cdef _longobject *l
> l = <_longobject *> temp
> print sizeof(l.ob_size)
> ^
> ------------------------------------------------------------
>
> /home/case/code/cvh.pyx:16:18: 'cvh.test' is not a cimported module
FWIW, I get a different error for the current head:
Error converting Pyrex file to C:
------------------------------------------------------------
...
unsigned int * ob_digit
def test(temp = long(0)):
cdef _longobject *l
l = <_longobject *> temp
print sizeof(l.ob_size)
print sizeof(l.ob_digit[0])
^
------------------------------------------------------------
/.../pylong.pyx:17:28: Expected: type
Looks like a bug to me.
Stefan
_______________________________________________
Cython-dev mailing list
[email protected]
http://codespeak.net/mailman/listinfo/cython-dev