From 46545ac575e500d46aae3fabb05f6d46a7fb1797 Mon Sep 17 00:00:00 2001 From: Ton Roosendaal Date: Tue, 24 Apr 2007 14:52:35 +0000 Subject: 64 bits safety: - makesdna now checks for struct-in-struct alignment (default 8 byte align) - fixed two occurances of such struct-in-struct align errors --- source/blender/makesdna/DNA_ID.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'source/blender/makesdna/DNA_ID.h') diff --git a/source/blender/makesdna/DNA_ID.h b/source/blender/makesdna/DNA_ID.h index ce03bdc5e84..14e39faf2c6 100644 --- a/source/blender/makesdna/DNA_ID.h +++ b/source/blender/makesdna/DNA_ID.h @@ -57,15 +57,15 @@ typedef struct IDProperty { char name[32]; char type, subtype; short flag; - IDPropertyData data; + int saved; /*saved is used to indicate if this struct has been saved yet. + seemed like a good idea as a pad var was needed anyway :)*/ + IDPropertyData data; /* note, alignment for 64 bits */ int len; /* array length, also (this is important!) string length + 1. the idea is to be able to reuse array realloc functions on strings.*/ /*totallen is total length of allocated array/string, including a buffer. Note that the buffering is mild; the code comes from python's list implementation.*/ int totallen; /*strings and arrays are both buffered, though the buffer isn't saved. at least it won't be when I write that code. :)*/ - int saved; /*saved is used to indicate if this struct has been saved yet. - seemed like a good idea as a pad var was needed anyway :)*/ } IDProperty; #define MAX_IDPROP_NAME 32 -- cgit v1.2.3