1
0

config.go 888 B

12345678910111213141516171819202122232425262728293031323334353637383940414243
  1. package lua
  2. import (
  3. "os"
  4. )
  5. var CompatVarArg = true
  6. var FieldsPerFlush = 50
  7. var RegistrySize = 256 * 20
  8. var RegistryGrowStep = 32
  9. var CallStackSize = 256
  10. var MaxTableGetLoop = 100
  11. var MaxArrayIndex = 67108864
  12. type LNumber float64
  13. const LNumberBit = 64
  14. const LNumberScanFormat = "%f"
  15. const LuaVersion = "Lua 5.1"
  16. var LuaPath = "LUA_PATH"
  17. var LuaLDir string
  18. var LuaPathDefault string
  19. var LuaOS string
  20. var LuaDirSep string
  21. var LuaPathSep = ";"
  22. var LuaPathMark = "?"
  23. var LuaExecDir = "!"
  24. var LuaIgMark = "-"
  25. func init() {
  26. if os.PathSeparator == '/' { // unix-like
  27. LuaOS = "unix"
  28. LuaLDir = "/usr/local/share/lua/5.1"
  29. LuaDirSep = "/"
  30. LuaPathDefault = "./?.lua;" + LuaLDir + "/?.lua;" + LuaLDir + "/?/init.lua"
  31. } else { // windows
  32. LuaOS = "windows"
  33. LuaLDir = "!\\lua"
  34. LuaDirSep = "\\"
  35. LuaPathDefault = ".\\?.lua;" + LuaLDir + "\\?.lua;" + LuaLDir + "\\?\\init.lua"
  36. }
  37. }