Commit 79aea265 authored by Simon Feltman's avatar Simon Feltman
Browse files

Remove overzealous argument checking for callback userdata

Remove check which ensures userdata is None if the callback is None.
This check would need to become more complicated with recent versions of
PyGObject where userdata can be variable (would also need to check against
a tuple containing None). Instead of adding more complex checking, simply
remove the checking as it is unnecessary to begin with.
parent f32d649b
......@@ -1367,13 +1367,6 @@ _pygi_marshal_from_py_interface_callback (PyGIInvokeState *state,
if (py_arg == Py_None && !(py_user_data == Py_None || py_user_data == NULL)) {
PyErr_Format (PyExc_TypeError,
"When passing None for a callback userdata must also be None");
return FALSE;
if (py_arg == Py_None) {
return TRUE;
......@@ -1565,11 +1565,14 @@ class TestTreeView(unittest.TestCase):
def test_tree_view_column(self):
cell = Gtk.CellRendererText()
Gtk.TreeViewColumn(title='This is just a test',
col = Gtk.TreeViewColumn(title='This is just a test',
# Regression test for:
col.set_cell_data_func(cell, None, None)
def test_tree_view_add_column_with_attributes(self):
model = Gtk.ListStore(str, str, str)
# deliberately use out-of-order sorting here; we assign column 0 to
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment