Commit 1e98c40c authored by Stefan Behnel's avatar Stefan Behnel

Replace some external .h files in tests with inline C code in the test file that uses them.

parent d034742a
enum Enum1 {
Item1,
Item2
};
namespace Namespace1 {
enum Enum2 {
Item3,
Item4
};
}
# tag: cpp
# mode: compile
cdef extern from "cpp_enums.h":
cdef extern from *:
"""
enum Enum1 {
Item1,
Item2
};
"""
cdef enum Enum1:
Item1
Item2
......@@ -13,7 +20,16 @@ cdef Enum1 x, y
x = Item1
y = Item2
cdef extern from "cpp_enums.h" namespace "Namespace1":
cdef extern from * namespace "Namespace1":
"""
namespace Namespace1 {
enum Enum2 {
Item3,
Item4
};
}
"""
cdef enum Enum2:
Item3
Item4
......
struct CrunchyType {
int number;
PyObject* string;
};
cdef extern from "crunchytype.h":
cdef extern from *:
"""
struct CrunchyType {
int number;
PyObject* string;
};
"""
cdef class crunchytype.Crunchy [ object CrunchyType ]:
cdef int number
cdef object string
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment