From ccaa5ea34e48315d4d5147ee870091b5ff7c2b1d Mon Sep 17 00:00:00 2001
From: Stefan Behnel <scoder@users.berlios.de>
Date: Wed, 9 Apr 2008 17:08:50 +0200
Subject: [PATCH] test case for 'cdef extern class' definitions in .pxd files

---
 tests/compile/crunchytype.h          | 5 +++++
 tests/compile/crunchytype.pxd        | 4 ++++
 tests/compile/extimportedsubtype.pyx | 7 +++++++
 3 files changed, 16 insertions(+)
 create mode 100644 tests/compile/crunchytype.h
 create mode 100644 tests/compile/crunchytype.pxd
 create mode 100644 tests/compile/extimportedsubtype.pyx

diff --git a/tests/compile/crunchytype.h b/tests/compile/crunchytype.h
new file mode 100644
index 000000000..6ea0e37c0
--- /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 000000000..c03e38dad
--- /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 000000000..dd081e0c7
--- /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
-- 
2.30.9