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>2019-04-17 07:17:24 +0300
committerCampbell Barton <ideasman42@gmail.com>2019-04-17 07:21:24 +0300
commite12c08e8d170b7ca40f204a5b0423c23a9fbc2c1 (patch)
tree8cf3453d12edb177a218ef8009357518ec6cab6a /source/blender/python/generic/python_utildefines.h
parentb3dabc200a4b0399ec6b81f2ff2730d07b44fcaa (diff)
ClangFormat: apply to source, most of intern
Apply clang format as proposed in T53211. For details on usage and instructions for migrating branches without conflicts, see: https://wiki.blender.org/wiki/Tools/ClangFormat
Diffstat (limited to 'source/blender/python/generic/python_utildefines.h')
-rw-r--r--source/blender/python/generic/python_utildefines.h29
1 files changed, 17 insertions, 12 deletions
diff --git a/source/blender/python/generic/python_utildefines.h b/source/blender/python/generic/python_utildefines.h
index 70840e5ce34..40cec436dea 100644
--- a/source/blender/python/generic/python_utildefines.h
+++ b/source/blender/python/generic/python_utildefines.h
@@ -28,28 +28,33 @@ extern "C" {
#endif
#define PyTuple_SET_ITEMS(op_arg, ...) \
-{ \
- PyTupleObject *op = (PyTupleObject *)op_arg; \
- PyObject **ob_items = op->ob_item; \
- CHECK_TYPE_ANY(op_arg, PyObject *, PyTupleObject *); \
- BLI_assert(VA_NARGS_COUNT(__VA_ARGS__) == PyTuple_GET_SIZE(op)); \
- ARRAY_SET_ITEMS(ob_items, __VA_ARGS__); \
-} (void)0
+ { \
+ PyTupleObject *op = (PyTupleObject *)op_arg; \
+ PyObject **ob_items = op->ob_item; \
+ CHECK_TYPE_ANY(op_arg, PyObject *, PyTupleObject *); \
+ BLI_assert(VA_NARGS_COUNT(__VA_ARGS__) == PyTuple_GET_SIZE(op)); \
+ ARRAY_SET_ITEMS(ob_items, __VA_ARGS__); \
+ } \
+ (void)0
/* wrap Py_INCREF & return the result,
* use sparingly to avoid comma operator or temp var assignment */
-Py_LOCAL_INLINE(PyObject *)Py_INCREF_RET(PyObject *op) { Py_INCREF(op); return op; }
+Py_LOCAL_INLINE(PyObject *) Py_INCREF_RET(PyObject *op)
+{
+ Py_INCREF(op);
+ return op;
+}
/* append & transfer ownership to the list, avoids inline Py_DECREF all over (which is quite a large macro) */
Py_LOCAL_INLINE(int) PyList_APPEND(PyObject *op, PyObject *v)
{
- int ret = PyList_Append(op, v);
- Py_DecRef(v);
- return ret;
+ int ret = PyList_Append(op, v);
+ Py_DecRef(v);
+ return ret;
}
#ifdef __cplusplus
}
#endif
-#endif /* __PYTHON_UTILDEFINES_H__ */
+#endif /* __PYTHON_UTILDEFINES_H__ */