SWIG?

Andreas Rottmann a.rottmann at gmx.at
Sun Aug 31 02:54:16 CDT 2003


"Stallbaum, Sean" <Sean.Stallbaum at nationalcity.com> writes:

> Hi,
>
> I have been lurking for the couple of weeks and was wondering if
> anyone else was interested in the comment about SWIG?  I am curious
> because I am in the process of developing a java based program and
> would like to integrate GnuCash into it and it seems that SWIG would
> be ideal.  I myself have no experience with SWIG but would be more
> than willing to help out if others are interested.
>
I wonder if it isn't better to use the indiviual engines used by the
GTK+ bindings of Perl, Python and Guile. Why not SWIG? The current
Guile bindings use g-wrap. I guess in during the GNOME2 port, the
internal APIs could be re-written to use the GLib Object System. Then
these three engines will be able to basically [0] create wrappers from
the *original* C headers, and thus make the wrappers much more
maintainable, although providing an interface that contains (possibly)
OO and GTK-style signals -- see the nice tutorial at [1] for details
about GObject's features. Furthermore, the PyGTK and
g-wrap/Guile-GObject engines can collaborate on adjusting the output
of the header scanner, which is shared between guile-gobject and PyGTK
(originating in PyGTK). I'm not familiar with the Perl source, but it
upon a first glance it seems it also uses header scanning, and also
provides an OO interface for the GObject-based bindings. In my POV, OO
bindings are essential for good scripting language bindings for a
language which supports OO, which all of Guile, Python, Perl, Ruby
(and others) do. Maybe someony should have a look at the Ruby GTK+2
binding engine, so that Ruby is not locked out, if SWIG isn't not
chosen.

[ Disclaimer: I have not yet done any hacking on gnucash, but I would
  lend a hand in making Gnucash integrate wich guile-gobject, which
  makes probably sense for the GNOME2 port anyway, since guile-gobject
  has better GLib2 bindings than g-wrap, which only wraps a small part
  of 1.2. ]


[0] only minor adjustments, which can be done external to the
    headers needed
[1] http://www.gnome.org/~mathieu/gobject/main.html
-- 
Andreas Rottmann         | Rotty at ICQ      | 118634484 at ICQ | a.rottmann at gmx.at
http://www.8ung.at/rotty | GnuPG Key: http://www.8ung.at/rotty/gpg.asc
Fingerprint              | DFB4 4EB4 78A4 5EEE 6219  F228 F92F CFC5 01FD 5B62

This reality is really just a fucked-up dream -- Papa Roach


More information about the gnucash-devel mailing list