more memory leak fixes, though only a few are likely to happen

This commit is contained in:
2007-05-27 21:33:48 +00:00
parent d9e85385fd
commit bcc3143119
20 changed files with 97 additions and 59 deletions

View File

@@ -512,23 +512,30 @@ static PyObject *Sequence_getImages( BPy_Sequence * self )
Strip *strip;
StripElem *se;
int i;
PyObject *attr;
PyObject *list, *ret;
if (self->seq->type != SEQ_IMAGE) {
list = PyList_New(0);
ret= Py_BuildValue( "sO", "", list);
Py_DECREF(list);
return ret;
}
if (self->seq->type != SEQ_IMAGE)
return PyList_New(0);
/*return EXPP_ReturnPyObjError( PyExc_TypeError,
"Sequence is not an image type" );*/
strip = self->seq->strip;
se = strip->stripdata;
attr = PyList_New(strip->len);
list = PyList_New(strip->len);
for (i=0; i<strip->len; i++, se++) {
PyList_SetItem( attr, i, PyString_FromString(se->name) );
PyList_SetItem( list, i, PyString_FromString(se->name) );
}
return attr;
ret= Py_BuildValue( "sO", strip->dir, list);
Py_DECREF(list);
return ret;
}