lua/api: default Constraint type always to pw-global

now that interest is declared on G_TYPE_OBJECT by default
(in optional Interest function arguments), this conditional default
no longer works as expected...

besides, it may be confusing to have a different default depending
on the interest type
This commit is contained in:
George Kiagiadakis
2021-03-02 18:26:34 +02:00
parent 941b0324e5
commit 79ba66e46b

View File

@@ -402,8 +402,7 @@ object_interest_new_add_constraint (lua_State *L, GType type,
if (lua_gettable (L, constraint_idx) == LUA_TNUMBER)
ctype = lua_tointeger (L, -1);
else
ctype = g_type_is_a (type, WP_TYPE_GLOBAL_PROXY) ?
WP_CONSTRAINT_TYPE_PW_GLOBAL_PROPERTY : WP_CONSTRAINT_TYPE_G_PROPERTY;
ctype = WP_CONSTRAINT_TYPE_PW_GLOBAL_PROPERTY;
lua_pop (L, 1);
/* get t[1] (the subject) and t[2] (the verb) */