[Geany-Devel] Geany using standard types

Yosef Or Boczko yoseforb at xxxxx
Sun Aug 18 07:36:15 UTC 2013


Hi Matthew,

I don't know why it is worthwhile?
What the advantage of char from gchar?

gchar is just for readability of the code, so why to change?

Cheers,
Yosef Or Boczko

On א', אוג 18, 2013 בשעה 10:21 AM, Matthew Brush 
<mbrush at codebrainz.ca> wrote:
> 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
> _______________________________________________
> Devel mailing list
> Devel at lists.geany.org
> https://lists.geany.org/cgi-bin/mailman/listinfo/devel



More information about the Devel mailing list