From 6389aabffe198ece92b58ae34a905902c7eefe7c Mon Sep 17 00:00:00 2001 From: deva Date: Tue, 28 Jun 2011 06:38:10 +0000 Subject: Complete rewrite of the way lua widget methods, 'inheritance' in particular, are handled. --- client/widgets/checkbox.cc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'client/widgets/checkbox.cc') diff --git a/client/widgets/checkbox.cc b/client/widgets/checkbox.cc index 9083990..7d81b1a 100644 --- a/client/widgets/checkbox.cc +++ b/client/widgets/checkbox.cc @@ -132,7 +132,7 @@ int chk_checked(lua_State *L) { wdg_userdata *wdgu; - wdgu = (wdg_userdata *)luaL_isudata(L, 1, "CheckBox"); + wdgu = (wdg_userdata *)lua_touserdata(L, 1); luaL_argcheck(L, wdgu, 1, "checkbox expected"); CheckBox *chk = (CheckBox*)wdgu->widget; @@ -145,7 +145,7 @@ int chk_set_checked(lua_State *L) { wdg_userdata *wdgu; - wdgu = (wdg_userdata *)luaL_isudata(L, 1, "CheckBox"); + wdgu = (wdg_userdata *)lua_touserdata(L, 1); luaL_argcheck(L, wdgu, 1, "checkbox expected"); bool val = luaL_checkbool(L, 2); -- cgit v1.2.3