12 messages in net.java.dev.jna.usersRe: [jna-users] Problem returning Str...
FromSent OnAttachments
Duncan McGregorFeb 9, 2009 2:13 pm 
Timothy WallFeb 9, 2009 2:24 pm 
Timothy WallFeb 9, 2009 2:31 pm 
Duncan McGregorFeb 9, 2009 4:22 pm 
Timothy WallFeb 9, 2009 4:57 pm 
Duncan McGregorFeb 9, 2009 5:39 pm 
Timothy WallFeb 9, 2009 5:48 pm 
Timothy WallFeb 9, 2009 6:00 pm 
Timothy WallFeb 9, 2009 6:07 pm 
Duncan McGregorFeb 9, 2009 6:10 pm 
Duncan McGregorFeb 10, 2009 2:53 am 
Duncan McGregorFeb 10, 2009 7:42 am 
Actions with this message:
Paste this link in email or IM:
Paste this link in email or IM:
Atom feed for this thread
Paste this URL into your reader:
Subject:Re: [jna-users] Problem returning Structure.ByValue on Mac, JNA 3.0.6+Actions...
From:Duncan McGregor (dun@oneeyedmen.com)
Date:Feb 10, 2009 2:53:51 am
List:net.java.dev.jna.users

On 10 Feb 2009, at 02:08, Timothy Wall wrote:

looks like the problem is in native/libffi/src/ffi.c. The version from 3.0.5 works, so something is wrong with the win64 patch.

If I revert this

Index: native/libffi/src/x86/ffi.c =================================================================== --- native/libffi/src/x86/ffi.c (revision 761) +++ native/libffi/src/x86/ffi.c (working copy) @@ -46,7 +46,7 @@

argp = stack;

- if (ecif->cif->rtype->type == FFI_TYPE_STRUCT) + if (ecif->cif->flags == FFI_TYPE_STRUCT) { *(void **) argp = ecif->rvalue; argp += sizeof(void*);

it still passes all the JNA tests, and mine. But

if (ecif->cif->rtype->type == FFI_TYPE_STRUCT || ecif->cif->flags == FFI_TYPE_STRUCT)

fails, so I _think_ that in my test case there is a time when

ecif->cif->rtype->type == FFI_TYPE_STRUCT

and

ecif->cif->flags != FFI_TYPE_STRUCT

and ecif->cif->flags is righter.

How do you cope with this stuff? I hope whoever pays you appreciates your talents!