luaa: change deprecate() with more useful info

Signed-off-by: Julien Danjou <julien@danjou.info>
This commit is contained in:
Julien Danjou 2008-11-05 11:44:00 +01:00
parent 5dcd8cedb6
commit 207df8e2b0
9 changed files with 15 additions and 16 deletions

View File

@ -943,7 +943,7 @@ luaA_client_visible_get(lua_State *L)
luaA_checkscreen(screen);
deprecate();
deprecate(L);
lua_newtable(L);
@ -1167,7 +1167,7 @@ luaA_client_geometry(lua_State *L)
static int
luaA_client_coords(lua_State *L)
{
deprecate();
deprecate(L);
return luaA_client_geometry(L);
}
@ -1208,7 +1208,7 @@ luaA_client_fullgeometry(lua_State *L)
static int
luaA_client_fullcoords(lua_State *L)
{
deprecate();
deprecate(L);
return luaA_client_fullgeometry(L);
}

View File

@ -98,7 +98,7 @@ luaA_hooks_mouse_enter(lua_State *L)
static int
luaA_hooks_mouse_over(lua_State *L)
{
deprecate();
deprecate(L);
return luaA_hooks_mouse_enter(L);
}

4
luaa.c
View File

@ -175,7 +175,7 @@ luaA_font(lua_State *L)
static int
luaA_font_set(lua_State *L)
{
deprecate();
deprecate(L);
return luaA_font(L);
}
@ -240,7 +240,7 @@ luaA_colors(lua_State *L)
static int
luaA_colors_set(lua_State *L)
{
deprecate();
deprecate(L);
return luaA_colors(L);
}

5
luaa.h
View File

@ -35,9 +35,8 @@
/** Type for Lua function */
typedef int luaA_ref;
#define deprecate() _warn(__LINE__, \
__FUNCTION__, \
"This function is deprecated and will be removed.")
#define deprecate(L) luaA_warn(L, "%s: This function is deprecated and will be removed.", \
__FUNCTION__)
#define DO_LUA_NEW(decl, type, prefix, lua_type, type_ref) \
decl int \

View File

@ -1374,7 +1374,7 @@ luaA_mouse_coords(lua_State *L)
static int
luaA_mouse_new(lua_State *L)
{
deprecate();
deprecate(L);
return luaA_button_new(L);
}

View File

@ -500,7 +500,7 @@ luaA_screen_index(lua_State *L)
switch(a_tokenize(buf, len))
{
case A_TK_COORDS:
deprecate();
deprecate(L);
case A_TK_GEOMETRY:
luaA_pusharea(L, s->geometry);
break;

View File

@ -33,7 +33,7 @@
static int
luaA_statusbar_new(lua_State *L)
{
deprecate();
deprecate(L);
return luaA_wibox_new(L);
}

View File

@ -157,7 +157,7 @@ titlebar_geometry_compute(client_t *c, area_t geometry, area_t *res)
static int
luaA_titlebar_new(lua_State *L)
{
deprecate();
deprecate(L);
return luaA_wibox_new(L);
}

View File

@ -358,7 +358,7 @@ widget_invalidate_bywidget(widget_t *widget)
static int
luaA_widget_mouse_add(lua_State *L)
{
deprecate();
deprecate(L);
return 0;
}
@ -392,8 +392,8 @@ luaA_widget_new(lua_State *L)
if(!a_strcmp(type, "tasklist")
|| !a_strcmp(type, "taglist"))
{
deprecate();
luaA_warn(L, "requesting old widgets, return a table to allow smooth execution\n");
deprecate(L);
luaA_warn(L, "requesting old widgets, return a table to allow smooth execution.\n");
lua_newtable(L);
lua_pushcfunction(L, luaA_widget_mouse_add);
lua_setfield(L, -2, "mouse_add");