1a0bedd640
Some of the files are not accurate to blender-v4.3-release and not due to any goo engine additions Likely due to merges from beyond 4.3 that made it into 4.2 since it is an LTS and gets more support So merging these changes to keep it in line with the release version of 4.3
30 lines
710 B
C++
30 lines
710 B
C++
/* SPDX-FileCopyrightText: 2023 Blender Authors
|
|
*
|
|
* SPDX-License-Identifier: GPL-2.0-or-later */
|
|
|
|
/** \file
|
|
* \ingroup pygen
|
|
* \brief header-only compatibility defines.
|
|
*/
|
|
|
|
#pragma once
|
|
|
|
#include <Python.h>
|
|
|
|
/* Removes `intialized` member from Python 3.13+. */
|
|
#if PY_VERSION_HEX >= 0x030d0000
|
|
# define PY_ARG_PARSER_HEAD_COMPAT()
|
|
#elif PY_VERSION_HEX >= 0x030c0000
|
|
/* Add `intialized` member for Python 3.12+. */
|
|
# define PY_ARG_PARSER_HEAD_COMPAT() 0,
|
|
#else
|
|
# define PY_ARG_PARSER_HEAD_COMPAT()
|
|
#endif
|
|
|
|
/* Python 3.13 made some changes, use the "new" names. */
|
|
#if PY_VERSION_HEX < 0x030d0000
|
|
# define PyObject_GetOptionalAttr _PyObject_LookupAttr
|
|
|
|
# define Py_IsFinalizing _Py_IsFinalizing
|
|
#endif
|