summaryrefslogtreecommitdiff
path: root/docs/application/namespace.md
diff options
context:
space:
mode:
authornodist <kevin.comas.git@gmail.com>2026-07-11 19:52:56 -0400
committernodist <kevin.comas.git@gmail.com>2026-07-11 19:52:56 -0400
commit730faa451fbc3e7ae37c8a3b32b9d4d99007c666 (patch)
tree52bf7f4941b3d51bba67adf3b96e24753edb6ed9 /docs/application/namespace.md
parent20106935981d50971da0a7708a5bfdbec256049c (diff)
remove compressed pointers
Diffstat (limited to 'docs/application/namespace.md')
-rw-r--r--docs/application/namespace.md13
1 files changed, 8 insertions, 5 deletions
diff --git a/docs/application/namespace.md b/docs/application/namespace.md
index ac382de..f8653f7 100644
--- a/docs/application/namespace.md
+++ b/docs/application/namespace.md
@@ -6,13 +6,13 @@
```c
typedef struct _kpl_export {
- size_t tree_weight;
+ int32_t tree_weight;
struct _kpl_export *tree_left, *tree_right;
- kpl_type_ptr type;
+ kpl_type *type;
} kpl_export;
typedef struct _kpl_namespace_native {
- size_t tree_weight;
+ int32_t tree_weight;
struct _kpl_namespace_native *tree_left, *tree_right;
const char *name;
kpl_export *export_tree;
@@ -21,12 +21,13 @@ typedef struct _kpl_namespace_native {
static kpl_namespace_native *namespace_native_tree;
typedef struct _kpl_namespace_module {
- size_t tree_weight;
+ uint32_t module_id;
+ int32_t tree_weight;
struct _kpl_namespace_module *tree_left, *tree_right;
kpl_buffer *module_string, *module_name;
kpl_export *export_tree;
kpl_mutex export_mutex;
- kpl_type_ptr ast;
+ kpl_type *ast;
} kpl_namespace_module;
static kpl_namespace_module *namespace_module_tree;
@@ -34,6 +35,8 @@ static kpl_namespace_module *namespace_module_tree;
kpl_mutex namespace_modul_tree_mutex;
static kpl_namespace_module namespace_string;
+
+static kpl_namespace_module *module_array[KPL_MODULE_SIZE]; // module_id refers to index
```
Each `NAMESPACE_IDENTIFIER` maps to `kpl_namespace_native*` or `kpl_namespace_module*` depending on flags