Although Python3 integers are unlimited, the following test application fails to emit a signal with an integer value greater that INT_MAX.
import gi
gi.require_version('Gtk', '3.0')
from gi.repository import Gtk, GObject, GLib
class Test(GObject.GObject):
__gsignals__ = {'dummy': (GObject.SignalFlags.RUN_LAST, None, (int, )), }
def __init__(self):
GObject.GObject.__init__(self)
self.emit('dummy', GLib.MAXINT) # OK
self.emit('dummy', GLib.MAXINT + 1) # NOT OK
test = Test()
Error
Traceback (most recent call last):
File "Test.py", line 14, in <module>
test = Test()
^^^^^^
File "Test.py", line 12, in __init__
self.emit('dummy', GLib.MAXINT + 1)
TypeError: could not convert type int to gint required for parameter 0
Is there a known workaround?