[grilo-plugins/0.2.x] lua-factory: get correct typename on warnings
- From: Juan A. Suárez Romero <jasuarez src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [grilo-plugins/0.2.x] lua-factory: get correct typename on warnings
- Date: Sat, 19 Dec 2015 23:42:55 +0000 (UTC)
commit a2c735a19c585dd8c968201f692144da67f2eabd
Author: Victor Toso <me victortoso com>
Date: Thu Sep 24 17:42:58 2015 +0200
lua-factory: get correct typename on warnings
lua_typename (L, -1) is wrong and returns 'no value'. The correct way is
using lua_type(L, -1) as the second parameter.
https://bugzilla.gnome.org/show_bug.cgi?id=755447
src/lua-factory/grl-lua-library.c | 8 ++++----
1 files changed, 4 insertions(+), 4 deletions(-)
---
diff --git a/src/lua-factory/grl-lua-library.c b/src/lua-factory/grl-lua-library.c
index f5e35ee..b480c47 100644
--- a/src/lua-factory/grl-lua-library.c
+++ b/src/lua-factory/grl-lua-library.c
@@ -361,7 +361,7 @@ grl_util_build_media (lua_State *L,
grl_util_add_table_to_media (L, media, key_id, key_name, type);
} else if (!lua_isnil (L, -1)) {
GRL_WARNING ("'%s' is not compatible for '%s'",
- lua_typename (L, -1), key_name);
+ lua_typename (L, lua_type(L, -1)), key_name);
}
break;
@@ -372,7 +372,7 @@ grl_util_build_media (lua_State *L,
grl_util_add_table_to_media (L, media, key_id, key_name, type);
} else if (!lua_isnil (L, -1)) {
GRL_WARNING ("'%s' is not compatible for '%s'",
- lua_typename (L, -1), key_name);
+ lua_typename (L, lua_type(L, -1)), key_name);
}
break;
@@ -383,7 +383,7 @@ grl_util_build_media (lua_State *L,
grl_util_add_table_to_media (L, media, key_id, key_name, type);
} else if (!lua_isnil (L, -1)) {
GRL_WARNING ("'%s' is not compatible for '%s'",
- lua_typename (L, -1), key_name);
+ lua_typename (L, lua_type(L, -1)), key_name);
}
break;
case G_TYPE_BOOLEAN:
@@ -391,7 +391,7 @@ grl_util_build_media (lua_State *L,
grl_data_set_boolean (GRL_DATA (media), key_id, lua_toboolean (L, -1));
} else if (!lua_isnil (L, -1)) {
GRL_WARNING ("'%s' is not compatible for '%s'",
- lua_typename (L, -1), key_name);
+ lua_typename (L, lua_type(L, -1)), key_name);
}
break;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]