mirror of
https://github.com/lua/lua
synced 2026-09-29 04:35:58 +03:00
new function 'luaV_flttointeger' to convert floats to integers (without
string coercions) + string operands to bitwise operations handled by string metamethods
This commit is contained in:
parent
c3e5946fb2
commit
26679ea35b
8 changed files with 126 additions and 48 deletions
4
ldebug.c
4
ldebug.c
|
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
** $Id: ldebug.c,v 2.140 2017/11/07 13:25:26 roberto Exp roberto $
|
||||
** $Id: ldebug.c,v 2.141 2017/11/07 17:20:42 roberto Exp roberto $
|
||||
** Debug Interface
|
||||
** See Copyright Notice in lua.h
|
||||
*/
|
||||
|
|
@ -670,7 +670,7 @@ l_noret luaG_opinterror (lua_State *L, const TValue *p1,
|
|||
*/
|
||||
l_noret luaG_tointerror (lua_State *L, const TValue *p1, const TValue *p2) {
|
||||
lua_Integer temp;
|
||||
if (!tointeger(p1, &temp))
|
||||
if (!tointegerns(p1, &temp))
|
||||
p2 = p1;
|
||||
luaG_runerror(L, "number%s has no integer representation", varinfo(L, p2));
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue