diff options
author | Joshua Leung <aligorith@gmail.com> | 2007-12-13 05:08:47 +0300 |
---|---|---|
committer | Joshua Leung <aligorith@gmail.com> | 2007-12-13 05:08:47 +0300 |
commit | 9a3f3699c3fc8ca32cff2d2d8a1c16e0f5cee30a (patch) | |
tree | 7c9fcfcc0d65dd4c296e4db0e27fc558e1fe3b9e /source/blender/makesdna/DNA_listBase.h | |
parent | e2e8ea9ed17dbe353e4aa8cac73b47cde9f8a24d (diff) |
Added a 'LinkData' struct for use with ListBases.
It is used to store a reference to some data that is already in another ListBase. Sometimes, these are needed for small one-off situations, where a custom struct seems overkill...
Diffstat (limited to 'source/blender/makesdna/DNA_listBase.h')
-rw-r--r-- | source/blender/makesdna/DNA_listBase.h | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/source/blender/makesdna/DNA_listBase.h b/source/blender/makesdna/DNA_listBase.h index 10a1b59fb01..e81cb886d6f 100644 --- a/source/blender/makesdna/DNA_listBase.h +++ b/source/blender/makesdna/DNA_listBase.h @@ -43,11 +43,20 @@ extern "C" { #endif +/* generic - all structs which are used in linked-lists used this */ typedef struct Link { struct Link *next,*prev; } Link; + +/* use this when it is not worth defining a custom one... */ +typedef struct LinkData +{ + struct LinkData *next, *prev; + void *data; +} LinkData; + /* never change the size of this! genfile.c detects pointerlen with it */ typedef struct ListBase { |