Re: proper way to create a GString object from an unsigned char *
- From: "David Necas (Yeti)" <yeti physics muni cz>
- To: Adam Monsen <haircut gmail com>
- Cc: gtk-app-devel-list gnome org
- Subject: Re: proper way to create a GString object from an unsigned char *
- Date: Fri, 23 Jul 2004 22:10:22 +0200
On Fri, Jul 23, 2004 at 12:36:28PM -0700, Adam Monsen wrote:
What's the proper way to create a GString object from an unsigned char*?
I ask because I'm using libxml, and libxml has a xmlChar type (which
is an unsigned char). If I make an xmlChar* = "Hello World", how
should I make this into a GString?
Is it wrong to just cast xmlChar* to char*, even though xmlChar is an
unsigned char?
It's OK to cast unsigned char* to signed char* and vice
versa -- if you are working with strings, that is. If you
were doing arithmetics with the characters (i.e. using them
as small integers), then it could be different.
Yeti
--
Do not use tab characters. Their effect is not predictable.
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]