summaryrefslogtreecommitdiffstats
path: root/crawl-ref/source/l_file.cc
diff options
context:
space:
mode:
authorAdam Borowski <kilobyte@angband.pl>2010-06-20 00:28:11 +0200
committerAdam Borowski <kilobyte@angband.pl>2010-06-20 20:27:49 +0200
commita201159a83c15d2e9d3d027423162acab391cba0 (patch)
tree0634bce04097fcd45e82566d1e507c05340c278f /crawl-ref/source/l_file.cc
parent239738eefd7df21b8298966c3f2194510dfe899a (diff)
downloadcrawl-ref-a201159a83c15d2e9d3d027423162acab391cba0.tar.gz
crawl-ref-a201159a83c15d2e9d3d027423162acab391cba0.zip
s/marshallLong/marshallInt/, since this confusion tends to cause bugs.
Actually, it should be named marshallInt32_t as that's what it does, but that's hard to read, no architecture with smaller ints can conceivably run Crawl and the only architecture with bigger ints is long dead. And in even in such a case, everything will be fine except for name confusion...
Diffstat (limited to 'crawl-ref/source/l_file.cc')
-rw-r--r--crawl-ref/source/l_file.cc4
1 files changed, 2 insertions, 2 deletions
diff --git a/crawl-ref/source/l_file.cc b/crawl-ref/source/l_file.cc
index 3e668f0df1..21806298f3 100644
--- a/crawl-ref/source/l_file.cc
+++ b/crawl-ref/source/l_file.cc
@@ -32,7 +32,7 @@ static int file_marshall(lua_State *ls)
luaL_error(ls, "Need two arguments: tag header and value");
writer &th(*static_cast<writer*>( lua_touserdata(ls, 1) ));
if (lua_isnumber(ls, 2))
- marshallLong(th, luaL_checklong(ls, 2));
+ marshallInt(th, luaL_checklong(ls, 2));
else if (lua_isboolean(ls, 2))
marshallByte(th, lua_toboolean(ls, 2));
else if (lua_isstring(ls, 2))
@@ -59,7 +59,7 @@ static int file_unmarshall_number(lua_State *ls)
if (lua_gettop(ls) != 1)
luaL_error(ls, "Need reader as one argument");
reader &th(*static_cast<reader*>( lua_touserdata(ls, 1) ));
- lua_pushnumber(ls, unmarshallLong(th));
+ lua_pushnumber(ls, unmarshallInt(th));
return (1);
}