MCPcopy Index your code
hub / github.com/yuin/gopher-lua / loLoaderLua

Function loLoaderLua

loadlib.go:95–108  ·  view source on GitHub ↗
(L *LState)

Source from the content-addressed store, hash-verified

93}
94
95func loLoaderLua(L *LState) int {
96 name := L.CheckString(1)
97 path, msg := loFindFile(L, name, "path")
98 if len(path) == 0 {
99 L.Push(LString(msg))
100 return 1
101 }
102 fn, err1 := L.LoadFile(path)
103 if err1 != nil {
104 L.RaiseError(err1.Error())
105 }
106 L.Push(fn)
107 return 1
108}
109
110func loLoadLib(L *LState) int {
111 L.RaiseError("loadlib is not supported")

Callers

nothing calls this directly

Calls 7

loFindFileFunction · 0.85
LStringTypeAlias · 0.85
CheckStringMethod · 0.80
LoadFileMethod · 0.80
PushMethod · 0.65
ErrorMethod · 0.65
RaiseErrorMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…