[Geany-Devel] Geany using standard types

Matthew Brush mbrush at xxxxx
Sun Aug 18 07:21:22 UTC 2013


Hi,

I just want to throw this out there since I already made it:

http://pastebin.geany.org/7YHWE/

It's the diff of a branch which replaces every single redundant G* type 
with its standard C counterpart. I have a branch with commits for each 
type, starting from the only one that changed (WRT to recent C99 
discussions), but I just pasted here a combination patch of removing all 
redundantly-named, non-standard C types.

Of note is:
- I left gboolean where it would break a function signature with respect 
to GCC warnings.
- I left all guchar, gushort, guint, gulong, etc types, because, lets be 
honest, it's just nicer to type.
- gpointer (and gconstpointer) was special because it masked the pointer 
* behind its typedef and so broke lines with multiple gpointer 
declarations on the same line (easily fixable since there's no such 
thing as void type in C).
- 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).

I don't mean to apply this patch directly, just to spur discussion about 
whether Geany should be using standard C types or pointlessly typedeff'd 
G* types where there is an existing and cross-platform standard type.

The one big point I can see against is; "We already do like that", so 
there's no point in repeating it, it's totally valid and avoids 
(potentially, although I'm pretty sure not) breaking in obscure ways 
some mysterious code, but since I made the patch anyways, I'd thought 
I'd post it for comments. If you see some fundamental issue, of course 
feel free to point out.

I mostly want to solicit feedback on this topic in general rather than 
bikeshed my patch specifically as pasted.

P.S. I'll not proceed further on this without more input from Geany 
developers and community.

Cheers,
Matthew Brush


More information about the Devel mailing list