I noticed two failures to compile that I think are bugs:
- "ctypedef Foo[int] Bar" gives a syntax error (i.e., there doesn't seem to be any way to typedef a templated type).
- Defining a struct in a namespace and trying to convert it to a Python dict doesn't work. Instead you get nasty "__pyx_convert__to_py_THENAMESPACE" errors from the C++ compiler (it doesn't mangle the cname properly and tries to define __pyx_convert__to_py_THENAMESPACE::THESTRUCT).
I made a patch to *add tests* for the two bugs (not fix them).
--- /dev/null
+cdef extern from "point.h" namespace "geometry":
+
+ cdef struct Point:
+ double x
+ double y
+ int color
+
+cdef Point p = Point(0.0, 0.0, 0)
+the_point = p
--- /dev/null
+cdef extern from *:
+ cdef cppclass Foo[T]:
+ pass
+ ctypedef Foo[int] IntFoo
--- /dev/null
+#ifndef POINT_H
+#define POINT_H
+
+namespace geometry {
+
+ struct Point
+ {
+ double x;
+ double y;
+ int color;
+ };
+}
+
+#endif