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:
Diffstat (limited to 'source/blender/blenlib/BLI_linklist_stack.h')
-rw-r--r--source/blender/blenlib/BLI_linklist_stack.h7
1 files changed, 7 insertions, 0 deletions
diff --git a/source/blender/blenlib/BLI_linklist_stack.h b/source/blender/blenlib/BLI_linklist_stack.h
index 1933dd733c3..5f4f98c5a4f 100644
--- a/source/blender/blenlib/BLI_linklist_stack.h
+++ b/source/blender/blenlib/BLI_linklist_stack.h
@@ -155,6 +155,13 @@
(_BLI_SMALLSTACK_CAST(var_src) ((_##var_src##_stack) ? \
(_BLI_SMALLSTACK_DEL_EX(var_src, var_dst), (_##var_dst##_free->link)) : NULL))
+#define BLI_SMALLSTACK_LAST(var) \
+ (_BLI_SMALLSTACK_CAST(var) ((_##var##_stack) ? \
+ _##var##_stack->link : NULL))
+
+#define BLI_SMALLSTACK_IS_EMPTY(var) \
+ (_BLI_SMALLSTACK_CAST(var) (_##var##_stack != NULL))
+
/* loop over stack members last-added-first */
#define BLI_SMALLSTACK_ITER_BEGIN(var, item) \
{ \