Esempio n. 1
0
// Creates & initializes a new State and returns a pointer to it. Returns
// nil on error.
func Newstate() *State {
	s := &State{C.newstate()}
	s.Newtable()
	s.Setglobal(namehooks)
	return s
}
Esempio n. 2
0
// Creates & initializes a new State and returns a pointer to it. Returns
// nil on error.
func Newstate() *State {
	s := &State{l: C.newstate(), gfregistry: make(map[int]interface{})}
	s.Newtable()
	s.Setglobal(namehooks)
	return s
}