Fix non-working lua Lock (#2945)
The lock provided to lua as micro.Lock does not really work: an attempt to use it via micro.Lock:Lock() results in an error: Plugin initlua: init:260: attempt to call a non-function object stack traceback: init:260: in main chunk [G]: ? The reason is that the value that is provided to lua is a copy of the mutex, not the mutex itself. Ref #1539
This commit is contained in:
parent
db5fcf11a9
commit
dc6a275e04
1 changed files with 1 additions and 1 deletions
|
@ -54,7 +54,7 @@ func luaImportMicro() *lua.LTable {
|
|||
ulua.L.SetField(pkg, "Tabs", luar.New(ulua.L, func() *action.TabList {
|
||||
return action.Tabs
|
||||
}))
|
||||
ulua.L.SetField(pkg, "Lock", luar.New(ulua.L, ulua.Lock))
|
||||
ulua.L.SetField(pkg, "Lock", luar.New(ulua.L, &ulua.Lock))
|
||||
|
||||
return pkg
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue