[Haskell-cafe] Re: Could FFI support pass-by-value of structs?
bulat.ziganshin at gmail.com
Tue Jul 7 05:07:20 EDT 2009
Tuesday, July 7, 2009, 5:48:10 AM, you wrote:
>> you mean that on windows gcc, msvc and all other C compilers use the
>> same ABI for passing and packing structs?
> Yes. If you think about it, otherwise it would be impossible to
> interface with system provided shared libraries (like libc) unless there
> is a standard.
first, i asked about Windows. second, afair Win32 API doesn't have any
functions that pass or return entire records rather than pointers.
third, i've seen incompatibility problems with packing structs between
MSVC (8-byte alignment, afair) and Borland C++ (1-byte)
Bulat mailto:Bulat.Ziganshin at gmail.com
More information about the Haskell-Cafe