[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: lua_replace finding
- From: Shmuel Zeigerman <shmuz@...>
- Date: Thu, 25 Jun 2009 09:39:05 +0300
When Lua stack has one element, doing lua_replace(L,1) removes that
element. (I'd expect the stack to be left unchanged.)
int test(lua_State*L) {
lua_settop(L, 0);
lua_pushnumber(L, 0);
lua_replace(L, 1);
printf("%d\n", lua_gettop(L)); // 0 is printed
return 0;
}
--
Shmuel