Testcase for #245
authorDag Sverre Seljebotn <dagss@student.matnat.uio.no>
Thu, 15 Oct 2009 07:05:08 +0000 (09:05 +0200)
committerDag Sverre Seljebotn <dagss@student.matnat.uio.no>
Thu, 15 Oct 2009 07:05:08 +0000 (09:05 +0200)
tests/run/crashT245.h [new file with mode: 0644]
tests/run/crashT245.pyx [new file with mode: 0644]
tests/run/crashT245_pxd.pxd [new file with mode: 0644]

diff --git a/tests/run/crashT245.h b/tests/run/crashT245.h
new file mode 100644 (file)
index 0000000..8a61551
--- /dev/null
@@ -0,0 +1,4 @@
+typedef struct {
+    int x
+} MyStruct;
+
diff --git a/tests/run/crashT245.pyx b/tests/run/crashT245.pyx
new file mode 100644 (file)
index 0000000..70228cd
--- /dev/null
@@ -0,0 +1,12 @@
+cimport crashT245_pxd
+
+"""
+>>> f()
+{'x': 1}
+"""
+
+def f():
+    cdef crashT245_pxd.MyStruct s
+    s.x = 1
+    print s
+
diff --git a/tests/run/crashT245_pxd.pxd b/tests/run/crashT245_pxd.pxd
new file mode 100644 (file)
index 0000000..e8a654c
--- /dev/null
@@ -0,0 +1,4 @@
+cdef extern from "crashT245.h":
+    ctypedef struct MyStruct:
+        int x
+