[Date Prev][Date Next] [Thread Prev][Thread Next]
[Thread Index]
[Date Index]
[Author Index]
Re: gchar-char-GString
- From: Owen Taylor <otaylor redhat com>
- To: millward Ms UManitoba CA
- Cc: gtk-app-devel-list gnome org
- Subject: Re: gchar-char-GString
- Date: 04 Oct 2001 09:03:32 -0400
author <millward@Ms.UManitoba.CA> writes:
> Is there a simple way to avoid having to constantly
> cast between GTK types and POSIX/ANSI data types?
> If you want to use POSIX/ANSI C functions you have
> to use the proper data types, but GTK has its own
> proprietory data types. Then there's GTK's string
> manipulator functions which uses GString data type
> which doesn't agree with any GTK functions I've seen yet.
> Constantly casting!
> Can anyone tell me how to get around this data type problem?
Leave out the casts? We have:
typedef int gint;
typedef char gchar;
typedef double gdouble;
And this will _always_ be the case. The GLib types are
only aliases for the standard names (some people like
the consistency with guint, gint32, etc.)
[ Note that thiws doesn't apply to GString, which is not
just a char *. To get a char * out of a GString, use
g_string->str ]
Regards,
Owen
[Date Prev][Date Next] [Thread Prev][Thread Next]
[Thread Index]
[Date Index]
[Author Index]