We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent a410c77 commit b39be49Copy full SHA for b39be49
src/binary_tree.h
@@ -25,6 +25,9 @@ typedef struct BST_TYPED(node) {
25
BST_KEY_TYPE key;
26
struct BST_TYPED(node) *left;
27
struct BST_TYPED(node) *right;
28
+#ifdef BST_NODE_EXTRA
29
+ BST_NODE_EXTRA
30
+#endif
31
} BST_TYPED(node_t);
32
33
#define BST_NODE_TYPE BST_TYPED(node_t)
test.c
@@ -9,6 +9,8 @@
9
#define BST_NAME binary_tree
10
#define BST_KEY_TYPE uint32_t
11
#define BST_VALUE_TYPE char *
12
+#define BST_NODE_EXTRA \
13
+ uint8_t height;
14
#include "binary_tree.h"
15
#undef BST_NAME
16
#undef BST_KEY_TYPE
0 commit comments