From 34084e49b73a22e1a0d364aaa1da2e38da704942 Mon Sep 17 00:00:00 2001 From: lyken Date: Tue, 20 Aug 2024 14:51:40 +0800 Subject: [PATCH] core/irrt: add List Needed for implementing np_array() --- nac3core/irrt/irrt.cpp | 1 + nac3core/irrt/irrt/list.hpp | 19 +++++++++++++++++++ 2 files changed, 20 insertions(+) create mode 100644 nac3core/irrt/irrt/list.hpp diff --git a/nac3core/irrt/irrt.cpp b/nac3core/irrt/irrt.cpp index a16941fc..c46c79e2 100644 --- a/nac3core/irrt/irrt.cpp +++ b/nac3core/irrt/irrt.cpp @@ -1,5 +1,6 @@ #include #include +#include #include #include #include diff --git a/nac3core/irrt/irrt/list.hpp b/nac3core/irrt/irrt/list.hpp new file mode 100644 index 00000000..25011f11 --- /dev/null +++ b/nac3core/irrt/irrt/list.hpp @@ -0,0 +1,19 @@ +#pragma once + +#include +#include + +namespace +{ +/** + * @brief A list in NAC3. + * + * The `items` field is opaque. You must rely on external contexts to + * know how to interpret it. + */ +template struct List +{ + uint8_t *items; + SizeT len; +}; +} // namespace \ No newline at end of file