Navigation Menu

Skip to content

Commit

Permalink
color: do not take pointer to push
Browse files Browse the repository at this point in the history
Signed-off-by: Julien Danjou <julien@danjou.info>
  • Loading branch information
jd committed Aug 17, 2009
1 parent 45702de commit ada6056
Show file tree
Hide file tree
Showing 5 changed files with 12 additions and 12 deletions.
2 changes: 1 addition & 1 deletion client.c
Expand Up @@ -1761,7 +1761,7 @@ luaA_client_index(lua_State *L)
lua_pushnumber(L, c->border);
break;
case A_TK_BORDER_COLOR:
luaA_pushxcolor(L, &c->border_color);
luaA_pushxcolor(L, c->border_color);
break;
case A_TK_TITLEBAR:
return wibox_push(L, c->titlebar);
Expand Down
10 changes: 5 additions & 5 deletions color.c
Expand Up @@ -294,12 +294,12 @@ xcolor_to_color(const xcolor_t *xcol, color_t *col)
* \return The number of elements pushed on stack.
*/
int
luaA_pushxcolor(lua_State *L, const xcolor_t *c)
luaA_pushxcolor(lua_State *L, const xcolor_t c)
{
uint8_t r = (unsigned)c->red * 0xff / 0xffff;
uint8_t g = (unsigned)c->green * 0xff / 0xffff;
uint8_t b = (unsigned)c->blue * 0xff / 0xffff;
uint8_t a = (unsigned)c->alpha * 0xff / 0xffff;
uint8_t r = (unsigned) c.red * 0xff / 0xffff;
uint8_t g = (unsigned) c.green * 0xff / 0xffff;
uint8_t b = (unsigned) c.blue * 0xff / 0xffff;
uint8_t a = (unsigned) c.alpha * 0xff / 0xffff;
char s[10];
int len;
/* do not print alpha if it's full */
Expand Down
2 changes: 1 addition & 1 deletion color.h
Expand Up @@ -76,7 +76,7 @@ bool xcolor_init_reply(xcolor_init_request_t);

bool xcolor_to_color(const xcolor_t *, color_t *);

int luaA_pushxcolor(lua_State *, const xcolor_t *);
int luaA_pushxcolor(lua_State *, const xcolor_t);
int luaA_pushcolor(lua_State *, const color_t *);

#endif
Expand Down
4 changes: 2 additions & 2 deletions luaa.c
Expand Up @@ -558,10 +558,10 @@ luaA_awesome_index(lua_State *L)
lua_pushstring(L, globalconf.conffile);
break;
case A_TK_FG:
luaA_pushxcolor(L, &globalconf.colors.fg);
luaA_pushxcolor(L, globalconf.colors.fg);
break;
case A_TK_BG:
luaA_pushxcolor(L, &globalconf.colors.bg);
luaA_pushxcolor(L, globalconf.colors.bg);
break;
case A_TK_VERSION:
lua_pushliteral(L, AWESOME_VERSION);
Expand Down
6 changes: 3 additions & 3 deletions wibox.c
Expand Up @@ -861,18 +861,18 @@ luaA_wibox_index(lua_State *L)
lua_pushnumber(L, wibox->border.width);
break;
case A_TK_BORDER_COLOR:
luaA_pushxcolor(L, &wibox->border.color);
luaA_pushxcolor(L, wibox->border.color);
break;
case A_TK_ALIGN:
if(wibox->type == WIBOX_TYPE_NORMAL)
luaA_deprecate(L, "awful.wibox.align");
lua_pushstring(L, draw_align_tostr(wibox->align));
break;
case A_TK_FG:
luaA_pushxcolor(L, &wibox->ctx.fg);
luaA_pushxcolor(L, wibox->ctx.fg);
break;
case A_TK_BG:
luaA_pushxcolor(L, &wibox->ctx.bg);
luaA_pushxcolor(L, wibox->ctx.bg);
break;
case A_TK_BG_IMAGE:
luaA_object_push_item(L, 1, wibox->bg_image);
Expand Down

0 comments on commit ada6056

Please sign in to comment.