about summary refs log tree commit diff stats
path: root/src/teliva.c
diff options
context:
space:
mode:
authorKartik K. Agaram <vc@akkartik.com>2022-03-17 00:15:16 -0700
committerKartik K. Agaram <vc@akkartik.com>2022-03-17 00:15:16 -0700
commit1d3101507e7fa298ff3dd4bd1b5f20fc9ab462aa (patch)
tree17c68839e3554c11041e23d960fbd540d8dae440 /src/teliva.c
parentf9fc4a3d58a91cc81e9d150fd589373d66427492 (diff)
downloadteliva-1d3101507e7fa298ff3dd4bd1b5f20fc9ab462aa.tar.gz
fix some warnings
Diffstat (limited to 'src/teliva.c')
-rw-r--r--src/teliva.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/teliva.c b/src/teliva.c
index b0e6a56..ed4ddab 100644
--- a/src/teliva.c
+++ b/src/teliva.c
@@ -307,7 +307,7 @@ static const char* name_of_global(lua_State* L, const CallInfo* ci, int frame) {
   // push table of function names
   luaL_newmetatable(L, "__teliva_global_name");
   int gt = lua_gettop(L);
-  lua_pushinteger(L, func);
+  lua_pushinteger(L, (long int)func);
   lua_rawget(L, gt);
   if (!lua_isnil(L, -1))
     result = lua_tostring(L, -1);  // safe because global names are long-lived and never GC'd
@@ -325,8 +325,8 @@ static void precompute_names_of_globals(lua_State* L) {
   int table = lua_gettop(L);
   for (lua_pushnil(L); lua_next(L, table) != 0; lua_pop(L, 1)) {
     const char* key = lua_tostring(L, -2);
-    const char* value = lua_topointer(L, -1);
-    lua_pushinteger(L, value);
+    const void* value = lua_topointer(L, -1);
+    lua_pushinteger(L, (long int)value);
     lua_pushstring(L, key);
     lua_rawset(L, gt);
   }