Remove gulong and glong from our codebase since it's not crossplatform safe
The types gulong
and glong
are 64-bit on most platforms, but 32-bit on Windows. This can cause unexpected results when the code was written with the expectation that it will hold 64-bit values.
See also issue #383 (closed) where the use of gulong and glong caused a bug in PBM export on Windows.
Since we have 64-bit types guint64
and gint64
that will always be that size on every platform, it seems to me that we should:
- Change all current occurrences of
gulong
andglong
toguint64
andgint64
. - Disallow future use of these types.
Any thoughts on this @Jehan, @mitch or anyone else. Maybe I'm overlooking something.
In master we currently use:
- gulong in 41 files.
- glong in 93 files.