From: Stefan Behnel Date: Wed, 9 Apr 2008 15:08:50 +0000 (+0200) Subject: test case for 'cdef extern class' definitions in .pxd files X-Git-Tag: 0.9.6.14~20^2~38 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=ccaa5ea34e48315d4d5147ee870091b5ff7c2b1d;p=cython.git test case for 'cdef extern class' definitions in .pxd files --- diff --git a/tests/compile/crunchytype.h b/tests/compile/crunchytype.h new file mode 100644 index 00000000..6ea0e37c --- /dev/null +++ b/tests/compile/crunchytype.h @@ -0,0 +1,5 @@ + +struct CrunchyType { + int number; + PyObject* string; +}; diff --git a/tests/compile/crunchytype.pxd b/tests/compile/crunchytype.pxd new file mode 100644 index 00000000..c03e38da --- /dev/null +++ b/tests/compile/crunchytype.pxd @@ -0,0 +1,4 @@ +cdef extern from "crunchytype.h": + cdef class crunchytype.Crunchy [ object CrunchyType ]: + cdef int number + cdef object string diff --git a/tests/compile/extimportedsubtype.pyx b/tests/compile/extimportedsubtype.pyx new file mode 100644 index 00000000..dd081e0c --- /dev/null +++ b/tests/compile/extimportedsubtype.pyx @@ -0,0 +1,7 @@ +from crunchytype cimport Crunchy + +cdef class Sub2(Crunchy): + cdef char character + +cdef class Sub1(Sub2): + cdef char character