Skip navigation.
 
mlRe: Distributed objects: can't send simple C struct by value
FROM : Jim Correia
DATE : Sat Oct 30 19:46:27 2004

On Oct 30, 2004, at 4:16 AM, Michael Heins wrote:

> I'm trying to send a simple C struct by value in a message to a remote
> object, but can't get it to work.  Is this a known bug or limitation
> in the DO system?  Here's an example of the struct I'm sending:
>
> struct _Msg {
>     int a_fill;
>     char name[64];
>     int b_fill;
> };


Does your struct use something other than PPC structure alignment?

DO only supports the processors native alignment. (If you need to force
something else, like Mac68k alignment, you'll have to wrap the struct
in an NSData and "decode" it by hand on the other side of the DO
connection.)

Jim

Related mailsAuthorDate
mlDistributed objects: can't send simple C struct by value Michael Heins Oct 30, 10:16
mlRe: Distributed objects: can't send simple C struct by value Wade Tregaskis Oct 30, 11:25
mlRe: Distributed objects: can't send simple C struct by value Michael Heins Oct 30, 16:28
mlRe: Distributed objects: can't send simple C struct by value Wade Tregaskis Oct 30, 17:21
mlRe: Distributed objects: can't send simple C struct by value Michael Heins Oct 30, 18:14
mlRe: Distributed objects: can't send simple C struct by value Jim Correia Oct 30, 19:46
mlRe: Distributed objects: can't send simple C struct by value Michael Heins Oct 30, 19:59
mlRe: Distributed objects: can't send simple C struct by value Michael Heins Oct 31, 17:53