From b02efbc94a1a6febddf62d1e742abd1f82e9ecf3 Mon Sep 17 00:00:00 2001 From: Johan Dahlin Date: Thu, 19 Feb 2009 23:25:04 +0000 Subject: Improve type checking --- diff --git a/giscanner/giscannermodule.c b/giscanner/giscannermodule.c index 26f28cb..3223508 100644 --- a/giscanner/giscannermodule.c +++ b/giscanner/giscannermodule.c @@ -567,6 +567,8 @@ pygi_collect_attributes (PyObject *self, first = TRUE; attr_value = g_string_new (""); + g_assert(PyList_Check(attributes)); + for (i = 0; i < PyList_Size (attributes); ++i) { PyObject *tuple; @@ -574,6 +576,7 @@ pygi_collect_attributes (PyObject *self, tuple = PyList_GetItem (attributes, i); g_assert(tuple != NULL); + g_assert(PyTuple_Check(tuple)); g_assert(PyTuple_Size(tuple) == 2); if (PyTuple_GetItem(tuple, 1) == Py_None) continue; -- cgit v0.9.1