From 4508836133a054cd4559b1ef7014d37fb65e0e9e Mon Sep 17 00:00:00 2001 From: Julien Danjou Date: Thu, 26 Jun 2008 16:05:25 +0200 Subject: [PATCH] statusbar: replace getfield/optstring with luaA_getopt_string() Signed-off-by: Julien Danjou --- statusbar.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/statusbar.c b/statusbar.c index 3a7fb9f8..b0db560c 100644 --- a/statusbar.c +++ b/statusbar.c @@ -503,15 +503,13 @@ luaA_statusbar_new(lua_State *L) sb->name = luaA_name_init(L); - lua_getfield(L, 1, "fg"); - if((buf = luaL_optstring(L, -1, NULL))) + if((buf = luaA_getopt_string(L, 1, "fg", NULL))) xcolor_new(globalconf.connection, globalconf.default_screen, buf, &sb->colors.fg); else sb->colors.fg = globalconf.colors.fg; - lua_getfield(L, 1, "bg"); - if((buf = luaL_optstring(L, -1, NULL))) + if((buf = luaA_getopt_string(L, 1, "bg", NULL))) xcolor_new(globalconf.connection, globalconf.default_screen, buf, &sb->colors.bg); else