This is the mail archive of the
libffi-discuss@sourceware.org
mailing list for the libffi project.
Re: Calling c++ functions returning non-pod types
- From: Andrew Haley <aph at redhat dot com>
- To: Philip Ashmore <contact at philipashmore dot com>
- Cc: libffi-discuss at sourceware dot org
- Date: Thu, 21 Feb 2013 15:19:36 +0000
- Subject: Re: Calling c++ functions returning non-pod types
- References: <5126214C.2090909@philipashmore.com>
On 02/21/2013 01:29 PM, Philip Ashmore wrote:
> I think a better option would be to tell libffi that the return type is
> a "non-pod" and let it jump the hoops appropriate for the architecture -
> am I correct in guessing that my approach isn't portable?
Sort of. There is a standardish C++ ABI known for reasons too arcane to
go into as the Itanium C++ ABI
http://refspecs.linux-foundation.org/cxxabi-1.83.html
However, putting all this stuff into libffi would be too much IMO. You
could think of defining a C++ layer that calls libffi.
Andrew.