Files
test2/source/blender/makesdna/DNA_defaults.h
Sergey Sharybin c1bc70b711 Cleanup: Add a copyright notice to files and use SPDX format
A lot of files were missing copyright field in the header and
the Blender Foundation contributed to them in a sense of bug
fixing and general maintenance.

This change makes it explicit that those files are at least
partially copyrighted by the Blender Foundation.

Note that this does not make it so the Blender Foundation is
the only holder of the copyright in those files, and developers
who do not have a signed contract with the foundation still
hold the copyright as well.

Another aspect of this change is using SPDX format for the
header. We already used it for the license specification,
and now we state it for the copyright as well, following the
FAQ:

    https://reuse.software/faq/
2023-05-31 16:19:06 +02:00

42 lines
1000 B
C

/* SPDX-FileCopyrightText: 2001-2002 NaN Holding BV. All rights reserved.
*
* SPDX-License-Identifier: GPL-2.0-or-later */
/** \file
* \ingroup DNA
*
* \see dna_defaults.c for details on how to use this system.
*/
#pragma once
#include "BLI_utildefines.h"
#include "dna_type_offsets.h"
#ifdef __cplusplus
extern "C" {
#endif
extern const void *DNA_default_table[SDNA_TYPE_MAX];
uint8_t *_DNA_struct_default_alloc_impl(const uint8_t *data_src,
size_t size,
const char *alloc_str);
/**
* Wrap with macro that casts correctly.
*/
#define DNA_struct_default_get(struct_name) \
(const struct_name *)DNA_default_table[SDNA_TYPE_FROM_STRUCT(struct_name)]
#define DNA_struct_default_alloc(struct_name) \
(struct_name *)_DNA_struct_default_alloc_impl( \
(const uint8_t *)DNA_default_table[SDNA_TYPE_FROM_STRUCT(struct_name)], \
sizeof(struct_name), \
__func__)
#ifdef __cplusplus
}
#endif