The following code works fine for me:
from cython.operator cimport dereference as deref
cdef extern from *:
cdef cppclass cppFoo:
pass
cdef cppclass cppFoo2:
int evaluateFoo(cppFoo)
cdef class Foo:
cdef cppFoo* ptr
cdef const cppFoo* constPtr
cdef class Foo2:
cdef cppFoo2* foo2ptr
def evaluateFoo(self, Foo foo):
if (foo.isConstant()):
return self.foo2ptr.evaluateFoo(deref(foo.constPtr))
else:
return self.foo2ptr.evaluateFoo(deref(foo.ptr))
> --
>
> ---
> You received this message because you are subscribed to the Google Groups
> "cython-users" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to
cython-users...@googlegroups.com.
> For more options, visit
https://groups.google.com/d/optout.