[pygtk] Error when adding longs into a GTK Treeview

Ed Catmur ed at catmur.co.uk
Sat Mar 3 08:11:38 WST 2007


A far simpler testcase:

>>> import gtk
>>> gtk.ListStore(long).append([2**31-1])
<GtkTreeIter at 0x80a1010>
>>> gtk.ListStore(long).append([2**31])
Traceback (most recent call last):
  File "<stdin>", line 1, in ?
TypeError: value is of wrong type for this column

This is expected behaviour on x86-32, where long is 4 bytes wide.  Are
you on x86-64?

pyg_value_from_pyobject (in pygtype.c) looks slightly wrong on integral
types, though.

Ed



More information about the pygtk mailing list