Re: Easing language bindings (was Re: GtkPlot widget)

Hash: SHA1

On Sun, 28 Nov 1999, Havoc Pennington wrote:

> exceptions, either in magic comments or in some kind of special file. The
> bindings generator tool would slurp the headers + the exception info into
> a data structure, then each binding author would write code to walk this

This seems like a good idea, and The Right Way to do this.

The major thing is going to be accessing functionality that's been put
into #defines and directly-manipulated objects. This is where the pain
lies, either a C wrapper has to be written (which then needs to be
distributed along with the bindings or incorporated into GNOME itself)
or they need to be changed in the library itself (which will break
things). I've already written the necessary bits for gnome-calculator
and gnome-canvas, it doesn't take very long, and is almost all single
line functions that can (and should) be inlined by gcc. Writing a tool
to walk the headers and do *this* is somewhat more problematic though,
especially for #defines.

This isn't something that should be tackled by the binding authours
only, but by the library maintainers.

> (trying not to laugh at the idea of language binding authors deciding what
> language to implement this in... ;-)

Surely this would be best done in m68k assembly? ;)

I think that the language it's going to be implemented in is almost
certainly going to be the language chosen by whoever writes the tool. ;)

- - Aidan

- --
"I could always suspend a few hundred accounts and watch what happens"
Version: GnuPG v1.0.0 (GNU/Linux)
Comment: please see for keys.


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