mapping time_t to TYPE_LONG is not always correct
In Debian and Ubuntu we are currently transitioning 32-bit architectures (aside from i386) to 64-bit time_t. As part of this, I found that pygobject fails on armhf (i.e. 32-bit ARM) in this test case:
def test_time_t_in(self):
GIMarshallingTests.time_t_in(1234567890)
A bit of gdb makes it clear that this is confusion about how to pass the first argument. A bit of grepping finds this line in giscanner/ast.py:
type_names['time_t'] = TYPE_LONG
which is obviously a bit of a red flag in this context.
Changing this definition to TYPE_INT64 makes the pygobject test pass but clearly that isn't going to be universally correct either.
I don't know how to fix this, practically speaking. I think a full fix would mean adding something like GI_TYPE_TAG_TIME_T and then the code in places like gi_type_tag_get_ffi_type_internal can check the value of the preprocessor macro _TIME_BITS to decide what to do or something like that. This seems like a fair bit of work though...