diff options
author | Campbell Barton <ideasman42@gmail.com> | 2011-12-04 10:05:48 +0400 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2011-12-04 10:05:48 +0400 |
commit | 31ff21d735cb2abeb3bee1b2efcfd49801dbb2f6 (patch) | |
tree | 00f4a63f6ee6fedf8ed2eb93046e393519a6b752 /source/blender/makesdna/DNA_defs.h | |
parent | 3fdc28b736fc6bbdfec9075b0fdd458897786a59 (diff) |
add define for deprecated DNA struct members: DNA_DEPRECATED,
this means use of deprecated struct members gives a warning.
- makesdna.c preprocessor skips this.
- DNA_DEPRECATED_ALLOW is used so readfile.c can do versioning without warnings.
- this exposes some use of deprecated struct members, will deal with this after.
Diffstat (limited to 'source/blender/makesdna/DNA_defs.h')
-rw-r--r-- | source/blender/makesdna/DNA_defs.h | 45 |
1 files changed, 45 insertions, 0 deletions
diff --git a/source/blender/makesdna/DNA_defs.h b/source/blender/makesdna/DNA_defs.h new file mode 100644 index 00000000000..88401d3d2d4 --- /dev/null +++ b/source/blender/makesdna/DNA_defs.h @@ -0,0 +1,45 @@ +/* + * ***** BEGIN GPL LICENSE BLOCK ***** + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 2 + * of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software Foundation, + * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + * + * Contributor(s): Campbell Barton + * + * ***** END GPL LICENSE BLOCK ***** + */ + +#ifndef DNA_DEFS_H +#define DNA_DEFS_H + +/** \file DNA_defs.h + * \ingroup DNA + */ + +/* makesdna ignores */ +#ifdef DNA_DEPRECATED_ALLOW + /* allow use of deprecated items */ +# define DNA_DEPRECATED +#else +# ifndef DNA_DEPRECATED +# ifdef __GNUC__ +# define DNA_DEPRECATED __attribute__ ((deprecated)) +# else + /* TODO, msvc & others */ +# define DNA_DEPRECATED +# endif +# endif +#endif + +#endif /* DNA_DEFS_H */ |