From 13fd676a712bb3f3808724e53a0b3ec07d884412 Mon Sep 17 00:00:00 2001 From: jean0t Date: Mon, 2 Feb 2026 22:41:52 -0300 Subject: [PATCH] feat: comments defining the purpose of the files in the header --- .gitignore | 1 + core.lisp | 4 ++++ types.lisp | 6 ++++++ 3 files changed, 11 insertions(+) diff --git a/.gitignore b/.gitignore index bf4db1e..1b18fc0 100644 --- a/.gitignore +++ b/.gitignore @@ -17,3 +17,4 @@ *.wx64fsl *.wx32fsl +*.mdx \ No newline at end of file diff --git a/core.lisp b/core.lisp index 6eddc15..be1a0b5 100644 --- a/core.lisp +++ b/core.lisp @@ -1,5 +1,9 @@ (in-package :monastery) +;;; Main interface to the C ABI +;;; All functions are raw defined here with its +;;; types. See types.lisp for more information. + (defcfun ("mdict_init" %mdict_init) :pointer (dictionary_path :string)) diff --git a/types.lisp b/types.lisp index 9a010bc..5ae22cf 100644 --- a/types.lisp +++ b/types.lisp @@ -1,5 +1,10 @@ (in-package :monastery) +;;; The types here will be used in the Core.lisp +;;; to define the return types and types used in the functions +;;; hence why it is separated, more organization and in case +;;; the ABI changes, it won't break everything + (defcstruct sized-data (data :pointer) (size :size-t)) @@ -9,6 +14,7 @@ (:mdict-encoding-hex 1)) +; naming type definition to make the references less verbose (defctype s-data '(:struct sized-data)) (defctype mdict-encoding mdict-encoding-t) (defctype simple-key-item :pointer)