add docstring symbol to C level actor

This commit is contained in:
2025-05-29 10:29:57 -05:00
parent b4371ba3e0
commit aca9baf585
3 changed files with 4 additions and 3 deletions

View File

@@ -1,5 +1,5 @@
(function engine() {
prosperon.DOC = Symbol('+documentation+') // Symbol for documentation references
prosperon.DOC = prosperon.hidden.DOCSYM
function caller_data(depth = 0)
{

View File

@@ -1632,9 +1632,9 @@ void ffi_load(JSContext *js)
JS_FreeValue(js,globalThis);
/*
prosperon_rt *actor = JS_GetContextOpaque(js);
actor->actor_sym = JS_NewSymbol(js, "actor symbol", 0);
actor->doc_sym = JS_NewSymbol(js, "+documentation+", 0);
JS_SetPropertyStr(js, hidden_fn, "ACTORDATA", actor->actor_sym);
*/
JS_SetPropertyStr(js, hidden_fn, "DOCSYM", actor->doc_sym);
}

View File

@@ -70,6 +70,7 @@ typedef struct prosperon_rt {
int main_thread_only;
JSValue actor_sym;
JSValue doc_sym;
const char *name; // human friendly name
} prosperon_rt;