diff options
Diffstat (limited to 'source/blender/python/generic')
-rw-r--r-- | source/blender/python/generic/IDProp.c | 48 | ||||
-rw-r--r-- | source/blender/python/generic/bgl.c | 14 | ||||
-rw-r--r-- | source/blender/python/generic/blf_py_api.c | 10 | ||||
-rw-r--r-- | source/blender/python/generic/bpy_internal_import.c | 2 | ||||
-rw-r--r-- | source/blender/python/generic/mathutils.c | 12 | ||||
-rw-r--r-- | source/blender/python/generic/mathutils_color.c | 62 | ||||
-rw-r--r-- | source/blender/python/generic/mathutils_euler.c | 62 | ||||
-rw-r--r-- | source/blender/python/generic/mathutils_geometry.c | 10 | ||||
-rw-r--r-- | source/blender/python/generic/mathutils_matrix.c | 140 | ||||
-rw-r--r-- | source/blender/python/generic/mathutils_quat.c | 108 | ||||
-rw-r--r-- | source/blender/python/generic/mathutils_vector.c | 72 | ||||
-rw-r--r-- | source/blender/python/generic/noise.c | 14 |
12 files changed, 277 insertions, 277 deletions
diff --git a/source/blender/python/generic/IDProp.c b/source/blender/python/generic/IDProp.c index cd014fc34a8..ad0c96afa17 100644 --- a/source/blender/python/generic/IDProp.c +++ b/source/blender/python/generic/IDProp.c @@ -49,7 +49,7 @@ extern PyTypeObject IDGroup_Iter_Type; /*********************** ID Property Main Wrapper Stuff ***************/ -PyObject *IDGroup_repr( BPy_IDProperty *self ) +static PyObject *IDGroup_repr( BPy_IDProperty *self ) { return PyUnicode_FromFormat( "<bpy ID property from \"%s\">", self->id->name); } @@ -113,7 +113,7 @@ PyObject *BPy_IDGroup_WrapData( ID *id, IDProperty *prop ) Py_RETURN_NONE; } -int BPy_IDGroup_SetData(BPy_IDProperty *self, IDProperty *prop, PyObject *value) +static int BPy_IDGroup_SetData(BPy_IDProperty *self, IDProperty *prop, PyObject *value) { switch (prop->type) { case IDP_STRING: @@ -182,7 +182,7 @@ int BPy_IDGroup_SetData(BPy_IDProperty *self, IDProperty *prop, PyObject *value) return 0; } -PyObject *BPy_IDGroup_GetName(BPy_IDProperty *self, void *UNUSED(closure)) +static PyObject *BPy_IDGroup_GetName(BPy_IDProperty *self, void *UNUSED(closure)) { return PyUnicode_FromString(self->prop->name); } @@ -726,7 +726,7 @@ static PyObject *BPy_IDGroup_ConvertToPy(BPy_IDProperty *self) /* Matches python dict.get(key, [default]) */ -PyObject* BPy_IDGroup_Get(BPy_IDProperty *self, PyObject *args) +static PyObject* BPy_IDGroup_Get(BPy_IDProperty *self, PyObject *args) { IDProperty *idprop; char *key; @@ -763,23 +763,23 @@ static struct PyMethodDef BPy_IDGroup_methods[] = { "idprop.get(k[,d]) -> idprop[k] if k in idprop, else d. d defaults to None"}, {"convert_to_pyobject", (PyCFunction)BPy_IDGroup_ConvertToPy, METH_NOARGS, "return a purely python version of the group"}, - {0, NULL, 0, NULL} + {NULL, NULL, 0, NULL} }; static PySequenceMethods BPy_IDGroup_Seq = { - (lenfunc) BPy_IDGroup_Map_Len, /* lenfunc sq_length */ - 0, /* binaryfunc sq_concat */ - 0, /* ssizeargfunc sq_repeat */ - 0, /* ssizeargfunc sq_item */ /* TODO - setting this will allow PySequence_Check to return True */ - 0, /* intintargfunc ***was_sq_slice*** */ - 0, /* intobjargproc sq_ass_item */ - 0, /* ssizeobjargproc ***was_sq_ass_slice*** */ + (lenfunc) BPy_IDGroup_Map_Len, /* lenfunc sq_length */ + NULL, /* binaryfunc sq_concat */ + NULL, /* ssizeargfunc sq_repeat */ + NULL, /* ssizeargfunc sq_item */ /* TODO - setting this will allow PySequence_Check to return True */ + NULL, /* intintargfunc ***was_sq_slice*** */ + NULL, /* intobjargproc sq_ass_item */ + NULL, /* ssizeobjargproc ***was_sq_ass_slice*** */ (objobjproc) BPy_IDGroup_Contains, /* objobjproc sq_contains */ - 0, /* binaryfunc sq_inplace_concat */ - 0, /* ssizeargfunc sq_inplace_repeat */ + NULL, /* binaryfunc sq_inplace_concat */ + NULL, /* ssizeargfunc sq_inplace_repeat */ }; -PyMappingMethods BPy_IDGroup_Mapping = { +static PyMappingMethods BPy_IDGroup_Mapping = { (lenfunc)BPy_IDGroup_Map_Len, /*inquiry mp_length */ (binaryfunc)BPy_IDGroup_Map_GetItem, /*binaryfunc mp_subscript */ (objobjargproc)BPy_IDGroup_Map_SetItem, /*objobjargproc mp_ass_subscript */ @@ -890,7 +890,7 @@ static PyObject *BPy_IDArray_ConvertToPy(BPy_IDArray *self) static PyMethodDef BPy_IDArray_methods[] = { {"convert_to_pyobject", (PyCFunction)BPy_IDArray_ConvertToPy, METH_NOARGS, "return a purely python version of the group"}, - {0, NULL, 0, NULL} + {NULL, NULL, 0, NULL} }; static int BPy_IDArray_Len(BPy_IDArray *self) @@ -964,16 +964,16 @@ static int BPy_IDArray_SetItem(BPy_IDArray *self, int index, PyObject *value) static PySequenceMethods BPy_IDArray_Seq = { (lenfunc) BPy_IDArray_Len, /* inquiry sq_length */ - 0, /* binaryfunc sq_concat */ - 0, /* intargfunc sq_repeat */ + NULL, /* binaryfunc sq_concat */ + NULL, /* intargfunc sq_repeat */ (ssizeargfunc)BPy_IDArray_GetItem, /* intargfunc sq_item */ - 0, /* intintargfunc sq_slice */ - (ssizeobjargproc)BPy_IDArray_SetItem, /* intobjargproc sq_ass_item */ - 0, /* intintobjargproc sq_ass_slice */ - 0, /* objobjproc sq_contains */ + NULL, /* intintargfunc sq_slice */ + (ssizeobjargproc)BPy_IDArray_SetItem,/* intobjargproc sq_ass_item */ + NULL, /* intintobjargproc sq_ass_slice */ + NULL, /* objobjproc sq_contains */ /* Added in release 2.0 */ - 0, /* binaryfunc sq_inplace_concat */ - 0, /* intargfunc sq_inplace_repeat */ + NULL, /* binaryfunc sq_inplace_concat */ + NULL, /* intargfunc sq_inplace_repeat */ }; PyTypeObject IDArray_Type = { diff --git a/source/blender/python/generic/bgl.c b/source/blender/python/generic/bgl.c index 474259fe0e3..2b15a6f4826 100644 --- a/source/blender/python/generic/bgl.c +++ b/source/blender/python/generic/bgl.c @@ -94,9 +94,9 @@ PyTypeObject BGL_bufferType = { ( printfunc ) 0, /*tp_print */ ( getattrfunc ) Buffer_getattr, /*tp_getattr */ ( setattrfunc ) 0, /*tp_setattr */ - 0, /*tp_compare */ + NULL, /*tp_compare */ ( reprfunc ) Buffer_repr, /*tp_repr */ - 0, /*tp_as_number */ + NULL, /*tp_as_number */ &Buffer_SeqMethods, /*tp_as_sequence */ }; @@ -1124,13 +1124,13 @@ static struct PyMethodDef BGL_methods[] = { static struct PyModuleDef BGL_module_def = { PyModuleDef_HEAD_INIT, "bgl", /* m_name */ - 0, /* m_doc */ + NULL, /* m_doc */ 0, /* m_size */ BGL_methods, /* m_methods */ - 0, /* m_reload */ - 0, /* m_traverse */ - 0, /* m_clear */ - 0, /* m_free */ + NULL, /* m_reload */ + NULL, /* m_traverse */ + NULL, /* m_clear */ + NULL, /* m_free */ }; diff --git a/source/blender/python/generic/blf_py_api.c b/source/blender/python/generic/blf_py_api.c index 0c0bf1a680d..01fa402bd6f 100644 --- a/source/blender/python/generic/blf_py_api.c +++ b/source/blender/python/generic/blf_py_api.c @@ -362,7 +362,7 @@ static PyObject *py_blf_load(PyObject *UNUSED(self), PyObject *args) } /*----------------------------MODULE INIT-------------------------*/ -struct PyMethodDef BLF_methods[] = { +static PyMethodDef BLF_methods[] = { {"aspect", (PyCFunction) py_blf_aspect, METH_VARARGS, py_blf_aspect_doc}, {"blur", (PyCFunction) py_blf_blur, METH_VARARGS, py_blf_blur_doc}, {"clipping", (PyCFunction) py_blf_clipping, METH_VARARGS, py_blf_clipping_doc}, @@ -388,10 +388,10 @@ static struct PyModuleDef BLF_module_def = { BLF_doc, /* m_doc */ 0, /* m_size */ BLF_methods, /* m_methods */ - 0, /* m_reload */ - 0, /* m_traverse */ - 0, /* m_clear */ - 0, /* m_free */ + NULL, /* m_reload */ + NULL, /* m_traverse */ + NULL, /* m_clear */ + NULL, /* m_free */ }; PyObject *BPyInit_blf(void) diff --git a/source/blender/python/generic/bpy_internal_import.c b/source/blender/python/generic/bpy_internal_import.c index a1b99e12e94..f68f499a28c 100644 --- a/source/blender/python/generic/bpy_internal_import.c +++ b/source/blender/python/generic/bpy_internal_import.c @@ -212,7 +212,7 @@ static PyObject *blender_import(PyObject *UNUSED(self), PyObject *args, PyObjec PyObject *newmodule; //PyObject_Print(args, stderr, 0); - static const char *kwlist[] = {"name", "globals", "locals", "fromlist", "level", 0}; + static const char *kwlist[] = {"name", "globals", "locals", "fromlist", "level", NULL}; if( !PyArg_ParseTupleAndKeywords(args, kw, "s|OOOi:bpy_import_meth", (char **)kwlist, &name, &globals, &locals, &fromlist, &level) ) diff --git a/source/blender/python/generic/mathutils.c b/source/blender/python/generic/mathutils.c index dc6fbac7eac..f56ac6c61bf 100644 --- a/source/blender/python/generic/mathutils.c +++ b/source/blender/python/generic/mathutils.c @@ -247,7 +247,7 @@ int EXPP_VectorsAreEqual(float *vecA, float *vecB, int size, int floatSteps) /* Mathutils Callbacks */ /* for mathutils internal use only, eventually should re-alloc but to start with we only have a few users */ -Mathutils_Callback *mathutils_callbacks[8] = {NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL}; +static Mathutils_Callback *mathutils_callbacks[8] = {NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL}; int Mathutils_RegisterCallback(Mathutils_Callback *cb) { @@ -334,7 +334,7 @@ void BaseMathObject_dealloc(BaseMathObject * self) } /*----------------------------MODULE INIT-------------------------*/ -struct PyMethodDef M_Mathutils_methods[] = { +static struct PyMethodDef M_Mathutils_methods[] = { {NULL, NULL, 0, NULL} }; @@ -344,10 +344,10 @@ static struct PyModuleDef M_Mathutils_module_def = { M_Mathutils_doc, /* m_doc */ 0, /* m_size */ M_Mathutils_methods, /* m_methods */ - 0, /* m_reload */ - 0, /* m_traverse */ - 0, /* m_clear */ - 0, /* m_free */ + NULL, /* m_reload */ + NULL, /* m_traverse */ + NULL, /* m_clear */ + NULL, /* m_free */ }; PyMODINIT_FUNC BPyInit_mathutils(void) diff --git a/source/blender/python/generic/mathutils_color.c b/source/blender/python/generic/mathutils_color.c index af4742e74c6..f7e62242703 100644 --- a/source/blender/python/generic/mathutils_color.c +++ b/source/blender/python/generic/mathutils_color.c @@ -457,51 +457,51 @@ static char color_doc[] = ; PyTypeObject color_Type = { PyVarObject_HEAD_INIT(NULL, 0) - "mathutils.Color", //tp_name + "mathutils.Color", //tp_name sizeof(ColorObject), //tp_basicsize 0, //tp_itemsize (destructor)BaseMathObject_dealloc, //tp_dealloc - 0, //tp_print - 0, //tp_getattr - 0, //tp_setattr - 0, //tp_compare + NULL, //tp_print + NULL, //tp_getattr + NULL, //tp_setattr + NULL, //tp_compare (reprfunc) Color_repr, //tp_repr - 0, //tp_as_number + NULL, //tp_as_number &Color_SeqMethods, //tp_as_sequence &Color_AsMapping, //tp_as_mapping - 0, //tp_hash - 0, //tp_call - 0, //tp_str - 0, //tp_getattro - 0, //tp_setattro - 0, //tp_as_buffer + NULL, //tp_hash + NULL, //tp_call + NULL, //tp_str + NULL, //tp_getattro + NULL, //tp_setattro + NULL, //tp_as_buffer Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE, //tp_flags color_doc, //tp_doc - 0, //tp_traverse - 0, //tp_clear + NULL, //tp_traverse + NULL, //tp_clear (richcmpfunc)Color_richcmpr, //tp_richcompare 0, //tp_weaklistoffset - 0, //tp_iter - 0, //tp_iternext + NULL, //tp_iter + NULL, //tp_iternext Color_methods, //tp_methods - 0, //tp_members + NULL, //tp_members Color_getseters, //tp_getset - 0, //tp_base - 0, //tp_dict - 0, //tp_descr_get - 0, //tp_descr_set + NULL, //tp_base + NULL, //tp_dict + NULL, //tp_descr_get + NULL, //tp_descr_set 0, //tp_dictoffset - 0, //tp_init - 0, //tp_alloc + NULL, //tp_init + NULL, //tp_alloc Color_new, //tp_new - 0, //tp_free - 0, //tp_is_gc - 0, //tp_bases - 0, //tp_mro - 0, //tp_cache - 0, //tp_subclasses - 0, //tp_weaklist - 0 //tp_del + NULL, //tp_free + NULL, //tp_is_gc + NULL, //tp_bases + NULL, //tp_mro + NULL, //tp_cache + NULL, //tp_subclasses + NULL, //tp_weaklist + NULL //tp_del }; //------------------------newColorObject (internal)------------- //creates a new color object diff --git a/source/blender/python/generic/mathutils_euler.c b/source/blender/python/generic/mathutils_euler.c index 8792b154ca6..b6040274065 100644 --- a/source/blender/python/generic/mathutils_euler.c +++ b/source/blender/python/generic/mathutils_euler.c @@ -593,51 +593,51 @@ static char euler_doc[] = ; PyTypeObject euler_Type = { PyVarObject_HEAD_INIT(NULL, 0) - "mathutils.Euler", //tp_name + "mathutils.Euler", //tp_name sizeof(EulerObject), //tp_basicsize 0, //tp_itemsize (destructor)BaseMathObject_dealloc, //tp_dealloc - 0, //tp_print - 0, //tp_getattr - 0, //tp_setattr - 0, //tp_compare + NULL, //tp_print + NULL, //tp_getattr + NULL, //tp_setattr + NULL, //tp_compare (reprfunc) Euler_repr, //tp_repr - 0, //tp_as_number + NULL, //tp_as_number &Euler_SeqMethods, //tp_as_sequence &Euler_AsMapping, //tp_as_mapping - 0, //tp_hash - 0, //tp_call - 0, //tp_str - 0, //tp_getattro - 0, //tp_setattro - 0, //tp_as_buffer + NULL, //tp_hash + NULL, //tp_call + NULL, //tp_str + NULL, //tp_getattro + NULL, //tp_setattro + NULL, //tp_as_buffer Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE, //tp_flags euler_doc, //tp_doc - 0, //tp_traverse - 0, //tp_clear + NULL, //tp_traverse + NULL, //tp_clear (richcmpfunc)Euler_richcmpr, //tp_richcompare 0, //tp_weaklistoffset - 0, //tp_iter - 0, //tp_iternext + NULL, //tp_iter + NULL, //tp_iternext Euler_methods, //tp_methods - 0, //tp_members + NULL, //tp_members Euler_getseters, //tp_getset - 0, //tp_base - 0, //tp_dict - 0, //tp_descr_get - 0, //tp_descr_set + NULL, //tp_base + NULL, //tp_dict + NULL, //tp_descr_get + NULL, //tp_descr_set 0, //tp_dictoffset - 0, //tp_init - 0, //tp_alloc + NULL, //tp_init + NULL, //tp_alloc Euler_new, //tp_new - 0, //tp_free - 0, //tp_is_gc - 0, //tp_bases - 0, //tp_mro - 0, //tp_cache - 0, //tp_subclasses - 0, //tp_weaklist - 0 //tp_del + NULL, //tp_free + NULL, //tp_is_gc + NULL, //tp_bases + NULL, //tp_mro + NULL, //tp_cache + NULL, //tp_subclasses + NULL, //tp_weaklist + NULL //tp_del }; //------------------------newEulerObject (internal)------------- //creates a new euler object diff --git a/source/blender/python/generic/mathutils_geometry.c b/source/blender/python/generic/mathutils_geometry.c index 4a1993b00ef..d1e9a2452f3 100644 --- a/source/blender/python/generic/mathutils_geometry.c +++ b/source/blender/python/generic/mathutils_geometry.c @@ -844,7 +844,7 @@ static PyObject *M_Geometry_barycentric_transform(PyObject *UNUSED(self), PyObje return newVectorObject(vec, 3, Py_NEW, NULL); } -struct PyMethodDef M_Geometry_methods[]= { +static PyMethodDef M_Geometry_methods[]= { {"intersect_ray_tri", (PyCFunction) M_Geometry_intersect_ray_tri, METH_VARARGS, M_Geometry_intersect_ray_tri_doc}, {"intersect_point_line", (PyCFunction) M_Geometry_intersect_point_line, METH_VARARGS, M_Geometry_intersect_point_line_doc}, {"intersect_point_tri_2d", (PyCFunction) M_Geometry_intersect_point_tri_2d, METH_VARARGS, M_Geometry_intersect_point_tri_2d_doc}, @@ -866,10 +866,10 @@ static struct PyModuleDef M_Geometry_module_def= { M_Geometry_doc, /* m_doc */ 0, /* m_size */ M_Geometry_methods, /* m_methods */ - 0, /* m_reload */ - 0, /* m_traverse */ - 0, /* m_clear */ - 0, /* m_free */ + NULL, /* m_reload */ + NULL, /* m_traverse */ + NULL, /* m_clear */ + NULL, /* m_free */ }; /*----------------------------MODULE INIT-------------------------*/ diff --git a/source/blender/python/generic/mathutils_matrix.c b/source/blender/python/generic/mathutils_matrix.c index 10b799ca944..1da8141eef1 100644 --- a/source/blender/python/generic/mathutils_matrix.c +++ b/source/blender/python/generic/mathutils_matrix.c @@ -1213,7 +1213,7 @@ static PyObject *Matrix_copy(MatrixObject *self) static PyObject *Matrix_repr(MatrixObject *self) { int x, y; - PyObject *rows[MATRIX_MAX_DIM]= {0}; + PyObject *rows[MATRIX_MAX_DIM]= {NULL}; if(!BaseMath_ReadCallback(self)) return NULL; @@ -1617,37 +1617,37 @@ static PyNumberMethods Matrix_NumMethods = { (binaryfunc) Matrix_add, /*nb_add*/ (binaryfunc) Matrix_sub, /*nb_subtract*/ (binaryfunc) Matrix_mul, /*nb_multiply*/ - 0, /*nb_remainder*/ - 0, /*nb_divmod*/ - 0, /*nb_power*/ + NULL, /*nb_remainder*/ + NULL, /*nb_divmod*/ + NULL, /*nb_power*/ (unaryfunc) 0, /*nb_negative*/ (unaryfunc) 0, /*tp_positive*/ (unaryfunc) 0, /*tp_absolute*/ (inquiry) 0, /*tp_bool*/ (unaryfunc) Matrix_inv, /*nb_invert*/ - 0, /*nb_lshift*/ + NULL, /*nb_lshift*/ (binaryfunc)0, /*nb_rshift*/ - 0, /*nb_and*/ - 0, /*nb_xor*/ - 0, /*nb_or*/ - 0, /*nb_int*/ - 0, /*nb_reserved*/ - 0, /*nb_float*/ - 0, /* nb_inplace_add */ - 0, /* nb_inplace_subtract */ - 0, /* nb_inplace_multiply */ - 0, /* nb_inplace_remainder */ - 0, /* nb_inplace_power */ - 0, /* nb_inplace_lshift */ - 0, /* nb_inplace_rshift */ - 0, /* nb_inplace_and */ - 0, /* nb_inplace_xor */ - 0, /* nb_inplace_or */ - 0, /* nb_floor_divide */ - 0, /* nb_true_divide */ - 0, /* nb_inplace_floor_divide */ - 0, /* nb_inplace_true_divide */ - 0, /* nb_index */ + NULL, /*nb_and*/ + NULL, /*nb_xor*/ + NULL, /*nb_or*/ + NULL, /*nb_int*/ + NULL, /*nb_reserved*/ + NULL, /*nb_float*/ + NULL, /* nb_inplace_add */ + NULL, /* nb_inplace_subtract */ + NULL, /* nb_inplace_multiply */ + NULL, /* nb_inplace_remainder */ + NULL, /* nb_inplace_power */ + NULL, /* nb_inplace_lshift */ + NULL, /* nb_inplace_rshift */ + NULL, /* nb_inplace_and */ + NULL, /* nb_inplace_xor */ + NULL, /* nb_inplace_or */ + NULL, /* nb_floor_divide */ + NULL, /* nb_true_divide */ + NULL, /* nb_inplace_floor_divide */ + NULL, /* nb_inplace_true_divide */ + NULL, /* nb_index */ }; static PyObject *Matrix_getRowSize(MatrixObject *self, void *UNUSED(closure)) @@ -1755,51 +1755,51 @@ static char matrix_doc[] = ; PyTypeObject matrix_Type = { PyVarObject_HEAD_INIT(NULL, 0) - "mathutils.Matrix", /*tp_name*/ - sizeof(MatrixObject), /*tp_basicsize*/ - 0, /*tp_itemsize*/ - (destructor)BaseMathObject_dealloc, /*tp_dealloc*/ - 0, /*tp_print*/ - 0, /*tp_getattr*/ - 0, /*tp_setattr*/ - 0, /*tp_compare*/ - (reprfunc) Matrix_repr, /*tp_repr*/ - &Matrix_NumMethods, /*tp_as_number*/ - &Matrix_SeqMethods, /*tp_as_sequence*/ - &Matrix_AsMapping, /*tp_as_mapping*/ - 0, /*tp_hash*/ - 0, /*tp_call*/ - 0, /*tp_str*/ - 0, /*tp_getattro*/ - 0, /*tp_setattro*/ - 0, /*tp_as_buffer*/ + "mathutils.Matrix", /*tp_name*/ + sizeof(MatrixObject), /*tp_basicsize*/ + 0, /*tp_itemsize*/ + (destructor)BaseMathObject_dealloc, /*tp_dealloc*/ + NULL, /*tp_print*/ + NULL, /*tp_getattr*/ + NULL, /*tp_setattr*/ + NULL, /*tp_compare*/ + (reprfunc) Matrix_repr, /*tp_repr*/ + &Matrix_NumMethods, /*tp_as_number*/ + &Matrix_SeqMethods, /*tp_as_sequence*/ + &Matrix_AsMapping, /*tp_as_mapping*/ + NULL, /*tp_hash*/ + NULL, /*tp_call*/ + NULL, /*tp_str*/ + NULL, /*tp_getattro*/ + NULL, /*tp_setattro*/ + NULL, /*tp_as_buffer*/ Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE, /*tp_flags*/ - matrix_doc, /*tp_doc*/ - 0, /*tp_traverse*/ - 0, /*tp_clear*/ - (richcmpfunc)Matrix_richcmpr, /*tp_richcompare*/ - 0, /*tp_weaklistoffset*/ - 0, /*tp_iter*/ - 0, /*tp_iternext*/ - Matrix_methods, /*tp_methods*/ - 0, /*tp_members*/ - Matrix_getseters, /*tp_getset*/ - 0, /*tp_base*/ - 0, /*tp_dict*/ - 0, /*tp_descr_get*/ - 0, /*tp_descr_set*/ - 0, /*tp_dictoffset*/ - 0, /*tp_init*/ - 0, /*tp_alloc*/ - Matrix_new, /*tp_new*/ - 0, /*tp_free*/ - 0, /*tp_is_gc*/ - 0, /*tp_bases*/ - 0, /*tp_mro*/ - 0, /*tp_cache*/ - 0, /*tp_subclasses*/ - 0, /*tp_weaklist*/ - 0 /*tp_del*/ + matrix_doc, /*tp_doc*/ + NULL, /*tp_traverse*/ + NULL, /*tp_clear*/ + (richcmpfunc)Matrix_richcmpr, /*tp_richcompare*/ + 0, /*tp_weaklistoffset*/ + NULL, /*tp_iter*/ + NULL, /*tp_iternext*/ + Matrix_methods, /*tp_methods*/ + NULL, /*tp_members*/ + Matrix_getseters, /*tp_getset*/ + NULL, /*tp_base*/ + NULL, /*tp_dict*/ + NULL, /*tp_descr_get*/ + NULL, /*tp_descr_set*/ + 0, /*tp_dictoffset*/ + NULL, /*tp_init*/ + NULL, /*tp_alloc*/ + Matrix_new, /*tp_new*/ + NULL, /*tp_free*/ + NULL, /*tp_is_gc*/ + NULL, /*tp_bases*/ + NULL, /*tp_mro*/ + NULL, /*tp_cache*/ + NULL, /*tp_subclasses*/ + NULL, /*tp_weaklist*/ + NULL /*tp_del*/ }; /*------------------------newMatrixObject (internal)------------- diff --git a/source/blender/python/generic/mathutils_quat.c b/source/blender/python/generic/mathutils_quat.c index 88cd7358ad5..e577d808091 100644 --- a/source/blender/python/generic/mathutils_quat.c +++ b/source/blender/python/generic/mathutils_quat.c @@ -771,37 +771,37 @@ static PyNumberMethods Quaternion_NumMethods = { (binaryfunc) Quaternion_add, /*nb_add*/ (binaryfunc) Quaternion_sub, /*nb_subtract*/ (binaryfunc) Quaternion_mul, /*nb_multiply*/ - 0, /*nb_remainder*/ - 0, /*nb_divmod*/ - 0, /*nb_power*/ + NULL, /*nb_remainder*/ + NULL, /*nb_divmod*/ + NULL, /*nb_power*/ (unaryfunc) Quaternion_neg, /*nb_negative*/ (unaryfunc) 0, /*tp_positive*/ (unaryfunc) 0, /*tp_absolute*/ (inquiry) 0, /*tp_bool*/ (unaryfunc) 0, /*nb_invert*/ - 0, /*nb_lshift*/ + NULL, /*nb_lshift*/ (binaryfunc)0, /*nb_rshift*/ - 0, /*nb_and*/ - 0, /*nb_xor*/ - 0, /*nb_or*/ - 0, /*nb_int*/ - 0, /*nb_reserved*/ - 0, /*nb_float*/ - 0, /* nb_inplace_add */ - 0, /* nb_inplace_subtract */ - 0, /* nb_inplace_multiply */ - 0, /* nb_inplace_remainder */ - 0, /* nb_inplace_power */ - 0, /* nb_inplace_lshift */ - 0, /* nb_inplace_rshift */ - 0, /* nb_inplace_and */ - 0, /* nb_inplace_xor */ - 0, /* nb_inplace_or */ - 0, /* nb_floor_divide */ - 0, /* nb_true_divide */ - 0, /* nb_inplace_floor_divide */ - 0, /* nb_inplace_true_divide */ - 0, /* nb_index */ + NULL, /*nb_and*/ + NULL, /*nb_xor*/ + NULL, /*nb_or*/ + NULL, /*nb_int*/ + NULL, /*nb_reserved*/ + NULL, /*nb_float*/ + NULL, /* nb_inplace_add */ + NULL, /* nb_inplace_subtract */ + NULL, /* nb_inplace_multiply */ + NULL, /* nb_inplace_remainder */ + NULL, /* nb_inplace_power */ + NULL, /* nb_inplace_lshift */ + NULL, /* nb_inplace_rshift */ + NULL, /* nb_inplace_and */ + NULL, /* nb_inplace_xor */ + NULL, /* nb_inplace_or */ + NULL, /* nb_floor_divide */ + NULL, /* nb_true_divide */ + NULL, /* nb_inplace_floor_divide */ + NULL, /* nb_inplace_true_divide */ + NULL, /* nb_index */ }; static PyObject *Quaternion_getAxis( QuaternionObject *self, void *type ) @@ -1028,47 +1028,47 @@ PyTypeObject quaternion_Type = { sizeof(QuaternionObject), //tp_basicsize 0, //tp_itemsize (destructor)BaseMathObject_dealloc, //tp_dealloc - 0, //tp_print - 0, //tp_getattr - 0, //tp_setattr - 0, //tp_compare + NULL, //tp_print + NULL, //tp_getattr + NULL, //tp_setattr + NULL, //tp_compare (reprfunc) Quaternion_repr, //tp_repr &Quaternion_NumMethods, //tp_as_number &Quaternion_SeqMethods, //tp_as_sequence &Quaternion_AsMapping, //tp_as_mapping - 0, //tp_hash - 0, //tp_call - 0, //tp_str - 0, //tp_getattro - 0, //tp_setattro - 0, //tp_as_buffer + NULL, //tp_hash + NULL, //tp_call + NULL, //tp_str + NULL, //tp_getattro + NULL, //tp_setattro + NULL, //tp_as_buffer Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE, //tp_flags quaternion_doc, //tp_doc - 0, //tp_traverse - 0, //tp_clear + NULL, //tp_traverse + NULL, //tp_clear (richcmpfunc)Quaternion_richcmpr, //tp_richcompare 0, //tp_weaklistoffset - 0, //tp_iter - 0, //tp_iternext + NULL, //tp_iter + NULL, //tp_iternext Quaternion_methods, //tp_methods - 0, //tp_members + NULL, //tp_members Quaternion_getseters, //tp_getset - 0, //tp_base - 0, //tp_dict - 0, //tp_descr_get - 0, //tp_descr_set + NULL, //tp_base + NULL, //tp_dict + NULL, //tp_descr_get + NULL, //tp_descr_set 0, //tp_dictoffset - 0, //tp_init - 0, //tp_alloc + NULL, //tp_init + NULL, //tp_alloc Quaternion_new, //tp_new - 0, //tp_free - 0, //tp_is_gc - 0, //tp_bases - 0, //tp_mro - 0, //tp_cache - 0, //tp_subclasses - 0, //tp_weaklist - 0 //tp_del + NULL, //tp_free + NULL, //tp_is_gc + NULL, //tp_bases + NULL, //tp_mro + NULL, //tp_cache + NULL, //tp_subclasses + NULL, //tp_weaklist + NULL, //tp_del }; //------------------------newQuaternionObject (internal)------------- //creates a new quaternion object diff --git a/source/blender/python/generic/mathutils_vector.c b/source/blender/python/generic/mathutils_vector.c index 27eb531ff21..0da5fe983ad 100644 --- a/source/blender/python/generic/mathutils_vector.c +++ b/source/blender/python/generic/mathutils_vector.c @@ -1327,8 +1327,8 @@ static PyObject* Vector_richcmpr(PyObject *objectA, PyObject *objectB, int compa /*-----------------PROTCOL DECLARATIONS--------------------------*/ static PySequenceMethods Vector_SeqMethods = { (lenfunc) Vector_len, /* sq_length */ - (binaryfunc) 0, /* sq_concat */ - (ssizeargfunc) 0, /* sq_repeat */ + (binaryfunc) NULL, /* sq_concat */ + (ssizeargfunc) NULL, /* sq_repeat */ (ssizeargfunc) Vector_item, /* sq_item */ NULL, /* py3 deprecated slice func */ (ssizeobjargproc) Vector_ass_item, /* sq_ass_item */ @@ -1408,40 +1408,40 @@ static PyMappingMethods Vector_AsMapping = { static PyNumberMethods Vector_NumMethods = { - (binaryfunc) Vector_add, /*nb_add*/ - (binaryfunc) Vector_sub, /*nb_subtract*/ - (binaryfunc) Vector_mul, /*nb_multiply*/ - 0, /*nb_remainder*/ - 0, /*nb_divmod*/ - 0, /*nb_power*/ - (unaryfunc) Vector_neg, /*nb_negative*/ - (unaryfunc) 0, /*tp_positive*/ - (unaryfunc) 0, /*tp_absolute*/ - (inquiry) 0, /*tp_bool*/ - (unaryfunc) 0, /*nb_invert*/ - 0, /*nb_lshift*/ - (binaryfunc)0, /*nb_rshift*/ - 0, /*nb_and*/ - 0, /*nb_xor*/ - 0, /*nb_or*/ - 0, /*nb_int*/ - 0, /*nb_reserved*/ - 0, /*nb_float*/ - Vector_iadd, /* nb_inplace_add */ - Vector_isub, /* nb_inplace_subtract */ - Vector_imul, /* nb_inplace_multiply */ - 0, /* nb_inplace_remainder */ - 0, /* nb_inplace_power */ - 0, /* nb_inplace_lshift */ - 0, /* nb_inplace_rshift */ - 0, /* nb_inplace_and */ - 0, /* nb_inplace_xor */ - 0, /* nb_inplace_or */ - 0, /* nb_floor_divide */ - Vector_div, /* nb_true_divide */ - 0, /* nb_inplace_floor_divide */ - Vector_idiv, /* nb_inplace_true_divide */ - 0, /* nb_index */ + (binaryfunc) Vector_add, /*nb_add*/ + (binaryfunc) Vector_sub, /*nb_subtract*/ + (binaryfunc) Vector_mul, /*nb_multiply*/ + NULL, /*nb_remainder*/ + NULL, /*nb_divmod*/ + NULL, /*nb_power*/ + (unaryfunc) Vector_neg, /*nb_negative*/ + (unaryfunc) NULL, /*tp_positive*/ + (unaryfunc) NULL, /*tp_absolute*/ + (inquiry) NULL, /*tp_bool*/ + (unaryfunc) NULL, /*nb_invert*/ + NULL, /*nb_lshift*/ + (binaryfunc)NULL, /*nb_rshift*/ + NULL, /*nb_and*/ + NULL, /*nb_xor*/ + NULL, /*nb_or*/ + NULL, /*nb_int*/ + NULL, /*nb_reserved*/ + NULL, /*nb_float*/ + Vector_iadd, /* nb_inplace_add */ + Vector_isub, /* nb_inplace_subtract */ + Vector_imul, /* nb_inplace_multiply */ + NULL, /* nb_inplace_remainder */ + NULL, /* nb_inplace_power */ + NULL, /* nb_inplace_lshift */ + NULL, /* nb_inplace_rshift */ + NULL, /* nb_inplace_and */ + NULL, /* nb_inplace_xor */ + NULL, /* nb_inplace_or */ + NULL, /* nb_floor_divide */ + Vector_div, /* nb_true_divide */ + NULL, /* nb_inplace_floor_divide */ + Vector_idiv, /* nb_inplace_true_divide */ + NULL, /* nb_index */ }; /*------------------PY_OBECT DEFINITION--------------------------*/ diff --git a/source/blender/python/generic/noise.c b/source/blender/python/generic/noise.c index f266a666274..36147493dc5 100644 --- a/source/blender/python/generic/noise.c +++ b/source/blender/python/generic/noise.c @@ -649,12 +649,12 @@ static struct PyModuleDef noise_module_def = { PyModuleDef_HEAD_INIT, "noise", /* m_name */ Noise__doc__, /* m_doc */ - 0, /* m_size */ + 0, /* m_size */ NoiseMethods, /* m_methods */ - 0, /* m_reload */ - 0, /* m_traverse */ - 0, /* m_clear */ - 0, /* m_free */ + NULL, /* m_reload */ + NULL, /* m_traverse */ + NULL, /* m_clear */ + NULL, /* m_free */ }; PyObject *BPyInit_noise(void) @@ -677,7 +677,7 @@ PyObject *BPyInit_noise(void) {(char *)"VORONOI_F2F1", NULL}, {(char *)"VORONOI_CRACKLE", NULL}, {(char *)"CELLNOISE", NULL}, - {0} + {NULL} }; static PyStructSequence_Desc noise_types_info_desc = { @@ -723,7 +723,7 @@ PyObject *BPyInit_noise(void) {(char *)"MINKOVSKY_HALF", NULL}, {(char *)"MINKOVSKY_FOUR", NULL}, {(char *)"MINKOVSKY", NULL}, - {0} + {NULL} }; static PyStructSequence_Desc noise_types_info_desc = { |