GNOME Bugzilla – Bug 780591
Fixes for 64bit Windows compiler warnings
Last modified: 2017-03-29 11:06:20 UTC
Created attachment 348798 [details] [review] Fix PyLong <-> GPid conversion on 64bit Windows GPid on Windows is a pointer and not int, and pointers don't fit long on 64bit so use PyLong_AsVoidPtr/PyLong_FromVoidPtr there instead.
Created attachment 348799 [details] [review] Fix conversion from pointers to hashfunc return values. Fixes comiler warnings on 64bit Windows. Python 3 now uses Py_hash_t as return value for hashfunc. Use a compat define so we can use the right type depending on the Python version. On Python 2 + 64bit Windows the pointer doesn't fit the long return type. Add a macro which handles the casting for that case to prevent compiler warnings.
Created attachment 348800 [details] [review] Don't use long format string for formatting pointers long is too small on 64bit Windows
Created attachment 348802 [details] [review] test_gi: use correct min/max constants for gsize/gssize This made these tests on 64bit Windows fail because sizeof(gsize) != sizeof(glong)
The test suite on 64bit still fails because some glib symbols are missing there. I've filed bug 780634 for this.