Re: UTF8
- From: Guillaume Cottenceau <gc mandrakesoft com>
- To: Christian Borup <borup borup com>
- Cc: Gtk+ Perl <gtk-perl-list gnome org>
- Subject: Re: UTF8
- Date: 29 Oct 2002 15:41:31 +0100
Christian Borup <borup borup com> writes:
Warning, newSVgchar is a wrapper to convert a newly-allocated
gchar* into a perl object, to not leak memory when calling gtk
functions that do allocate a gchar* when called. If you look at
the prototype of gtk_entry_get_text, it isn't the case, so if you
use newSVgchar is will corrupt memory and possibly segfault on
you.
I noticed that, it segfaults allright :-)
The function name "newSVgchar" is not very well chosen, but I
didn't find a better one (to signify that it frees up the
gchar*), so if anyone has a suggestion..?
Which is why the newSVgchar is not used for gtk_entry_get_text in my
patch. I'm thinking of adding a typemap to handle gchar, and have that
call SvUTF8_on on the SV's (obviously I'd have to change all char* to
gchar*).
--
Guillaume Cottenceau - http://people.mandrakesoft.com/~gc/
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]