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/intern | |
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/intern')
-rw-r--r-- | source/blender/makesdna/intern/makesdna.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/source/blender/makesdna/intern/makesdna.c b/source/blender/makesdna/intern/makesdna.c index b9bd2c073bf..11ab9b1efcf 100644 --- a/source/blender/makesdna/intern/makesdna.c +++ b/source/blender/makesdna/intern/makesdna.c @@ -475,6 +475,13 @@ static int preprocess_include(char *maindata, int len) if(comment); else if( cp[0]==' ' && cp[1]==' ' ); else if( cp[-1]=='*' && cp[0]==' ' ); /* pointers with a space */ + + /* skip special keywords */ + else if (strncmp("DNA_DEPRECATED", cp, 14)==0) { + /* single values are skipped already, so decrement 1 less */ + a -= 13; + cp += 13; + } else { md[0]= cp[0]; md++; |