diff --git a/common/luaclass.c b/common/luaclass.c index 6c7693481..e2f4bf321 100644 --- a/common/luaclass.c +++ b/common/luaclass.c @@ -26,8 +26,6 @@ struct lua_class_property { /** ID matching the property */ awesome_token_t id; - /** Name of the property */ - const char *name; /** Callback function called when the property is found in object creation. */ lua_class_propfunc_t new; /** Callback function called when the property is found in object __index. */ @@ -111,7 +109,6 @@ BARRAY_FUNCS(lua_class_property_t, lua_class_property, DO_NOTHING, lua_class_pro void luaA_class_add_property(lua_class_t *lua_class, awesome_token_t token, - const char *name, lua_class_propfunc_t cb_new, lua_class_propfunc_t cb_index, lua_class_propfunc_t cb_newindex) @@ -119,7 +116,6 @@ luaA_class_add_property(lua_class_t *lua_class, lua_class_property_array_insert(&lua_class->properties, (lua_class_property_t) { .id = token, - .name = name, .new = cb_new, .index = cb_index, .newindex = cb_newindex diff --git a/common/luaclass.h b/common/luaclass.h index 3f1377cf5..2d0325ab8 100644 --- a/common/luaclass.h +++ b/common/luaclass.h @@ -66,7 +66,7 @@ void luaA_openlib(lua_State *, const char *, const struct luaL_reg[], const stru void luaA_class_setup(lua_State *, lua_class_t *, const char *, lua_class_allocator_t, const struct luaL_reg[], const struct luaL_reg[]); -void luaA_class_add_property(lua_class_t *, awesome_token_t, const char *, +void luaA_class_add_property(lua_class_t *, awesome_token_t, lua_class_propfunc_t, lua_class_propfunc_t, lua_class_propfunc_t); int luaA_usemetatable(lua_State *, int, int); diff --git a/timer.c b/timer.c index c8922670f..9ca41dfe5 100644 --- a/timer.c +++ b/timer.c @@ -123,11 +123,11 @@ timer_class_setup(lua_State *L) luaA_class_setup(L, &timer_class, "timer", (lua_class_allocator_t) timer_new, timer_methods, timer_meta); - luaA_class_add_property(&timer_class, A_TK_TIMEOUT, "timeout", + luaA_class_add_property(&timer_class, A_TK_TIMEOUT, (lua_class_propfunc_t) luaA_timer_set_timeout, (lua_class_propfunc_t) luaA_timer_get_timeout, (lua_class_propfunc_t) luaA_timer_set_timeout); - luaA_class_add_property(&timer_class, A_TK_STARTED, "started", + luaA_class_add_property(&timer_class, A_TK_STARTED, NULL, (lua_class_propfunc_t) luaA_timer_get_started, NULL);