lua-users home
lua-l archive

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


>  static int tinsert (lua_State *L) {
>    int e = aux_getn(L, 1) + 1;  /* first empty element */
> -  [...]
> +  int i;
> +  int pos = luaL_checkint(L, 2);  /* where to insert new element */
> +  if (lua_gettop(L) != 3)
> +    return luaL_error(L, "wrong number of arguments to " LUA_QL("insert"));

The entire point was not to treat nil and none as the same?

-- Roberto