Re: How to deal with C_POINTR?
- Posted by Derek Parnell <ddparnell at bigpond.com> Mar 31, 2003
- 425 views
----- Original Message ----- From: <stabmaster_ at hotmail.com> To: "EUforum" <EUforum at topica.com> Subject: Re: How to deal with C_POINTR? > > >when define and call c_func often there are parameters passed by > >pointers, then how to send and get data if it is a c struct? > > Let's say you have: > > typedef struct > { > int a,b; > } foo; > > foo *bar(foo *grill) > { > return grill; > } The problem though is when you have something like ... foo bar(foo grill) { return grill; } In other words, the struct is passed by value, not as a pointer to struct. In this case, it is difficult. Sometimes, if the stuct ONLY has 32-bit values in it, you can fake passing it as a set of C_UINT values, but returning a struct is impossible, I suspect. ---------------- cheers, Derek Parnell