From: Robert Bradshaw Date: Thu, 10 Sep 2009 23:03:16 +0000 (-0700) Subject: Tests for ticket #355, ctypedef public classes X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=a0414c5348209ab848b7a462b34e7cb743b0c155;p=cython.git Tests for ticket #355, ctypedef public classes --- diff --git a/tests/compile/ctypedef_public_class_T355.pxd b/tests/compile/ctypedef_public_class_T355.pxd new file mode 100644 index 00000000..bb4dddfc --- /dev/null +++ b/tests/compile/ctypedef_public_class_T355.pxd @@ -0,0 +1,5 @@ +ctypedef public class Time [type MyTime_Type, object MyTimeObject]: + cdef public double seconds + +ctypedef public class Event [type MyEvent_Type, object MyEventObject]: + cdef public Time time \ No newline at end of file diff --git a/tests/compile/ctypedef_public_class_T355.pyx b/tests/compile/ctypedef_public_class_T355.pyx new file mode 100644 index 00000000..eff6e53c --- /dev/null +++ b/tests/compile/ctypedef_public_class_T355.pyx @@ -0,0 +1,7 @@ +ctypedef public class Time [type MyTime_Type, object MyTimeObject]: + def __init__(self, seconds): + self.seconds = seconds + +ctypedef public class Event [type MyEvent_Type, object MyEventObject]: + def __init__(self, Time time): + self.time = time \ No newline at end of file