Re: gtk2 news
- From: Scott Smith <ssmith watson wustl edu>
- To: gtk-perl-list gnome org
- Subject: Re: gtk2 news
- Date: 12 Sep 2002 14:56:05 -0500
sounds like a plan!
here are a couple of things i noticed from writing a rather large XS
project which needed to interface to the original GtkPerl ------ you
might want to watch out for these if you haven't considered them already:
- memory leaks are very easy to create, especially when passing a perl
list as args to a callback, or in general any callback data. in most
places, the fix for these leaks was to hand-code the XS interface for
that function.
Any suggestions you have would be greatly appreciated.
- the type system used a cache to speed up type lookups. will such
caching be necessary with GObject as opposed to GtkObject?
- in several points of the API, turning the existing function names into
sensible perl OO syntax required some special handling ---- especially
with functions which modified arguments. in the old code these were
hand-coded to have them pass back the multiple return values as a list,
in the perl-ish style. are you planning to have a perl-ish interface to
the generated code, or keep it C-ish? how will you determine which ones
are return values?
My initial angle was to wrap the C functions at a very low level, and
have a perl-ish wrapper figure out exactly how to call the
c-function-wrapper created by XS, and exactly how to make the results
perl-ish. It may be better for speed to move some of those into the XS
layer.
not meaning to cast aspersions, i'm honestly trying to help. if you
need/want coding help, gimme a holler.
I'll hopefully have the code I have so-far up tonight.
Scott
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]