diff options
author | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 2020-07-04 16:40:18 -0300 |
---|---|---|
committer | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 2020-07-04 16:40:18 -0300 |
commit | bfcf06d91a87b7ffb8c83e290db0cb6176a167f8 (patch) | |
tree | 0bcba905a2772e536c845e39e9eeed0c7330312c /testes/coroutine.lua | |
parent | 0280407fc54f9b6225139c5ac27326f98f0cf043 (diff) | |
download | lua-github-bfcf06d91a87b7ffb8c83e290db0cb6176a167f8.tar.gz |
Avoid memory allocation in some functions from 'ltests.c'
To allow their use in memory tests, some functions in 'ltests.c'
should never allocate memory. To avoid this allocation, the
library registers the strings used for status codes, and keeps
the variable '_WARN' always defined (with false instead of nil).
Diffstat (limited to 'testes/coroutine.lua')
-rw-r--r-- | testes/coroutine.lua | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/testes/coroutine.lua b/testes/coroutine.lua index 73333c14..0a4c2ef3 100644 --- a/testes/coroutine.lua +++ b/testes/coroutine.lua @@ -184,7 +184,7 @@ do if not T then warn("@on") else -- test library - assert(string.find(_WARN, "200")); _WARN = nil + assert(string.find(_WARN, "200")); _WARN = false warn("@normal") end assert(st == false and coroutine.status(co) == "dead" and msg == 111) |