MCPcopy Create free account
hub / github.com/Shopify/go-lua / State

Struct State

lua.go:221–242  ·  view source on GitHub ↗

A State is an opaque structure representing per thread Lua state.

Source from the content-addressed store, hash-verified

219
220// A State is an opaque structure representing per thread Lua state.
221type State struct {
222 error error
223 shouldYield bool
224 top int // first free slot in the stack
225 global *globalState
226 callInfo *callInfo // call info for current function
227 oldPC pc // last pC traced
228 stackLast int // last free slot in the stack
229 stack []value
230 nonYieldableCallCount int
231 nestedGoCallCount int
232 hookMask byte
233 allowHook bool
234 internalHook bool
235 baseHookCount int
236 hookCount int
237 hooker Hook
238 upValues *openUpValue
239 errorFunction int // current error handling function (stack index)
240 baseCallInfo callInfo // callInfo for first level (go calling lua)
241 protectFunction func()
242}
243
244type globalState struct {
245 mainThread *State

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected