From 14ffffbc7fa44ff927f814db387d79e645af44d1 Mon Sep 17 00:00:00 2001 From: Patrick Pelissier Date: Sun, 24 Dec 2017 22:23:51 +0100 Subject: [PATCH] Add new internal macros --- m-rbtree.h | 2 ++ 1 file changed, 2 insertions(+) diff --git a/m-rbtree.h b/m-rbtree.h index f62abdc1..8dd8f26f 100644 --- a/m-rbtree.h +++ b/m-rbtree.h @@ -100,6 +100,8 @@ #define RBTREEI_COPY_COLOR(x,y) ((x)->color = (y)->color) #define RBTREEI_GET_COLOR(x) ((x)->color + 0) #define RBTREEI_SET_COLOR(x, c) ((x)->color = (c)) +#define RBTREEI_GET_CHILD(x, n) ((x)->child[n]) +#define RBTREEI_SET_CHILD(x, n, y) ((x)->child[n] = (y)) typedef enum { RBTREE_BLACK = 0, RBTREE_RED