I have two lib functions declared like this:

void arg_set(handle p, void *arg)
void arg_get(handle p, void **arg)

I call arg_set() from an instance of extension type, like this:
arg_set(handle, <void *>self)

Hoping to access the instance back in arg_get. So in a callback function I do:

cdef void** arg
arg_get(handle, arg)

But I cannot figure out how to use the retrieved arg, I keep getting
segfaults, or object has no such attrib type of errors...

print "call back: config_update: tm_arg_get: ",(<object>(<void*>arg[0])).channel

What would be the right way to dereference such a pointer?

I also tried:
cdef void* arg
arg_get(handle, &arg)
print "call back: config_update: arg_get: ",(<object>arg[0]).channel

But would not compile. gcc dies.

Thanks alot,
Mohamed.
_______________________________________________
Cython-dev mailing list
[email protected]
http://codespeak.net/mailman/listinfo/cython-dev

Reply via email to