(l *State, f *os.File, reg, name string)
| 298 | } |
| 299 | |
| 300 | func registerStdFile(l *State, f *os.File, reg, name string) { |
| 301 | newStream(l, f, dontClose) |
| 302 | if reg != "" { |
| 303 | l.PushValue(-1) |
| 304 | l.SetField(RegistryIndex, reg) |
| 305 | } |
| 306 | l.SetField(-2, name) |
| 307 | } |
| 308 | |
| 309 | // IOOpen opens the io library. Usually passed to Require. |
| 310 | func IOOpen(l *State) int { |