Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCampbell Barton <ideasman42@gmail.com>2018-03-27 15:44:17 +0300
committerCampbell Barton <ideasman42@gmail.com>2018-03-27 15:56:54 +0300
commite22b870b4a4c02f762471744675f5b4d8a940304 (patch)
tree159170612d9e44e65934ff4e9e432980c4e1f9b2 /source/blender/blenloader/BLO_undofile.h
parent3bca1ef26bcbd65f1a9063f2d073c92f83c79b70 (diff)
Cleanup: global undo (minor changes to internals)
- Get memory usage from MemFile instead of MEM API avoids possible invalid when threads alloc memory. - Use size_t instead of uint and uintptr_t to store size. - Rename UndoElem.str -> filename - Rename MemFileChunk.ident -> is_identical
Diffstat (limited to 'source/blender/blenloader/BLO_undofile.h')
-rw-r--r--source/blender/blenloader/BLO_undofile.h11
1 files changed, 6 insertions, 5 deletions
diff --git a/source/blender/blenloader/BLO_undofile.h b/source/blender/blenloader/BLO_undofile.h
index fb96ec75e62..d3c0130a63b 100644
--- a/source/blender/blenloader/BLO_undofile.h
+++ b/source/blender/blenloader/BLO_undofile.h
@@ -35,15 +35,16 @@
typedef struct {
void *next, *prev;
-
- char *buf;
- unsigned int ident, size;
-
+ const char *buf;
+ /** Size in bytes. */
+ unsigned int size;
+ /** When true, this chunk doesn't own the memory, it's shared with a previous #MemFileChunk */
+ bool is_identical;
} MemFileChunk;
typedef struct MemFile {
ListBase chunks;
- unsigned int size;
+ size_t size;
} MemFile;
/* actually only used writefile.c */