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




On Sun, 28 Nov 1999, James Henstridge wrote:
> The problem is that straight C is not always expressive enough for this
> sort of thing.  For instance, it does not tell us who has ownership of

What I have in mind is generating the basic list of funcitons and types
from the C headers; you assume that "the rules" are followed (bools are
declared gboolean, returned gchar* are allocated, functions starting
gtk_widget_ with a GtkWidget* first arg are supposed to be GtkWidget
methods, etc.) and you have add-on information somewhere for all the
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
generic info and generate their bindings, possibly taking an additional
language-specific exception list into account.

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




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