MCPcopy Index your code
hub / github.com/Shopify/go-lua / BaseOpen

Function BaseOpen

base.go:322–330  ·  view source on GitHub ↗

BaseOpen opens the basic library. Usually passed to Require.

(l *State)

Source from the content-addressed store, hash-verified

320
321// BaseOpen opens the basic library. Usually passed to Require.
322func BaseOpen(l *State) int {
323 l.PushGlobalTable()
324 l.PushGlobalTable()
325 l.SetField(-2, "_G")
326 SetFunctions(l, baseLibrary, 0)
327 l.PushString(VersionString)
328 l.SetField(-2, "_VERSION")
329 return 1
330}

Callers 2

TestErrorFunction · 0.85
TestErrorfFunction · 0.85

Calls 4

SetFunctionsFunction · 0.85
PushGlobalTableMethod · 0.80
SetFieldMethod · 0.80
PushStringMethod · 0.80

Tested by 2

TestErrorFunction · 0.68
TestErrorfFunction · 0.68