On Sat, Jun 4, 2011 at 10:36 AM, Seth Shannin <sshan...@stwing.upenn.edu> wrote:
test.h:11: warning: 'struct __pyx_obj_4test_foo' declared inside parameter
list
test.h:11: warning: its scope is only this definition or declaration, which
is probably not what you want
Not sure about Cython, but the way to to this in Pyrex
is to declare the class 'public' as well, and then the
struct declaration for it will be put in the .h file.
You will need to supply C names for the struct and type
object as well, e.g.
cdef public class foo[type FooType, object FooObject]:
...
The generated test.h file then contains
struct FooObject {
PyObject_HEAD
int a;
int b;
};
__PYX_EXTERN_C DL_IMPORT(void) bar(struct FooObject *);
__PYX_EXTERN_C DL_IMPORT(struct FooObject) *make_foo(int,int);
--
Greg
_______________________________________________
cython-devel mailing list
cython-devel@python.org
http://mail.python.org/mailman/listinfo/cython-devel