// 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 }
// 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 }