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>2015-01-06 08:42:22 +0300
committerCampbell Barton <ideasman42@gmail.com>2015-01-06 11:09:11 +0300
commit9fd569a654ded46901c7f20c5fe080972cbb10d2 (patch)
tree933b893aeaa0a8bffe230933523512340dfa016d /source/blender/python/intern/bpy_app.c
parentee58d449455df9470c4a0a902056b8c2001128bf (diff)
PyAPI: add utilities PyTuple_SET_ITEMS, Py_INCREF_RET
Setting all values of a tuple is such a common operation that it deserves its own macro. Also added Py_INCREF_RET to avoid confusing use of comma operator.
Diffstat (limited to 'source/blender/python/intern/bpy_app.c')
-rw-r--r--source/blender/python/intern/bpy_app.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/source/blender/python/intern/bpy_app.c b/source/blender/python/intern/bpy_app.c
index 25f855d06b2..678fd62ae89 100644
--- a/source/blender/python/intern/bpy_app.c
+++ b/source/blender/python/intern/bpy_app.c
@@ -50,6 +50,7 @@
#include "BKE_global.h"
#include "../generic/py_capi_utils.h"
+#include "../generic/python_utildefines.h"
#ifdef BUILD_DATE
extern char build_date[];
@@ -264,8 +265,7 @@ static PyObject *bpy_app_driver_dict_get(PyObject *UNUSED(self), void *UNUSED(cl
}
}
- Py_INCREF(bpy_pydriver_Dict);
- return bpy_pydriver_Dict;
+ return Py_INCREF_RET(bpy_pydriver_Dict);
}
static PyObject *bpy_app_autoexec_fail_message_get(PyObject *UNUSED(self), void *UNUSED(closure))