Example #1
0
func SetField(L *luajit.State, f string, v float64) {
	L.Pushstring(f)
	L.Pushnumber(v)
	L.Settable(-3)
}
Example #2
0
func summator(L *luajit.State) int {
	a := L.Tonumber(1)
	b := L.Tonumber(2)
	L.Pushnumber(a + b)
	return 1
}