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

Function registerConstructorClassID

class.go:27–32  ·  view source on GitHub ↗

registerConstructorClassID stores the constructor -> classID mapping

(ctx *Context, constructor C.JSValue, classID uint32)

Source from the content-addressed store, hash-verified

25
26// registerConstructorClassID stores the constructor -> classID mapping
27func registerConstructorClassID(ctx *Context, constructor C.JSValue, classID uint32) {
28 if ctx == nil || ctx.runtime == nil {
29 return
30 }
31 ctx.runtime.registerConstructorClassID(constructor, classID)
32}
33
34// getConstructorClassID retrieves the classID for a given constructor
35func getConstructorClassID(ctx *Context, constructor C.JSValue) (uint32, bool) {

Callers 2

createClassFunction · 0.85

Calls 1

Tested by 1