Skip to content

Commit

Permalink
case matters, right type matters
Browse files Browse the repository at this point in the history
  • Loading branch information
serprex committed Mar 15, 2024
1 parent 123cecb commit a3087a2
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion flow/pua/flatbuffers.go
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ func FlatBuffers_Loader(ls *lua.LState) int {
ls.Push(ls.NewFunction(FlatBuffers_Builder_Loader))
ls.Call(0, 1)
builder := ls.GetField(ls.Get(-1), "New")
m.RawSetString("builder", builder)
m.RawSetString("Builder", builder)
ls.Pop(1)

ls.Push(m)
Expand Down
4 changes: 2 additions & 2 deletions flow/pua/flatbuffers_builder.go
Original file line number Diff line number Diff line change
Expand Up @@ -191,9 +191,9 @@ var LuaBuilder = LuaUserDataType[*Builder]{Name: "flatbuffers_builder"}

func FlatBuffers_Builder_Loader(ls *lua.LState) int {
m := ls.NewTable()
ls.SetField(m, "New", ls.NewFunction(BuilderNew))
m.RawSetString("New", ls.NewFunction(BuilderNew))

mt := LuaBinaryArray.NewMetatable(ls)
mt := LuaBuilder.NewMetatable(ls)
index := ls.SetFuncs(ls.NewTable(), map[string]lua.LGFunction{
"Clear": BuilderClear,
"Output": BuilderOutput,
Expand Down

0 comments on commit a3087a2

Please sign in to comment.