diff options
Diffstat (limited to 'source/blender/makesdna/intern/makesdna.c')
-rw-r--r-- | source/blender/makesdna/intern/makesdna.c | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/source/blender/makesdna/intern/makesdna.c b/source/blender/makesdna/intern/makesdna.c index 952318482bb..2a6a4545634 100644 --- a/source/blender/makesdna/intern/makesdna.c +++ b/source/blender/makesdna/intern/makesdna.c @@ -1464,3 +1464,23 @@ int main(int argc, char **argv) /* end of list */ /** \} */ + + +/* -------------------------------------------------------------------- */ +/** \name DNA Renaming Sanity Check + * + * Without this it's possible to reference struct members that don't exist, + * breaking backward & forward compatibility. + * + * \{ */ + +static void UNUSED_FUNCTION(dna_rename_defs_ensure)(void) +{ +#define DNA_STRUCT_RENAME(old, new) (void)sizeof(new); +#define DNA_STRUCT_RENAME_ELEM(struct_name, old, new) (void)offsetof(struct_name, new); +#include "dna_rename_defs.h" +#undef DNA_STRUCT_RENAME +#undef DNA_STRUCT_RENAME_ELEM +} + +/** \} */ |