templ vs. templates. Moved variable declarations to the inner scope to prevent
such a mistake.
static int
add_templates (gpointer gclass, PyObject * templates)
{
- gint i, len;
- PyGObject *templ;
-
if (PyTuple_Check (templates)) {
+ gint i, len;
+ PyGObject *templ;
len = PyTuple_Size (templates);
if (len == 0)
}
- if (GST_IS_PAD_TEMPLATE (pygobject_get (templ)) == FALSE) {
+ if (GST_IS_PAD_TEMPLATE (pygobject_get (templates)) == FALSE) {
PyErr_SetString (PyExc_TypeError,
"entry for __gsttemplates__ must be of type GstPadTemplate");
return -1;