lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]


  luaL_Buffer b;
  luaL_checktype(L,1,LUA_TTABLE);
  lua_settop(L,2);
  if (lua_isnoneornil(L,2)) {lua_pushliteral(L,""); lua_replace(L,2);}
  else if (!lua_isstring(L,2)) luaL_typerror(2,"nil/string");
  lua_insert(L,1);
  /* ... */

Above is the correct code, sorry.

-- 
-Patrick Donnelly

"One of the lessons of history is that nothing is often a good thing
to do and always a clever thing to say."

-Will Durant