From e640b5ef63da17157ced68a7f37e35582f1f2227 Mon Sep 17 00:00:00 2001 From: Dag Sverre Seljebotn Date: Thu, 15 Oct 2009 09:05:08 +0200 Subject: [PATCH] Testcase for #245 --- tests/run/crashT245.h | 4 ++++ tests/run/crashT245.pyx | 12 ++++++++++++ tests/run/crashT245_pxd.pxd | 4 ++++ 3 files changed, 20 insertions(+) create mode 100644 tests/run/crashT245.h create mode 100644 tests/run/crashT245.pyx create mode 100644 tests/run/crashT245_pxd.pxd diff --git a/tests/run/crashT245.h b/tests/run/crashT245.h new file mode 100644 index 00000000..8a615517 --- /dev/null +++ b/tests/run/crashT245.h @@ -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 index 00000000..70228cd8 --- /dev/null +++ b/tests/run/crashT245.pyx @@ -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 index 00000000..e8a654c8 --- /dev/null +++ b/tests/run/crashT245_pxd.pxd @@ -0,0 +1,4 @@ +cdef extern from "crashT245.h": + ctypedef struct MyStruct: + int x + -- 2.26.2