From 9a3f3699c3fc8ca32cff2d2d8a1c16e0f5cee30a Mon Sep 17 00:00:00 2001 From: Joshua Leung Date: Thu, 13 Dec 2007 02:08:47 +0000 Subject: 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... --- source/blender/makesdna/DNA_listBase.h | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'source/blender/makesdna/DNA_listBase.h') 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 { -- cgit v1.2.3