Re: ctypes & Wrapping Complex Datatypes
- From: Marc 'BlackJack' Rintsch <bj_666@xxxxxxx>
- Date: 16 Oct 2007 13:52:54 GMT
On Tue, 16 Oct 2007 06:47:06 -0700, gamename wrote:
I've just started using ctypes and so far, its great. But I'm running
to some problems with complex datatypes. I'm not sure how to wrap
something like this:
/* This defines the Handle type in a header file. I don't think
this needs wrapping, its just to show the handle definition for
context*/
typedef struct DFFTSHandle_s *DFFTSHANDLE;
...
/* Then, the handle is used like this later on. This *is* what I
want to wrap.*/
status = DFFTSCreateSession(&Handle);
status = DFFTSSetSessionOption(Handle, DFFTSOPT_ITERATIONS,
&iteration, sizeof(iteration));
If this "handle" is always just treated as a pointer to an opaque data
structure you may just use a void pointer.
Ciao,
Marc 'BlackJack' Rintsch
.
- Follow-Ups:
- Re: ctypes & Wrapping Complex Datatypes
- From: gamename
- Re: ctypes & Wrapping Complex Datatypes
- References:
- ctypes & Wrapping Complex Datatypes
- From: gamename
- ctypes & Wrapping Complex Datatypes
- Prev by Date: Re: confused on calculating date difference in days.
- Next by Date: Script to get the current Woot.com Product.
- Previous by thread: ctypes & Wrapping Complex Datatypes
- Next by thread: Re: ctypes & Wrapping Complex Datatypes
- Index(es):
Relevant Pages
|