From a0414c5348209ab848b7a462b34e7cb743b0c155 Mon Sep 17 00:00:00 2001 From: Robert Bradshaw Date: Thu, 10 Sep 2009 16:03:16 -0700 Subject: [PATCH] Tests for ticket #355, ctypedef public classes --- tests/compile/ctypedef_public_class_T355.pxd | 5 +++++ tests/compile/ctypedef_public_class_T355.pyx | 7 +++++++ 2 files changed, 12 insertions(+) create mode 100644 tests/compile/ctypedef_public_class_T355.pxd create mode 100644 tests/compile/ctypedef_public_class_T355.pyx 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 -- 2.26.2