[Bf-blender-cvs] [55416f4] master: Fix T37212: Wrong user counter when more than 32K users

Sergey Sharybin noreply at git.blender.org
Sun Dec 8 08:34:41 CET 2013


Commit: 55416f435ab9043df13b23e3e5244003d05d69bf
Author: Sergey Sharybin
Date:   Sun Dec 8 13:34:37 2013 +0600
http://developer.blender.org/rB55416f435ab9043df13b23e3e5244003d05d69bf

Fix T37212: Wrong user counter when more than 32K users

Summary:
Was a limitation of short data type used for id->us.
Made it to be int, needed to reshuffle fields a bit
because of alignment.

Reviewers: campbellbarton, brecht

Reviewed By: brecht

Maniphest Tasks: T37212

Differential Revision: http://developer.blender.org/D76

===================================================================

M	source/blender/makesdna/DNA_ID.h

===================================================================

diff --git a/source/blender/makesdna/DNA_ID.h b/source/blender/makesdna/DNA_ID.h
index 1e14534..af27ea9 100644
--- a/source/blender/makesdna/DNA_ID.h
+++ b/source/blender/makesdna/DNA_ID.h
@@ -111,12 +111,12 @@ typedef struct ID {
 	struct ID *newid;
 	struct Library *lib;
 	char name[66]; /* MAX_ID_NAME */
-	short pad, us;
 	/**
 	 * LIB_... flags report on status of the datablock this ID belongs
 	 * to.
 	 */
 	short flag;
+	int us;
 	int icon_id, pad2;
 	IDProperty *properties;
 } ID;




More information about the Bf-blender-cvs mailing list