static int os_tmpname (lua_State *L) { char buff[LUA_TMPNAMBUFSIZE]; int err; lua_tmpnam(buff, err); if (err) return luaL_error(L, "unable to generate a unique filename"); lua_pushstring(L, buff); return 1; }
static int os_tmpname (LuaThread *L) { THREAD_CHECK(L); char buff[LUA_TMPNAMBUFSIZE]; int err; lua_tmpnam(buff, err); if (err) { return luaL_error(L, "unable to generate a unique filename"); } lua_pushstring(L, buff); return 1; }