'luaL_newstate' should not allocate extra memory

The allocation of a userdata for the state of the warn system can
cause a panic if it fails; 'luaL_ref' also can fail. This commit
re-implements the warn system so that it does not need an explicit
state. Instead, the system uses different functions to represent
the different states.
3 files changed
tree: 9504237097bb72548e5e7b66b753dc23056330a8
  1. .gitignore
  2. README.md
  3. all
  4. lapi.c
  5. lapi.h
  6. lauxlib.c
  7. lauxlib.h
  8. lbaselib.c
  9. lcode.c
  10. lcode.h
  11. lcorolib.c
  12. lctype.c
  13. lctype.h
  14. ldblib.c
  15. ldebug.c
  16. ldebug.h
  17. ldo.c
  18. ldo.h
  19. ldump.c
  20. lfunc.c
  21. lfunc.h
  22. lgc.c
  23. lgc.h
  24. linit.c
  25. liolib.c
  26. ljumptab.h
  27. llex.c
  28. llex.h
  29. llimits.h
  30. lmathlib.c
  31. lmem.c
  32. lmem.h
  33. loadlib.c
  34. lobject.c
  35. lobject.h
  36. lopcodes.c
  37. lopcodes.h
  38. lopnames.h
  39. loslib.c
  40. lparser.c
  41. lparser.h
  42. lprefix.h
  43. lstate.c
  44. lstate.h
  45. lstring.c
  46. lstring.h
  47. lstrlib.c
  48. ltable.c
  49. ltable.h
  50. ltablib.c
  51. ltests.c
  52. ltests.h
  53. ltm.c
  54. ltm.h
  55. lua.c
  56. lua.h
  57. luaconf.h
  58. lualib.h
  59. lundump.c
  60. lundump.h
  61. lutf8lib.c
  62. lvm.c
  63. lvm.h
  64. lzio.c
  65. lzio.h
  66. makefile
  67. manual/
  68. onelua.c
  69. testes/
README.md

Lua

This is the repository of Lua development code, as seen by the Lua team. It contains the full history of all commits but is mirrored irregularly. For complete information about Lua, visit Lua.org.

Please do not send pull requests. To report issues and send patches, post a message to the Lua mailing list.

Download official Lua releases from Lua.org.