In cython the marshalling of the types like int or char is done automatically, but if I use a
cdef struct MyClass_Tag:
pass
ctypedef MyClass_Tag* MyClass_ptr
....
cdef class MyClass:
cdef MyClass_ptr obj
....
Now for wrapping any function like for example in c is some function foo that takes
foo(char* , MyClass_ptr self)
#return stuff
总结这一职能:
def py_foo(char* n, self):
return foo(n,self.obj)
So from py to c:
char is done automatically
but self is of type MyClass so to call the foo i have to write self.obj ,
so i pass the same obj
这里发生的情况是,从y到 c。
The problem is that I don t understand where happen the marshalling from c to py, I mean at which point does it happen?
Even in this case or even if you give me some other example it will be ok. Thank you!