diff options
author | Joseph Gilbert <ascotan@gmail.com> | 2005-12-13 17:29:56 +0300 |
---|---|---|
committer | Joseph Gilbert <ascotan@gmail.com> | 2005-12-13 17:29:56 +0300 |
commit | 7bba26d24ba41923e913830825183b91a79bc1c9 (patch) | |
tree | 3e32567dbb8a9a55089b5aabb4a522fc89e16044 /source/blender/python/api2_2x/sceneTimeLine.c | |
parent | 5fa5392b04da2eb5084c2b237bf71ca3a1e0703f (diff) |
*warnings fixes
Diffstat (limited to 'source/blender/python/api2_2x/sceneTimeLine.c')
-rw-r--r-- | source/blender/python/api2_2x/sceneTimeLine.c | 32 |
1 files changed, 19 insertions, 13 deletions
diff --git a/source/blender/python/api2_2x/sceneTimeLine.c b/source/blender/python/api2_2x/sceneTimeLine.c index e315ec263e9..89c55acc352 100644 --- a/source/blender/python/api2_2x/sceneTimeLine.c +++ b/source/blender/python/api2_2x/sceneTimeLine.c @@ -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; + } } } |