Fix a bug in lua wrapper caused by the recent pairs() addition.

It inadvertently removed all functions like df.new from the df table.
develop
Alexander Gavrilov 2012-10-20 20:14:50 +04:00
parent 2b1d856214
commit 5388ad475f
1 changed files with 4 additions and 1 deletions

@ -1641,10 +1641,13 @@ static int DoAttach(lua_State *state)
freeze_table(state, true, "df");
lua_swap(state);
// pairstable dftable dfmeta
lua_pushvalue(state, -3);
lua_pushcclosure(state, wtype_pairs, 1);
lua_setfield(state, -2, "__pairs");
lua_pop(state, 1);
lua_remove(state, -2);
}
return 1;