Replace GLib typedefs with standard C++ ones
@dboles
Submitted by Daniel Boles Link to original bug (#783209)
Description
GLib has typedefs because of its desire to support ancient C Standards, and more typedefs that have no purpose... other than, I guess, 'so that they all consistently start with g and can by syntax-highlighted in extremely old emacs'.
glibmm and co should not be bound by the same historical baggage: we're aiming for pretty cutting-edge C++, using newly Standardised features relatively soon after they debut.
Therefore, it would be more appropriate to use the idiomatic C++ types: either the basic ones where the pointless GLib typedefs are used (guint, gchar, etc.) or the more specialised ones where specific sizes are requested - std::size_t, std::(u)INTNN_t, etc.
My proposal is therefore to replace such types with their standard C++ counterparts wherever possible.
Some of this is cut and dry:
gint, guint, gchar, etc. => int, unsigned int, unsigned char, etc. gsize => std::size_t guint8, gint32, etc. => std::uint8_t, std::int32_t, etc.
No danger of any ABI breaks there (even though in most cases we can now do so with impunity!)
However, there are one or two cases that may give us pause for thought. For example, gssize is meant to be equivalent to the POSIX type ssize_t, basically 'like size_t except it might also be negative, or at least -1'...
https://stackoverflow.com/questions/8649018/what-is-the-difference-between-ssize-t-and-ptrdiff-t
We would probably get away with using std::ptrdiff_t, but I'm not sure anything is strictly guaranteed here. So this one is more up for debate.
Version: 2.53.x