From cbf7d62712c44d2b3bbb066e6840041b89cfb6d9 Mon Sep 17 00:00:00 2001 From: nodist Date: Wed, 7 Oct 2026 16:44:38 -0400 Subject: tree impl --- include/kpl/base.h | 2 ++ include/kpl/tree.h | 4 ++-- include/kpl_test.h | 2 +- 3 files changed, 5 insertions(+), 3 deletions(-) (limited to 'include') diff --git a/include/kpl/base.h b/include/kpl/base.h index 144fd51..9420a44 100644 --- a/include/kpl/base.h +++ b/include/kpl/base.h @@ -11,6 +11,7 @@ #include #include #include +#include #include #include #include @@ -19,6 +20,7 @@ #include #include #include +#include #include #include // KPL includes diff --git a/include/kpl/tree.h b/include/kpl/tree.h index 8e52524..90de3a8 100644 --- a/include/kpl/tree.h +++ b/include/kpl/tree.h @@ -4,9 +4,9 @@ #pragma once -// tree_duplicate is a linked stack +// tree_duplicates is a linked stack #define KPL_TREE_HEADER(STRUCT_NAME) \ - struct STRUCT_NAME *tree_left, *tree_right, *tree_duplicate; \ + struct STRUCT_NAME *tree_left, *tree_right, *tree_duplicates; \ int32_t tree_height /* diff --git a/include/kpl_test.h b/include/kpl_test.h index a656761..70a99b2 100644 --- a/include/kpl_test.h +++ b/include/kpl_test.h @@ -38,7 +38,7 @@ void _kpl_test_add(kpl_test *_test); // do not call outside KPL_TEST macro #define KPL_TEST(NAME) _KPL_TEST_FN_DEFINITION(NAME); \ static void __attribute__((constructor)) _ ## NAME(void) { \ static kpl_test _test = { \ - .tree_left = NULL, .tree_right = NULL, .tree_duplicate = NULL, \ + .tree_left = NULL, .tree_right = NULL, .tree_duplicates = NULL, \ .tree_height = KPL_TREE_TREE_HEIGHT_INIT, \ .error_line_number = KPL_TEST_ERROR_LINE_NUMBER_INIT, \ .list_next = NULL, \ -- cgit v1.2.3