diff options
author | Ton Roosendaal <ton@blender.org> | 2009-07-09 18:35:40 +0400 |
---|---|---|
committer | Ton Roosendaal <ton@blender.org> | 2009-07-09 18:35:40 +0400 |
commit | 77c61f545fb3248ae4e06afafa816764222405c4 (patch) | |
tree | ac7c351f3cc33bbaddf47c73df98490c5c2314b4 /source/blender/makesdna/intern | |
parent | 4a3f56a29d64dfc38028f9216339d7aa390a1987 (diff) |
2.5
Bad bad DNA errors! People should really check on warning prints for
compiling dna dir...
- SpaceFile: ListBase* prev; <- dna doesnt recognize this
- wmEvent: const variables were not supported yet.
The first I fixed, 2nd I added support for in makesdna.
Note that files saved between tuesday july 7 and now can be corrupted!
Diffstat (limited to 'source/blender/makesdna/intern')
-rw-r--r-- | source/blender/makesdna/intern/dna_genfile.c | 5 | ||||
-rw-r--r-- | source/blender/makesdna/intern/makesdna.c | 5 |
2 files changed, 6 insertions, 4 deletions
diff --git a/source/blender/makesdna/intern/dna_genfile.c b/source/blender/makesdna/intern/dna_genfile.c index b4b029a19e5..628983ae879 100644 --- a/source/blender/makesdna/intern/dna_genfile.c +++ b/source/blender/makesdna/intern/dna_genfile.c @@ -616,8 +616,8 @@ static void cast_elem(char *ctype, char *otype, char *name, char *curdata, char arrlen= DNA_elem_array_size(name, strlen(name)); /* define otypenr */ - if(strcmp(otype, "char")==0) otypenr= 0; - else if((strcmp(otype, "uchar")==0)||(strcmp(otype, "unsigned char")==0)) otypenr= 1; + if(strcmp(otype, "char")==0 || (strcmp(otype, "const char")==0)) otypenr= 0; + else if((strcmp(otype, "uchar")==0) || (strcmp(otype, "unsigned char")==0)) otypenr= 1; else if(strcmp(otype, "short")==0) otypenr= 2; else if((strcmp(otype, "ushort")==0)||(strcmp(otype, "unsigned short")==0)) otypenr= 3; else if(strcmp(otype, "int")==0) otypenr= 4; @@ -629,6 +629,7 @@ static void cast_elem(char *ctype, char *otype, char *name, char *curdata, char /* define ctypenr */ if(strcmp(ctype, "char")==0) ctypenr= 0; + else if(strcmp(ctype, "const char")==0) ctypenr= 0; else if((strcmp(ctype, "uchar")==0)||(strcmp(ctype, "unsigned char")==0)) ctypenr= 1; else if(strcmp(ctype, "short")==0) ctypenr= 2; else if((strcmp(ctype, "ushort")==0)||(strcmp(ctype, "unsigned short")==0)) ctypenr= 3; diff --git a/source/blender/makesdna/intern/makesdna.c b/source/blender/makesdna/intern/makesdna.c index 91e9e617ea9..08af6372d31 100644 --- a/source/blender/makesdna/intern/makesdna.c +++ b/source/blender/makesdna/intern/makesdna.c @@ -559,10 +559,11 @@ int convert_include(char *filename) while( *md1 != '}' ) { if(md1>mainend) break; - /* skip when it says 'struct' or 'unsigned' */ + /* skip when it says 'struct' or 'unsigned' or 'const' */ if(*md1) { if( strncmp(md1, "struct", 6)==0 ) md1+= 7; - if( strncmp(md1, "unsigned", 6)==0 ) md1+= 9; + if( strncmp(md1, "unsigned", 8)==0 ) md1+= 9; + if( strncmp(md1, "const", 5)==0 ) md1+= 6; /* we've got a type! */ type= add_type(md1, 0); |