commit | f645d3157372c73573dff221c5b26691cb0e7d56 | [log] [tgz] |
---|---|---|
author | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | Wed Jul 31 10:43:51 2019 -0300 |
committer | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | Wed Jul 31 10:43:51 2019 -0300 |
tree | 61adb1f332bbd8c0c0365b81cef8de47fa2ea06a | |
parent | 35b4efc270db2418bc2cac6671575a45028061c3 [diff] |
To-be-closed variables must be closed on initialization When initializing a to-be-closed variable, check whether it has a '__close' metamethod (or is a false value) and raise an error if if it hasn't. This produces more accurate error messages. (The check before closing still need to be done: in the C API, the value is not constant; and the object may lose its '__close' metamethod during the block.)