From: Dag Sverre Seljebotn Date: Thu, 15 Oct 2009 07:05:08 +0000 (+0200) Subject: Testcase for #245 X-Git-Tag: 0.13.beta0~2^2~121^2~52^2~5 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=e640b5ef63da17157ced68a7f37e35582f1f2227;p=cython.git Testcase for #245 --- 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 +