BaseOpen opens the basic library. Usually passed to Require.
(l *State)
| 320 | |
| 321 | // BaseOpen opens the basic library. Usually passed to Require. |
| 322 | func BaseOpen(l *State) int { |
| 323 | l.PushGlobalTable() |
| 324 | l.PushGlobalTable() |
| 325 | l.SetField(-2, "_G") |
| 326 | SetFunctions(l, baseLibrary, 0) |
| 327 | l.PushString(VersionString) |
| 328 | l.SetField(-2, "_VERSION") |
| 329 | return 1 |
| 330 | } |