Tests for ticket #355, ctypedef public classes
authorRobert Bradshaw <robertwb@math.washington.edu>
Thu, 10 Sep 2009 23:03:16 +0000 (16:03 -0700)
committerRobert Bradshaw <robertwb@math.washington.edu>
Thu, 10 Sep 2009 23:03:16 +0000 (16:03 -0700)
tests/compile/ctypedef_public_class_T355.pxd [new file with mode: 0644]
tests/compile/ctypedef_public_class_T355.pyx [new file with mode: 0644]

diff --git a/tests/compile/ctypedef_public_class_T355.pxd b/tests/compile/ctypedef_public_class_T355.pxd
new file mode 100644 (file)
index 0000000..bb4dddf
--- /dev/null
@@ -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 (file)
index 0000000..eff6e53
--- /dev/null
@@ -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