*warnings fixes

This commit is contained in:
2005-12-13 14:29:56 +00:00
parent 5fa5392b04
commit 7bba26d24b
3 changed files with 24 additions and 17 deletions

View File

@@ -191,35 +191,41 @@ static PyObject *TimeLine_getFramesMarked (BPy_TimeLine *self, PyObject *args) {
"expected nothing, string or int as arguments.");
if (frm>0) {
marker_dict= PyDict_New ();
for (marker_it= self->marker_list->first; marker_it; marker_it= marker_it->next)
for (marker_it= self->marker_list->first; marker_it; marker_it= marker_it->next){
if (marker_it->frame==frm) {
if ((pyo= PyDict_GetItem ((PyObject*)marker_dict, PyInt_FromLong ((long int)marker_it->frame))) ) {
pyo= PyDict_GetItem ((PyObject*)marker_dict, PyInt_FromLong ((long int)marker_it->frame));
if (pyo) {
PyList_Append (pyo, PyString_FromString (marker_it->name));
Py_INCREF (pyo);
}
else {
if (!pyo) pyo= PyList_New (0);
}else{
pyo = PyList_New (0);
PyList_Append (pyo, PyString_FromString (marker_it->name));
}
PyDict_SetItem (marker_dict, PyInt_FromLong ((long int)marker_it->frame), pyo);
if (pyo) { Py_DECREF (pyo); pyo= NULL; }
if (pyo) {
Py_DECREF (pyo);
pyo= NULL;
}
}
}
}
}
else {
}else {
marker_dict= PyDict_New ();
for (marker_it= self->marker_list->first; marker_it; marker_it= marker_it->next) {
if ((pyo=PyDict_GetItem ((PyObject*)marker_dict, PyInt_FromLong ((long int)marker_it->frame))) ) {
pyo=PyDict_GetItem ((PyObject*)marker_dict, PyInt_FromLong ((long int)marker_it->frame));
if (pyo) {
PyList_Append (pyo, PyString_FromString (marker_it->name));
Py_INCREF (pyo);
}
else {
if (!pyo) pyo= PyList_New (0);
}else{
pyo= PyList_New (0);
PyList_Append (pyo, PyString_FromString (marker_it->name));
}
PyDict_SetItem (marker_dict, PyInt_FromLong ((long int)marker_it->frame), pyo);
if (pyo) { Py_DECREF (pyo); pyo= NULL; }
if (pyo) {
Py_DECREF (pyo);
pyo= NULL;
}
}
}