Get the latest Blender, older versions, or experimental builds.
Stay up-to-date with the new features in the latest Blender releases.
Access production assets and knowledge from the open movies.
Documentation on the usage and features in Blender.
Latest development updates, by Blender developers.
Guidelines, release notes and development docs.
A platform to collect and share results of the Blender Benchmark.
The yearly event that brings the community together.
Support core development with a monthly contribution.
Perform a single donation with more payment options available.
Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.
/* SPDX-License-Identifier: GPL-2.0-or-later */
/* clang-format off */
/* #define typeof() triggers a bug in some clang-format versions, disable format
* for entire file to keep results consistent. */
#pragma once
/** \file
* \ingroup bli
*
* Use to help with cross platform portability.
*/
#if defined(_MSC_VER)
# define alloca _alloca
#endif
#if (defined(__GNUC__) || defined(__clang__)) && defined(__cplusplus)
extern "C++" {
/** Some magic to be sure we don't have reference in the type. */
template<typename T> static inline T decltype_helper(T x)
{
return x;
}
#define typeof(x) decltype(decltype_helper(x))
/* little macro so inline keyword works */
# define BLI_INLINE static __forceinline
#else
# define BLI_INLINE static inline __attribute__((always_inline)) __attribute__((__unused__))
#if defined(__GNUC__)
# define BLI_NOINLINE __attribute__((noinline))
# define BLI_NOINLINE