Re: Announce - First release of libchamplain's bindings
- From: Torsten Schoenfeld <kaffeetisch gmx de>
- To: gtk-perl-list gnome org
- Subject: Re: Announce - First release of libchamplain's bindings
- Date: Mon, 16 Mar 2009 09:48:16 +0100
Emmanuel Rodriguez wrote:
I finally released to CPAN the first release of libchamplain's bindings
(Download here http://search.cpan.org/perldoc?Champlain). Libchamplain
consists of a Clutter actor (a canvas) that supports numerous free map
sources such as OpenStreetMap <http://www.openstreetmap.org/>,
for free <http://www.maps-for-free.com/>.
It looks like if the Gtk2/Glib helper methods don't pickup
ChamplainViewEmbed as a valid GType but I don't know how to fix this.
I think this happens because in champlain-perl.h you include champlain-autogen.h
before champlain-gtk/champlain-gtk.h. This means that
GTK_TYPE_CHAMPLAIN_VIEW_EMBED is not defined when champlain-autogen.h is pulled
in, so SvChamplainViewEmbed and newSVChamplainViewEmbed don't get defined.
General rule: include foo-autogen.h after all type macros have been defined.
Another question, are the Perl bindings making a difference for functions
that return "gchar *" instead of "const gchar *"? From my understading any
function returning a "gchar *" should have the string freed by the invoker
while a "const gchar *" should never be freed. Is the bindings code
performing the free for me or should I do it?
No, 'const gchar*' and 'gchar*' are treated the same. If a functions returns a
string that the caller is supposed to free, use 'const gchar_own*' or 'gchar_own*'.
] [Thread Prev