[Cython] cpdef wrapping of char* functions
Jim Kleckner
jek-gmane at kleckner.net
Wed Mar 19 06:04:23 CET 2008
I tried some wrapping of a function that returns a char* by
using cpdef and got an error:
File "/usr/lib/python2.5/site-packages/Cython/Compiler/Nodes.py",
line 897, in call_self_node
cfunc = ExprNodes.NameNode(self.pos, name=self.declarator.base.name)
AttributeError: CFuncDeclaratorNode instance has no attribute 'name'
Should this work?
It might be because it is at the module level and not in a class perhaps?
This is using 9.6.12.
Test case:
cdef extern from "foo.h":
cdef int c_baz "baz"()
cdef char* c_bar "bar"()
cpdef int baz():
return c_baz()
cpdef char* bar():
return c_bar()
More information about the Cython-dev
mailing list