From 07b82b1825db42f6ea6546b20f96fafa55f2afbe Mon Sep 17 00:00:00 2001 From: Julien Danjou Date: Wed, 13 Aug 2008 22:06:20 +0200 Subject: [PATCH] tag: export clients as simple table Signed-off-by: Julien Danjou --- tag.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/tag.c b/tag.c index eab9c818..baf2bc17 100644 --- a/tag.c +++ b/tag.c @@ -310,12 +310,11 @@ luaA_tag_clients(lua_State *L) else { client_array_t *clients = &(*tag)->clients; - luaA_otable_new(L); + lua_newtable(L); for(i = 0; i < clients->len; i++) { luaA_client_userdata_new(L, clients->tab[i]); - luaA_client_userdata_new(L, clients->tab[i]); - lua_rawset(L, -3); + lua_rawseti(L, -2, i + 1); } }