[Geany-Devel] Geany using standard types
Dimitar Zhekov
dimitar.zhekov at xxxxx
Sun Aug 18 10:34:02 UTC 2013
On Sun, 18 Aug 2013 02:32:34 -0700
Matthew Brush <mbrush at codebrainz.ca> wrote:
> "Do you agree it would be better for Geany to use standard C types as
> opposed to GLib types which are typedef'd to the exact same thing?" (ex.
> gint->int, glong->long, gchar->char etc.)
Yes.
> - I left gboolean where it would break a function signature with respect
> to GCC warnings.
Understandable.
> - I left all guchar, gushort, guint, gulong, etc types, because, lets be
> honest, it's just nicer to type.
In my Geany [2013-06-16], there are 43 guchar, gushort and gulong; 475
guint, 1420 gint and 2091 gchar. It is easier to type guint instead
of unsigned - the keys are near - but it is worth to mix the standard
and GLib types?
Personally I'm using gchar if a string may be UTF-8, and char where
it's guaranteed to be ASCII or it's unknown and doesn't matter - to
remind me that such string is logically not a direct array of char.
> - I think patch includes changes to stdint types (ex. gint16, guint32)
> but I think we shouldn't change these as GLib assures them and the C99
> standard does not in theory (and is not many in use).
AFAIK GLib does not emulate unexistent integer types.
If they exist && we are using C99, they will be defined as u/intN_t.
--
> > IMHO, Colomban summed up pretty well why there's no compelling
> > reason to adopt C99. My 2 euro-cents:
> >
>
> I think I missed this summation, will re-read thread.
The entire mail from Sat, 17 Aug 2013 09:07 +0000. Though you will
probably disagree it's a nice summary, that's subjective.
> > 2. If you think that everyone who completed university in the last 14
> > years uses C99, that's not quite the case. [...]
> The smiley face in the sentence you didn't quote but are responding to
> means I was joking/being sarcastic.
Sorry, missed that. I read the entire discussion at once.
Now to change my opinion somewhat: I'm not against C99 if we kill the
redundant g* definitions. I simply don't like them.
We'd better keep gboolean if bool generates warnings, since it has a
logical meaning, and I'll keep gchar in Scope for the same reason.
--
E-gards: Jimmy
More information about the Devel
mailing list