Blender V5.3
python_utildefines.hh
Go to the documentation of this file.
1/* SPDX-FileCopyrightText: 2023 Blender Authors
2 *
3 * SPDX-License-Identifier: GPL-2.0-or-later */
4
10
11#pragma once
12
13#include <Python.h>
14
15namespace blender {
16
17#define PyTuple_SET_ITEMS(op_arg, ...) \
18 { \
19 PyTupleObject *op = (PyTupleObject *)op_arg; \
20 PyObject **ob_items = op->ob_item; \
21 CHECK_TYPE_ANY(op_arg, PyObject *, PyTupleObject *); \
22 BLI_assert(VA_NARGS_COUNT(__VA_ARGS__) == PyTuple_GET_SIZE(op)); \
23 ARRAY_SET_ITEMS(ob_items, __VA_ARGS__); \
24 } \
25 (void)0
26
31Py_LOCAL_INLINE(int) PyList_APPEND(PyObject *op, PyObject *v)
32{
33 int ret = PyList_Append(op, v);
35 return ret;
36}
37
38} // namespace blender
BMesh Iterators.
Py_DecRef(v)
ATTR_WARN_UNUSED_RESULT const BMVert * v
Py_LOCAL_INLINE(int32_t) PyC_Long_AsI32(PyObject *value)