On Mon, 23 Feb 2009 10:55:23 +0100 (CET)
"Stefan Behnel" <[email protected]> wrote:

> Anatoly A. Kazantsev wrote:
> > I'm trying to wrap function with callback parameter:
> >
> > error_t fshelp_start_translator (fshelp_open_fn_t underlying_open_fn, void
> > *cookie, char *name, char *argz, int argz_len, int timeout, fsys_t
> > *control)
> >
> > where fshelp_open_fn_t is
> >
> > typedef error_t (*fshelp_open_fn_t) (int flags, file_t *node,
> > mach_msg_type_name_t *node_type, task_t, void *cookie)
> 
> Have you looked at the callback example in the Cython distribution?

Yes, of course.

But I can not understand how to pass pointer of Python callback-function.
Additional parameter 'void *user_data' is used in the example for this purpose.

But I can't modify 'fshelp_open_fn_t' function type.

-- 
Anatoly A. Kazantsev <[email protected]>

Attachment: pgpRhRp6FStY7.pgp
Description: PGP signature

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

Reply via email to