Re: [PATCH] ANSI C correctness + warning fixes



Tim Janik <timj gtk org> writes:

> On 4 Oct 2000 otaylor redhat com wrote:
> 
> > 
> > Martin Baulig <martin home-of-linux org> writes:
> > 
> > > otaylor fresnel labs redhat com writes:
> > > 
> > > > Please change gtk_selection_data_get/set_text to take gchar *.
> > > 
> > > What about GtkSelectionData and gdk_utf8_*() ?
> > 
> > GtkSelectionData should remain a guchar *, gdk_utf8_* should
> > be gchar * if it guchar * now.
> > 
> > Basically, the convention we have is thet gchar * is used for
> > text and guchar * for blocks of uninterpreted data.
> 
> nope, that'd be guint8/gint8 depending on whether you work
> with signed/unsigned byte blocks.

Can you provide an example of this? I can't and can find plentiful
examples of guchar usage.

It wouldn't make much sense either - C guarantees sizeof(char) == 1,
so gchar, guchar is perfect for 'a block of bytes'.

The only place I can think of using gint8 is in something like
gdk_gc_set_dashes - where we have something which is an integer-valued
parameter whose range is restricted to 8 bits.

Regards,
                                        Owen




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