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

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
memory passed to functions or returned by them.  Strings are the a prime
example -- other non reference counted structures also have problems.
Even the behaviour with reference counted structures is not always

Something closer to the modified .defs file format Elliot suggested
looks more useful, although I would probably go for something a bit
simpler.  For bindings that make Gtk widgets look like objects with
methods, you really need a bit more information about what relation each
of the functions has to the object than what is contained in the header
files if you want to autogenerate bindings.



On Sun, 28 Nov 1999, Havoc Pennington wrote:

> On Sat, 27 Nov 1999, ERDI Gergo wrote:
> > I think a more clean solution would be to use IDLs instead of native C
> Which has Zero Concrete Benefits, makes the job of writing the language
> binding generator 10 times harder, and probably won't get supported by the
> GTK maintainers. Not a good idea if you want to actually get a working
> tool in a reasonable timeframe.
> C used consistently (as it almost always is in GTK) can work just fine as
> an IDL. You probably need to maintain some special exception lists
> (int/bool confusion, const gchar* vs. gchar* confusion, which struct
> members to make public) but that should not be hard (and some such as
> gint/gboolean can be fixed in the GTK sources themselves).
> Havoc
> -- 
> To unsubscribe: mail with "unsubscribe"
> as the Subject.

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