From b486dcee99f17b2941939829be06b38f79e78c14 Mon Sep 17 00:00:00 2001 From: Janos Kovacs Date: Mon, 12 Nov 2012 21:08:44 +0200 Subject: [PATCH] lua-utils: add MRP_LUA_[ENTER|LEAVE] macros --- src/core/lua-utils/object.h | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/src/core/lua-utils/object.h b/src/core/lua-utils/object.h index b23ac4b..f95abf0 100644 --- a/src/core/lua-utils/object.h +++ b/src/core/lua-utils/object.h @@ -33,6 +33,19 @@ #include #include +#define MRP_LUA_ENTER \ + mrp_debug("enter") + +#define MRP_LUA_LEAVE(_v) \ + do { \ + mrp_debug("leave (%d)", (_v)); \ + return (_v); \ + } while (0) + +#define MRP_LUA_LEAVE_NOARG \ + mrp_debug("leave") + + #define MRP_LUA_CLASSID_ROOT "LuaBook." #define MRP_LUA_CLASS(_name, _constr) & _name ## _ ## _constr ## _class_def -- 2.7.4