Re: UTF8

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

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

Guillaume Cottenceau -

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