[grilo-plugins] lua-factory: get correct typename on warnings
- From: Victor Toso de Carvalho <victortoso src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [grilo-plugins] lua-factory: get correct typename on warnings
- Date: Fri, 25 Sep 2015 09:28:40 +0000 (UTC)
commit 42717c03b2d562d3ccfe8f790a746a599b18216d
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 2db849e..37c9c38 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]