Files
workinf_Blender_Wasm/blender-5.2.0/source/blender/blenlib/BLI_alloca.h
2026-08-12 04:47:48 -04:00

20 lines
419 B
C++

/* SPDX-FileCopyrightText: 2023 Blender Authors
*
* SPDX-License-Identifier: GPL-2.0-or-later */
#pragma once
/** \file
* \ingroup bli
*
* Defines alloca and utility macro BLI_array_alloca
*/
/* BLI_array_alloca / alloca */
#include <cstdlib>
#include <type_traits> /* IWYU pragma: keep */
#define BLI_array_alloca(arr, realsize) \
(std::remove_reference_t<decltype(arr)>)alloca(sizeof(*arr) * (realsize))