MCPcopy Create free account
hub / github.com/buke/quickjs-go / registerContext

Function registerContext

bridge_mapping.go:20–22  ·  view source on GitHub ↗

registerContext registers Go Context with C JSContext (internal use).

(cCtx *C.JSContext, goCtx *Context)

Source from the content-addressed store, hash-verified

18
19// registerContext registers Go Context with C JSContext (internal use).
20func registerContext(cCtx *C.JSContext, goCtx *Context) {
21 contextMapping.Store(cCtx, goCtx)
22}
23
24// unregisterContext removes mapping when Context is closed (internal use).
25func unregisterContext(cCtx *C.JSContext) {

Calls 1

StoreMethod · 0.80