Blender V5.0
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
15#define PyTuple_SET_ITEMS(op_arg, ...) \
16 { \
17 PyTupleObject *op = (PyTupleObject *)op_arg; \
18 PyObject **ob_items = op->ob_item; \
19 CHECK_TYPE_ANY(op_arg, PyObject *, PyTupleObject *); \
20 BLI_assert(VA_NARGS_COUNT(__VA_ARGS__) == PyTuple_GET_SIZE(op)); \
21 ARRAY_SET_ITEMS(ob_items, __VA_ARGS__); \
22 } \
23 (void)0
24
29Py_LOCAL_INLINE(int) PyList_APPEND(PyObject *op, PyObject *v)
30{
31 int ret = PyList_Append(op, v);
33 return ret;
34}
ATTR_WARN_UNUSED_RESULT const BMVert * v
Py_LOCAL_INLINE(int) PyList_APPEND(PyObject *op
return ret
Py_DecRef(v)