diff options
author | Campbell Barton <ideasman42@gmail.com> | 2010-10-14 03:25:08 +0400 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2010-10-14 03:25:08 +0400 |
commit | be32cf8b3218eb0d52eadc99d31f12ed0bbc2ec7 (patch) | |
tree | 2498b0ec4e123869344379820db844538736a541 /source/blender/python/generic/bgl.c | |
parent | a90f876948715be65354721fe0d244c739f81da4 (diff) |
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.
Diffstat (limited to 'source/blender/python/generic/bgl.c')
-rw-r--r-- | source/blender/python/generic/bgl.c | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/source/blender/python/generic/bgl.c b/source/blender/python/generic/bgl.c index 8ac2107f8d2..86b7bc522fe 100644 --- a/source/blender/python/generic/bgl.c +++ b/source/blender/python/generic/bgl.c @@ -35,6 +35,8 @@ #include <GL/glew.h> #include "MEM_guardedalloc.h" +#include "BKE_utildefines.h" + static char Method_Buffer_doc[] = "(type, dimensions, [template]) - Create a new Buffer object\n\n\ (type) - The format to store data in\n\ @@ -51,7 +53,7 @@ For example, passing [100, 100] will create a 2 dimensional\n\ square buffer. Passing [16, 16, 32] will create a 3 dimensional\n\ buffer which is twice as deep as it is wide or high."; -static PyObject *Method_Buffer( PyObject * self, PyObject * args ); +static PyObject *Method_Buffer( PyObject * self, PyObject *args ); /* Buffer sequence methods */ @@ -99,7 +101,7 @@ PyTypeObject BGL_bufferType = { /* #ifndef __APPLE__ */ #define BGL_Wrap(nargs, funcname, ret, arg_list) \ -static PyObject *Method_##funcname (PyObject *self, PyObject *args) {\ +static PyObject *Method_##funcname (PyObject *UNUSED(self), PyObject *args) {\ arg_def##nargs arg_list; \ ret_def_##ret; \ if(!PyArg_ParseTuple(args, arg_str##nargs arg_list, arg_ref##nargs arg_list)) return NULL;\ @@ -108,7 +110,7 @@ static PyObject *Method_##funcname (PyObject *self, PyObject *args) {\ } #define BGLU_Wrap(nargs, funcname, ret, arg_list) \ -static PyObject *Method_##funcname (PyObject *self, PyObject *args) {\ +static PyObject *Method_##funcname (PyObject *UNUSED(self), PyObject *args) {\ arg_def##nargs arg_list; \ ret_def_##ret; \ if(!PyArg_ParseTuple(args, arg_str##nargs arg_list, arg_ref##nargs arg_list)) return NULL;\ @@ -181,7 +183,7 @@ Buffer *BGL_MakeBuffer(int type, int ndimensions, int *dimensions, void *initbuf } #define MAX_DIMENSIONS 256 -static PyObject *Method_Buffer (PyObject *self, PyObject *args) +static PyObject *Method_Buffer (PyObject *UNUSED(self), PyObject *args) { PyObject *length_ob= NULL, *template= NULL; Buffer *buffer; |