Skip to content

Commit

Permalink
Remove FlatBuffer_ prefixes
Browse files Browse the repository at this point in the history
  • Loading branch information
serprex committed Mar 19, 2024
1 parent f279423 commit 1b07a92
Show file tree
Hide file tree
Showing 5 changed files with 12 additions and 12 deletions.
16 changes: 8 additions & 8 deletions flow/pua/flatbuffers/flatbuffers.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,29 +5,29 @@ import (
)

func Loader(ls *lua.LState) int {
ls.PreloadModule("flatbuffers.binaryarray", FlatBuffers_BinaryArray_Loader)
ls.PreloadModule("flatbuffers.builder", FlatBuffers_Builder_Loader)
ls.PreloadModule("flatbuffers.numTypes", FlatBuffers_N_Loader)
ls.PreloadModule("flatbuffers.view", FlatBuffers_View_Loader)
ls.PreloadModule("flatbuffers.binaryarray", BinaryArray_Loader)
ls.PreloadModule("flatbuffers.builder", Builder_Loader)
ls.PreloadModule("flatbuffers.numTypes", N_Loader)
ls.PreloadModule("flatbuffers.view", View_Loader)

m := ls.NewTable()

ls.Push(ls.NewFunction(FlatBuffers_N_Loader))
ls.Push(ls.NewFunction(N_Loader))
ls.Call(0, 1)
m.RawSetString("N", ls.Get(-1))
ls.Pop(1)

ls.Push(ls.NewFunction(FlatBuffers_View_Loader))
ls.Push(ls.NewFunction(View_Loader))
ls.Call(0, 1)
m.RawSetString("view", ls.Get(-1))
ls.Pop(1)

ls.Push(ls.NewFunction(FlatBuffers_BinaryArray_Loader))
ls.Push(ls.NewFunction(BinaryArray_Loader))
ls.Call(0, 1)
m.RawSetString("binaryArray", ls.Get(-1))
ls.Pop(1)

ls.Push(ls.NewFunction(FlatBuffers_Builder_Loader))
ls.Push(ls.NewFunction(Builder_Loader))
ls.Call(0, 1)
builder := ls.GetField(ls.Get(-1), "New")
m.RawSetString("Builder", builder)
Expand Down
2 changes: 1 addition & 1 deletion flow/pua/flatbuffers/flatbuffers_binaryarray.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import (

var LuaBinaryArray = pua.LuaUserDataType[[]byte]{Name: "flatbuffers_binaryarray"}

func FlatBuffers_BinaryArray_Loader(ls *lua.LState) int {
func BinaryArray_Loader(ls *lua.LState) int {
m := ls.NewTable()
ls.SetField(m, "New", ls.NewFunction(BinaryArrayNew))

Expand Down
2 changes: 1 addition & 1 deletion flow/pua/flatbuffers/flatbuffers_builder.go
Original file line number Diff line number Diff line change
Expand Up @@ -204,7 +204,7 @@ func (b *Builder) WriteVtable(ls *lua.LState) int {

var LuaBuilder = pua.LuaUserDataType[*Builder]{Name: "flatbuffers_builder"}

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

Expand Down
2 changes: 1 addition & 1 deletion flow/pua/flatbuffers/flatbuffers_numtypes.go
Original file line number Diff line number Diff line change
Expand Up @@ -169,7 +169,7 @@ func (n *N) Unpack(ls *lua.LState, buf []byte) lua.LValue {

var LuaN = pua.LuaUserDataType[N]{Name: "flatbuffers_n"}

func FlatBuffers_N_Loader(ls *lua.LState) int {
func N_Loader(ls *lua.LState) int {
mtidx := ls.CreateTable(0, 1)
mtidx.RawSetString("Unpack", ls.NewFunction(NUnpack))
mt := LuaView.NewMetatable(ls)
Expand Down
2 changes: 1 addition & 1 deletion flow/pua/flatbuffers/flatbuffers_view.go
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ func CheckOffset(ls *lua.LState, idx int) int {
return int(num)
}

func FlatBuffers_View_Loader(ls *lua.LState) int {
func View_Loader(ls *lua.LState) int {
m := ls.NewTable()
ls.SetField(m, "New", ls.NewFunction(ViewNew))

Expand Down

0 comments on commit 1b07a92

Please sign in to comment.