summaryrefslogtreecommitdiff
path: root/docs/application/interface.md
diff options
context:
space:
mode:
authornodist <kevin.comas.git@gmail.com>2026-06-02 16:26:09 -0400
committernodist <kevin.comas.git@gmail.com>2026-06-02 16:26:09 -0400
commitb26ad08b39b8229dcea0bafc4a8ba4b0d7ad7154 (patch)
tree1a469cc7f1ab2bbf2af42336518fa19ad0d0ed76 /docs/application/interface.md
parentba087e5dbcc50537d82da5dbc602df7292d3f24c (diff)
reformat with sync and async calls
Diffstat (limited to 'docs/application/interface.md')
-rw-r--r--docs/application/interface.md46
1 files changed, 46 insertions, 0 deletions
diff --git a/docs/application/interface.md b/docs/application/interface.md
new file mode 100644
index 0000000..1493aff
--- /dev/null
+++ b/docs/application/interface.md
@@ -0,0 +1,46 @@
+# Interface
+
+---
+
+General definitions used throughout the code
+
+## Object Definitions
+
+```c
+typedef union {
+ bool b;
+ uint8_t u8;
+ uint16_t u16;
+ uint32_t u32;
+ uint64_t u64;
+ int8_t i8;
+ int16_t i16;
+ int32_t i32;
+ int64_t i64;
+ float f32;
+ double f64;
+ void *ptr;
+} kpl_any;
+
+typedef size_t kpl_any_hash_fn(const kpl_any a);
+
+typedef bool kpl_any_eq_fn(const kpl_any a, const kpl_any b);
+
+typedef ssize_t kpl_any_cmp_fn(const kpl_any a, const kpl_any b);
+
+typedef int32_t kpl_any_print_fn(const kpl_any a, FILE *file, size_t idnt, uint32_t print_opts);
+
+typedef void kpl_any_free_fn(kpl_any a);
+
+typedef struct {
+ kpl_any_hash_fn *hash_fn;
+ kpl_any_eq_fn *eq_fn;
+ kpl_any_cmp_fn *cmp_fn;
+ kpl_any_print_fn *print_fn;
+ kpl_any_free_fn *free_fn;
+} kpl_any_interace;
+
+typedef struct {
+ any value, info;
+} kpl_result;
+```