bug-ncurses
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: ABI, "public" variables


From: Thomas Dickey
Subject: Re: ABI, "public" variables
Date: Thu, 25 Aug 2011 17:51:00 -0400 (EDT)

On Thu, 25 Aug 2011, Andrius Bentkus wrote:

Hello,
I'm currently writing some some bindings for my favorite language, it has
the ability to access publicly exposed C functions.
The problem I am facing now is that there are some objects which are of
utter importance and yet they are exposed not using extern functions, which
makes it impossible to write bindings with languages which feature extern C
function access.

So, my suggestion is to make all the public variable additionally accessible
with c functions in order to avoid unnecessary wrappers.

Without a specific example, I'm not sure which case you're referring to.
The cases that I recall are all contrived to present a consistent interface to C, which can be hard to map to other languages.

There are some that are only macros (such as getyx) because there's
no way to make a C function with the same parameters, but there are
workarounds for that case.

For the library configured with support for reentrancy - that does rely
a lot on macros to hide private functions (which happen to all be declared
extern in curses.h).

(I'll be out of town for a few days - am getting ready to go this evening).

--
Thomas E. Dickey
http://invisible-island.net
ftp://invisible-island.net



reply via email to

[Prev in Thread] Current Thread [Next in Thread]