Re: g_malloc overhead
- From: "Martin (OPENGeoMap)" <martin opengeomap org>
- To: Maciej Piechotka <uzytkownik2 gmail com>
- Cc: gtk-devel-list gnome org, gtk-app-devel-list gnome org
- Subject: Re: g_malloc overhead
- Date: Mon, 26 Jan 2009 22:49:05 +0100
Maciej Piechotka escribió:
On Mon, 2009-01-26 at 22:30 +0100, Martin (OPENGeoMap) wrote:
I was talking about a full utf16 and utf8 api in glib and use a macro to
work work intermediate string:
Well - what do you mean? Having 2 functions - one reciving utf-16 and
one utf-8? To be honest - it doesn't make any sense to me (it would
create much mess, double the code, make programming errors easier...).
Converting? What's wrong with g_utf16_to_utf8?
For example in windows they have this types:
LPSTR =char *
char * is used for utf-8 AFAIR
LPWSTR= utf16windowschar *
perhaps in glib we could have utf16 and utf8 in that way or am i wrong?
I'm not glib developer. As far as the module of operating on utf-16
strings is proposed I'm not against. However I would prefere to not have
2 entries to each function.
What is wrong with:
gchar* g_utf8_strncpy (gchar *dest,const gchar *src,gsize n);
gunichar2 * g_utf16_strncpy (gunichar2*dest,const gunichar2*src,gsize n);
and the macro:
gtext* g_text_strncpy (gtext*dest,const gtext*src,gsize n);
] [Thread Prev