luaobject: add export property macro
Signed-off-by: Julien Danjou <julien@danjou.info>
This commit is contained in:
parent
f3e12dbe52
commit
376c0daaaf
|
@ -159,6 +159,13 @@ int luaA_object_emit_signal_simple(lua_State *);
|
||||||
return p; \
|
return p; \
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#define OBJECT_EXPORT_PROPERTY(pfx, type, field) \
|
||||||
|
fieldtypeof(type, field) \
|
||||||
|
pfx##_get_##field(type *object) \
|
||||||
|
{ \
|
||||||
|
return object->field; \
|
||||||
|
}
|
||||||
|
|
||||||
#define LUA_OBJECT_EXPORT_PROPERTY(pfx, type, field, pusher) \
|
#define LUA_OBJECT_EXPORT_PROPERTY(pfx, type, field, pusher) \
|
||||||
static int \
|
static int \
|
||||||
luaA_##pfx##_get_##field(lua_State *L, type *object) \
|
luaA_##pfx##_get_##field(lua_State *L, type *object) \
|
||||||
|
|
Loading…
Reference in New Issue