Refactor: Move BPY generic headers to proper C++ ones.
NOTE: `bgl.h` was left unchanged, as it is deprecated code anyway, and its conversion to C++ does not seem immediately trivial.
This commit is contained in:
committed by
Bastien Montagne
parent
4fac7828e4
commit
c3247aa4f0
17
source/blender/python/generic/python_compat.hh
Normal file
17
source/blender/python/generic/python_compat.hh
Normal file
@@ -0,0 +1,17 @@
|
||||
/* SPDX-FileCopyrightText: 2023 Blender Authors
|
||||
*
|
||||
* SPDX-License-Identifier: GPL-2.0-or-later */
|
||||
|
||||
/** \file
|
||||
* \ingroup pygen
|
||||
* \brief header-only compatibility defines.
|
||||
*/
|
||||
|
||||
#pragma once
|
||||
|
||||
/* Add `intialized` member for Python 3.12+. */
|
||||
#if PY_VERSION_HEX >= 0x030c0000
|
||||
# define PY_ARG_PARSER_HEAD_COMPAT() 0,
|
||||
#else
|
||||
# define PY_ARG_PARSER_HEAD_COMPAT()
|
||||
#endif
|
||||
Reference in New Issue
Block a user