This is the mail archive of the libffi-discuss@sourceware.org mailing list for the libffi project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH] Use FFI_DECLARE macros


On 02/24/2010 06:59 PM, Dan Witte wrote:
----- "Mladen Turk"<mturk@redhat.com> wrote:


Right this is one of the options. Using define in client code allows to ship the dynamic and static lib with the same set of headers.

Ah, OK. That's certainly not a use case for us (and probably anyone who's embedding libffi in their app), so perhaps you could have the substitution "do the right thing" for the common case, and have additional FFI_FORCE_STATIC/FFI_FORCE_SHARED to override that people can #define before #including ffi.h?



Actually there is no need for the FFI_DECLARE macros. Since the public API is relatively small and fixed a .def file will do the trick.

However they might get extended for GCC4
with visibility("default"), axing FFI_HIDDEN
and using -fvisibility=hidden at compile time.
In that only FFI_DECLARE definitions would make
the public API.

http://gcc.gnu.org/wiki/Visibility

IMHO it's better to maintain the public API then
hiding the remaining.


Regards -- ^TM


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]