This is the mail archive of the
libffi-discuss@sourceware.org
mailing list for the libffi project.
Re: struct by value copies
- From: Thomas Heller <theller at ctypes dot org>
- To: libffi-discuss at sourceware dot org
- Cc: Timothy Wall <twalljava at dev dot java dot net>
- Date: Tue, 02 Sep 2008 20:22:42 +0200
- Subject: Re: struct by value copies
- References: <40AE4ADF-A2A2-41A0-A214-6A8E9DED722B@dev.java.net>
Timothy Wall schrieb:
> I'm wondering if the responsibility of making a copy of struct by
> value arguments lies with the caller of ffi_call or with libffi.
>
> I've been looking through different targets to see if this is done
> anywhere, and don't see copies made anywhere, so I would guess
> responsibility lies with the caller of ffi_call.
>
> Anyone know for sure?
Are you asking in the context of your win64 port? I do not know
the answer but I suspect that ffi_call makes the copy itself.
In my Python win64 libffi implementation there is still the bug that these
copies are not made (for structures that do not fit into a register)
although I have never seen this bug on other platforms.
I did not yet have the time to debug or fix this problem.
--
Thanks,
Thomas