Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCampbell Barton <ideasman42@gmail.com>2010-10-14 03:25:08 +0400
committerCampbell Barton <ideasman42@gmail.com>2010-10-14 03:25:08 +0400
commitbe32cf8b3218eb0d52eadc99d31f12ed0bbc2ec7 (patch)
tree2498b0ec4e123869344379820db844538736a541 /source/blender/python/intern/bpy_app.c
parenta90f876948715be65354721fe0d244c739f81da4 (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/intern/bpy_app.c')
-rw-r--r--source/blender/python/intern/bpy_app.c16
1 files changed, 4 insertions, 12 deletions
diff --git a/source/blender/python/intern/bpy_app.c b/source/blender/python/intern/bpy_app.c
index 6c4e190673c..46a3c93292b 100644
--- a/source/blender/python/intern/bpy_app.c
+++ b/source/blender/python/intern/bpy_app.c
@@ -26,6 +26,7 @@
#include "BLI_path_util.h"
+#include "BKE_utildefines.h"
#include "BKE_blender.h"
#include "BKE_global.h"
#include "structseq.h"
@@ -116,21 +117,15 @@ static PyObject *make_app_info(void)
/* a few getsets because it makes sense for them to be in bpy.app even though
* they are not static */
-static PyObject *bpy_app_debug_get(PyObject *self, void *closure)
+static PyObject *bpy_app_debug_get(PyObject *UNUSED(self), void *UNUSED(closure))
{
- (void)(self);
- (void)(closure);
-
return PyBool_FromLong(G.f & G_DEBUG);
}
-static int bpy_app_debug_set(PyObject *self, PyObject *value, void *closure)
+static int bpy_app_debug_set(PyObject *UNUSED(self), PyObject *value, void *UNUSED(closure))
{
int param= PyObject_IsTrue(value);
- (void)(self);
- (void)(closure);
-
if(param < 0) {
PyErr_SetString(PyExc_TypeError, "bpy.app.debug can only be True/False");
return -1;
@@ -142,12 +137,9 @@ static int bpy_app_debug_set(PyObject *self, PyObject *value, void *closure)
return 0;
}
-static PyObject *bpy_app_tempdir_get(PyObject *self, void *closure)
+static PyObject *bpy_app_tempdir_get(PyObject *UNUSED(self), void *UNUSED(closure))
{
extern char btempdir[];
- (void)(self);
- (void)(closure);
-
return PyC_UnicodeFromByte(btempdir);
}