MCPcopy Index your code
hub / github.com/Shopify/go-lua / IOOpen

Function IOOpen

io.go:310–324  ·  view source on GitHub ↗

IOOpen opens the io library. Usually passed to Require.

(l *State)

Source from the content-addressed store, hash-verified

308
309// IOOpen opens the io library. Usually passed to Require.
310func IOOpen(l *State) int {
311 NewLibrary(l, ioLibrary)
312
313 NewMetaTable(l, fileHandle)
314 l.PushValue(-1)
315 l.SetField(-2, "__index")
316 SetFunctions(l, fileHandleMethods, 0)
317 l.Pop(1)
318
319 registerStdFile(l, os.Stdin, input, "stdin")
320 registerStdFile(l, os.Stdout, output, "stdout")
321 registerStdFile(l, os.Stderr, "", "stderr")
322
323 return 1
324}

Callers

nothing calls this directly

Calls 7

NewLibraryFunction · 0.85
NewMetaTableFunction · 0.85
SetFunctionsFunction · 0.85
registerStdFileFunction · 0.85
PushValueMethod · 0.80
SetFieldMethod · 0.80
PopMethod · 0.80

Tested by

no test coverage detected