MCPcopy Create free account
hub / github.com/ceifa/wasmoon / getValue

Method getValue

src/type-extensions/userdata.ts:50–54  ·  view source on GitHub ↗
(thread: Thread, index: number)

Source from the content-addressed store, hash-verified

48 }
49
50 public getValue(thread: Thread, index: number): any {
51 const refUserdata = thread.lua.lua_touserdata(thread.address, index)
52 const referencePointer = thread.lua.module.getValue(refUserdata, '*')
53 return thread.lua.getRef(referencePointer)
54 }
55
56 public pushValue(thread: Thread, decoratedValue: Decoration<any, UserdataDecorationOptions>): boolean {
57 if (!decoratedValue.options.reference) {

Callers 1

constructorMethod · 0.45

Calls 1

getRefMethod · 0.80

Tested by

no test coverage detected