~kvik/lu9-lua

3115a8132fa180084608bd7486c599fc326ffd7b — kvik 3 years ago b569724
los9lib: consistently return Lua integers for timestamp values
1 files changed, 2 insertions(+), 2 deletions(-)

M los9lib.c
M los9lib.c => los9lib.c +2 -2
@@ 236,7 236,7 @@ os_time(lua_State *L)
		t = tmnorm(&tm);
		setallfields(L, &tm);
	}
	lua_pushnumber(L, t);
	lua_pushinteger(L, t);
	return 1;
}



@@ 245,7 245,7 @@ os_difftime(lua_State *L)
{
	vlong t1 = luaL_checkinteger(L, 1);
	vlong t2 = luaL_checkinteger(L, 2);
	lua_pushnumber(L, (lua_Number)(t1 - t2));
	lua_pushinteger(L, t1 - t2);
	return 1;
}