[Date Prev][Date Next] [Thread Prev][Thread Next]
[Thread Index]
[Date Index]
[Author Index]
Re: [gtk2-perl-xs] Gnome2::About
- From: Christian Borup <borup borup com>
- To: Gtk+ Perl <gtk-perl-list gnome org>
- Subject: Re: [gtk2-perl-xs] Gnome2::About
- Date: 24 Apr 2003 21:53:14 +0200
On tor, 2003-04-24 at 17:17, muppet wrote:
> gtk2-perl-xs currently does not do anything special to unicode strings,
> because i am a country bumpkin in the 'states and have no experience with or
> use for unicode, nor any way to type it.
>
> the code still uses gchar all over the place, so i was planning to make it
> just a new typemap for gchar which does the appropriate utf8 conversions, but
> like i said, i don't know what those are.
I already made those typemaps... They are in the non-xs version. And
attached here.
> it will be relatively easy --- in gperl.h declare and in GType.xs define
> functions newSVgchar and SvGChar which convert between SV and gchar*
> appropriately; then create in gperl's typemap a new entry to use those instead
> of simply mapping gchar* to T_PV as it currently does.
>
> a complication is the fact that in many places we handle gchars without the
> typemap. these need to be replaced with newSVgchar / SvGChar instead of
> newSVpv / SvPV_nolen.
If noone beats me to it, I won't mind doing it. However it won't be for
the next week at least (deadlines at work). As muppet said it not hard,
but quite time consuming.
./borup
TYPEMAP
gchar * T_GCHAR
INPUT
T_GCHAR
sv_utf8_upgrade($arg);
$var = ($type)SvPV_nolen($arg)
OUTPUT
T_GCHAR
sv_setpv((SV*)$arg, $var);
SvUTF8_on($arg);
[Date Prev][Date Next] [Thread Prev][Thread Next]
[Thread Index]
[Date Index]
[Author Index]