luaobject: add export property macro

Signed-off-by: Julien Danjou <julien@danjou.info>
This commit is contained in:
Julien Danjou 2009-07-29 17:36:18 +02:00
parent f3e12dbe52
commit 376c0daaaf
1 changed files with 7 additions and 0 deletions

View File

@ -159,6 +159,13 @@ int luaA_object_emit_signal_simple(lua_State *);
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) \
static int \
luaA_##pfx##_get_##field(lua_State *L, type *object) \