mirror of
https://github.com/lua/lua
synced 2026-09-27 00:28:25 +03:00
Details
Several small improvements (code style, warnings, comments, more tests),
in particular:
- 'lua_topointer' extended to handle strings
- raises an error in 'string.format("%10q")' ('%q' with modifiers)
- in the manual for 'string.format', the term "option" replaced by
"conversion specifier" (the term used by the C standard)
This commit is contained in:
parent
2c32bff609
commit
cf71a5ddc7
8 changed files with 87 additions and 51 deletions
3
lfunc.c
3
lfunc.c
|
|
@ -138,7 +138,8 @@ static int callclosemth (lua_State *L, TValue *uv, StkId level, int status) {
|
|||
if (prepclosingmethod(L, uv, &G(L)->nilvalue)) /* something to call? */
|
||||
callclose(L, NULL); /* call closing method */
|
||||
else if (!ttisnil(uv)) { /* non-closable non-nil value? */
|
||||
const char *vname = luaG_findlocal(L, L->ci, level - L->ci->func, NULL);
|
||||
int idx = cast_int(level - L->ci->func);
|
||||
const char *vname = luaG_findlocal(L, L->ci, idx, NULL);
|
||||
if (vname == NULL) vname = "?";
|
||||
luaG_runerror(L, "attempt to close non-closable variable '%s'", vname);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue