mu-scm: add full-message support (body/header)

Implement support for "header" and "body" procedures, with require loading the
message file from disk, and create a foreign object for the message.

We keep those alive in a vector, and hook up a finalizer.

Update docs & tests as well.
This commit is contained in:
Dirk-Jan C. Binnema
2025-06-21 11:53:18 +03:00
parent 812d78be49
commit ca46c09ccb
11 changed files with 303 additions and 124 deletions

View File

@ -61,6 +61,7 @@ namespace Mu::Scm {
*/
Result<void> run(const Config& conf);
/**
* Helpers
*
@ -225,18 +226,4 @@ namespace Mu::Scm {
/**@}*/
}
/**
* SCM formatter, for use with fmt
*
* @param scm some object
*
* @return string representation of scm
*/
// static inline std::string format_as(SCM scm) {
// return Mu::Scm::from_scm<std::string>(scm_object_to_string(scm, SCM_UNSPECIFIED));
// }
// XXX doesn't work:
// "static assertion failed: Formatting of non-void pointers is disallowed"
#endif /*MU_SCM_HH*/