aboutsummaryrefslogtreecommitdiff
path: root/ldblib.c
diff options
context:
space:
mode:
authorRoberto Ierusalimschy <roberto@inf.puc-rio.br>2018-03-05 11:15:04 -0300
committerRoberto Ierusalimschy <roberto@inf.puc-rio.br>2018-03-05 11:15:04 -0300
commit8b0b675149cff61875e2ee6c8681a946c1ca88c5 (patch)
treeb08d0e425d24421e82fa33f69ccc892e7ddab340 /ldblib.c
parent8c429311a38f0ca6f06c6df460f76414d4f4dfbe (diff)
downloadlua-8b0b675149cff61875e2ee6c8681a946c1ca88c5.tar.gz
lua-8b0b675149cff61875e2ee6c8681a946c1ca88c5.tar.bz2
lua-8b0b675149cff61875e2ee6c8681a946c1ca88c5.zip
added casts (warnings in VS)
Diffstat (limited to 'ldblib.c')
-rw-r--r--ldblib.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/ldblib.c b/ldblib.c
index 32da9697..cb542f67 100644
--- a/ldblib.c
+++ b/ldblib.c
@@ -1,5 +1,5 @@
1/* 1/*
2** $Id: ldblib.c,v 1.152 2018/02/17 19:29:29 roberto Exp roberto $ 2** $Id: ldblib.c,v 1.153 2018/02/20 16:52:50 roberto Exp roberto $
3** Interface from Lua to its debug API 3** Interface from Lua to its debug API
4** See Copyright Notice in lua.h 4** See Copyright Notice in lua.h
5*/ 5*/
@@ -64,7 +64,7 @@ static int db_setmetatable (lua_State *L) {
64 64
65 65
66static int db_getuservalue (lua_State *L) { 66static int db_getuservalue (lua_State *L) {
67 int n = luaL_optinteger(L, 2, 1); 67 int n = (int)luaL_optinteger(L, 2, 1);
68 if (lua_type(L, 1) != LUA_TUSERDATA) 68 if (lua_type(L, 1) != LUA_TUSERDATA)
69 lua_pushnil(L); 69 lua_pushnil(L);
70 else if (lua_getiuservalue(L, 1, n) != LUA_TNONE) { 70 else if (lua_getiuservalue(L, 1, n) != LUA_TNONE) {
@@ -76,7 +76,7 @@ static int db_getuservalue (lua_State *L) {
76 76
77 77
78static int db_setuservalue (lua_State *L) { 78static int db_setuservalue (lua_State *L) {
79 int n = luaL_optinteger(L, 3, 1); 79 int n = (int)luaL_optinteger(L, 3, 1);
80 luaL_checktype(L, 1, LUA_TUSERDATA); 80 luaL_checktype(L, 1, LUA_TUSERDATA);
81 luaL_checkany(L, 2); 81 luaL_checkany(L, 2);
82 lua_settop(L, 2); 82 lua_settop(L, 2);