UNUSED() macro so -Wunused-parameter can be used with GCC without so many warnings.
applied to python api and exotic.c, removed some args being passed down which were not needed. keyword args for new mathutils types were being ignored when they should raise an error.
This commit is contained in:
@@ -61,6 +61,8 @@
|
||||
|
||||
#include "BLI_math.h"
|
||||
|
||||
#include "BKE_utildefines.h"
|
||||
|
||||
//-------------------------DOC STRINGS ---------------------------
|
||||
static char M_Mathutils_doc[] =
|
||||
"This module provides access to matrices, eulers, quaternions and vectors.";
|
||||
@@ -203,7 +205,7 @@ int _BaseMathObject_WriteIndexCallback(BaseMathObject *self, int index)
|
||||
|
||||
/* BaseMathObject generic functions for all mathutils types */
|
||||
char BaseMathObject_Owner_doc[] = "The item this is wrapping or None (readonly).";
|
||||
PyObject *BaseMathObject_getOwner( BaseMathObject * self, void *type )
|
||||
PyObject *BaseMathObject_getOwner(BaseMathObject *UNUSED(self), void *UNUSED(type))
|
||||
{
|
||||
PyObject *ret= self->cb_user ? self->cb_user : Py_None;
|
||||
Py_INCREF(ret);
|
||||
@@ -211,7 +213,7 @@ PyObject *BaseMathObject_getOwner( BaseMathObject * self, void *type )
|
||||
}
|
||||
|
||||
char BaseMathObject_Wrapped_doc[] = "True when this object wraps external data (readonly).\n\n:type: boolean";
|
||||
PyObject *BaseMathObject_getWrapped( BaseMathObject *self, void *type )
|
||||
PyObject *BaseMathObject_getWrapped(BaseMathObject *UNUSED(self), void *UNUSED(type))
|
||||
{
|
||||
return PyBool_FromLong((self->wrapped == Py_WRAP) ? 1:0);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user