Started work on binding functions. Not yet complete.

This commit is contained in:
Simon Brooke 2026-05-04 16:15:57 +01:00
parent f4303247b9
commit efa6a3246d
17 changed files with 321 additions and 41 deletions

View file

@ -23,6 +23,13 @@
#include "ops/string_ops.h"
/**
* layer metadata for functions written in C
*/
struct pso_pointer privileged_keyword_bootstrap;
struct pso_pointer privileged_keyword_documentation;
/**
* location metadata for exceptions (and possibly location in other contexts).
*/
@ -37,7 +44,9 @@ struct pso_pointer privileged_keyword_name;
#define load_and_lock(var,val)var = lock_object(c_string_to_lisp_keyword(nil, val))
struct pso_pointer initialise_privileged_keywords( struct pso_pointer env){
struct pso_pointer initialise_privileged_keywords(struct pso_pointer env) {
load_and_lock(privileged_keyword_bootstrap, PK_BOOTSTRAP);
load_and_lock(privileged_keyword_documentation, PK_DOCUMENTATION);
load_and_lock(privileged_keyword_location, PK_LOCATION);
load_and_lock( privileged_keyword_name, PK_NAME);
}