From aca9baf585ae04ad721f6095f63187908527299c Mon Sep 17 00:00:00 2001 From: John Alanbrook Date: Thu, 29 May 2025 10:29:57 -0500 Subject: [PATCH] add docstring symbol to C level actor --- scripts/core/engine.js | 2 +- source/jsffi.c | 4 ++-- source/prosperon.h | 1 + 3 files changed, 4 insertions(+), 3 deletions(-) diff --git a/scripts/core/engine.js b/scripts/core/engine.js index 1d9897d0..73e465cc 100644 --- a/scripts/core/engine.js +++ b/scripts/core/engine.js @@ -1,5 +1,5 @@ (function engine() { -prosperon.DOC = Symbol('+documentation+') // Symbol for documentation references + prosperon.DOC = prosperon.hidden.DOCSYM function caller_data(depth = 0) { diff --git a/source/jsffi.c b/source/jsffi.c index fa6eb4b2..0b8fe103 100644 --- a/source/jsffi.c +++ b/source/jsffi.c @@ -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); } diff --git a/source/prosperon.h b/source/prosperon.h index 330aef70..48ea9d29 100644 --- a/source/prosperon.h +++ b/source/prosperon.h @@ -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;