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 | |
parent | 5fa5392b04da2eb5084c2b237bf71ca3a1e0703f (diff) |
*warnings fixes
Diffstat (limited to 'source')
-rw-r--r-- | source/blender/python/api2_2x/Image.c | 8 | ||||
-rw-r--r-- | source/blender/python/api2_2x/Library.c | 1 | ||||
-rw-r--r-- | source/blender/python/api2_2x/sceneTimeLine.c | 32 |
3 files changed, 24 insertions, 17 deletions
diff --git a/source/blender/python/api2_2x/Image.c b/source/blender/python/api2_2x/Image.c index 423c4b1897b..70f69ac840b 100644 --- a/source/blender/python/api2_2x/Image.c +++ b/source/blender/python/api2_2x/Image.c @@ -101,10 +101,10 @@ returns None if not found.\n"; struct PyMethodDef M_Image_methods[] = { /*{"New", ( PyCFunction ) M_Image_New, METH_VARARGS | METH_KEYWORDS, M_Image_New_doc}, */ - {"Get", M_Image_Get, METH_VARARGS, M_Image_Get_doc}, - {"GetCurrent", M_Image_GetCurrent, METH_NOARGS, M_Image_GetCurrent_doc}, - {"get", M_Image_Get, METH_VARARGS, M_Image_Get_doc}, - {"Load", M_Image_Load, METH_VARARGS, M_Image_Load_doc}, + {"Get", (PyCFunction) M_Image_Get, METH_VARARGS, M_Image_Get_doc}, + {"GetCurrent", (PyCFunction) M_Image_GetCurrent, METH_NOARGS, M_Image_GetCurrent_doc}, + {"get", (PyCFunction) M_Image_Get, METH_VARARGS, M_Image_Get_doc}, + {"Load", (PyCFunction) M_Image_Load, METH_VARARGS, M_Image_Load_doc}, {NULL, NULL, 0, NULL} }; diff --git a/source/blender/python/api2_2x/Library.c b/source/blender/python/api2_2x/Library.c index a4b97bfeef6..32c2c9792d4 100644 --- a/source/blender/python/api2_2x/Library.c +++ b/source/blender/python/api2_2x/Library.c @@ -42,6 +42,7 @@ #include "BKE_utildefines.h" #include "BKE_global.h" #include "BKE_main.h" +#include "BLI_blenlib.h" #include "BLO_readfile.h" #include "BLI_linklist.h" #include "MEM_guardedalloc.h" 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; + } } } |