girparser: Allow time_t, off_t, etc. to appear in GIR XML
Based on !3966 (merged), please review that first.
-
girparser: Allow time_t, off_t, etc. to appear in GIR XML
g-ir-scanner currently maps these to lower-level types at scan time by assuming that time_t is an alias for long, off_t is an alias for size_t and so on. This is not always accurate: some ILP32 architectures have 64-bit time_t (for Y2038 compatibility) and 64-bit off_t (for large file support), and that mismatch is tracked as gobject-introspection#494 (closed).
One option for resolving this g-ir-scanner bug is to have it pass these types through to the GIR XML, and teach g-ir-compiler and its replacement gi-compile-repository to convert them to the corresponding concrete type tag, as they already do for abstract types such as
long long
andsize_t
.Loosely based on gobject-introspection!451 (closed) by @liushuyu.
Co-authored-by: @liushuyu
/cc @michael.hudson