Is it possible to pass pointers to defined types in Cython to constructors,
cdef extern from "Foo.h":
cdef cppclass Bar:
cdef class PyClass:
cdef Bar *bar
def __cinit__(self, Bar *b)
bar = b
When you do this, you get a *Cannot convert Python object to 'Bar *'*.* *
the top answer there is convoluted and seems to be just wrapping a double,
what I'm trying to do is a bit more complicated)
I am using such a construct to implement a "Has-A" (composition)
relationship between two types that are defined as structs in a C Library.
In my code, the Class *Bar* has a non-trivial constructor, and the
"constructor" for *PyClass* in C should receive a pointer to an initialized
Is there a simple way of doing this?