Commit 7e3c1b291ad4ae8e2f6f4a368d8568bf1eaf7fec

jeremy 2024-12-03T16:17:09

wip serialize/deserialize.kc3

diff --git a/lib/kc3/0.1/deserialize.kc3 b/lib/kc3/0.1/deserialize.kc3
new file mode 100644
index 0000000..35c42fa
--- /dev/null
+++ b/lib/kc3/0.1/deserialize.kc3
@@ -0,0 +1,5 @@
+defmodule Deserialize do
+
+  def tag = cfn Tag "kc3_deserialize_tag" (Buf, Result)
+
+end
diff --git a/lib/kc3/0.1/serialize.kc3 b/lib/kc3/0.1/serialize.kc3
new file mode 100644
index 0000000..02c3226
--- /dev/null
+++ b/lib/kc3/0.1/serialize.kc3
@@ -0,0 +1,5 @@
+defmodule Serialize do
+
+  def tag = cfn Bool "kc3_serialize_tag" (Ptr, Tag)
+
+end
diff --git a/libkc3/kc3.c b/libkc3/kc3.c
index f0c807d..a28118c 100644
--- a/libkc3/kc3.c
+++ b/libkc3/kc3.c
@@ -549,6 +549,13 @@ s_list ** kc3_search_modules (s_list **dest)
   return env_search_modules(g_kc3_env, dest);
 }
 
+bool kc3_serialize_tag (s_serialize **serialize, const s_tag *tag)
+{
+  if (! serialize_tag(*serialize, tag))
+    return false;
+  return true;
+}
+
 s_list ** kc3_stacktrace (s_list **dest)
 {
   return env_stacktrace(g_kc3_env, dest);