GNOME Bugzilla – Bug 683775
signal GValue arguments do not accept 64 bit ints
Last modified: 2013-08-14 20:16:44 UTC
When trying to call a signal which expects a GValue argument, merely passing an integer constant is always going to create a TYPE_INT variant, which overflows when the constant is bigger than MAXINT. Depending on the API it might be better to automatically create a TYPE_INT64 variant? The workaround is to create an explicit int64 value: v = GObject.Value() v.init(GObject.TYPE_INT64) v.set_int64(GObject.G_MAXINT64) then you can pass v to a signal just fine (that's covered in a test case, see bug 683596). In this case, the code path is the G_TYPE_BOXED case in pyg_value_from_pyobject() in gi/_gobject/pygtype.c, which calls pyg_type_from_object(), which does if (tp == &PYGLIB_PyLong_Type) return G_TYPE_INT; i. e. does not do any range check.
This is actually a dup of bug #705291. Marking this one as the dup because more information has been added to the other ticket. *** This bug has been marked as a duplicate of bug 705291 ***