Blender V4.3
python_compat.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
9
10#pragma once
11
12/* Removes `intialized` member from Python 3.13+. */
13#if PY_VERSION_HEX >= 0x030d0000
14# define PY_ARG_PARSER_HEAD_COMPAT()
15#elif PY_VERSION_HEX >= 0x030c0000
16/* Add `intialized` member for Python 3.12+. */
17# define PY_ARG_PARSER_HEAD_COMPAT() 0,
18#else
19# define PY_ARG_PARSER_HEAD_COMPAT()
20#endif
21
22/* Python 3.13 made some changes, use the "new" names. */
23#if PY_VERSION_HEX < 0x030d0000
24# define PyObject_GetOptionalAttr _PyObject_LookupAttr
25#endif