Commit 5db6f5ef authored by Karel Slaný's avatar Karel Slaný

style: Encapsulated REGISTER_MODULE_CALL definition into 'do { } while(0)'.

parent 0d62a65e
......@@ -28,11 +28,12 @@
*/
/** Register module callback into Lua world. */
#define REGISTER_MODULE_CALL(L, module, cb, name) \
#define REGISTER_MODULE_CALL(L, module, cb, name) do { \
lua_pushlightuserdata((L), (module)); \
lua_pushlightuserdata((L), (cb)); \
lua_pushcclosure((L), l_trampoline, 2); \
lua_setfield((L), -2, (name))
lua_setfield((L), -2, (name)); \
} while (0)
/** Print help and available commands. */
static int l_help(lua_State *L)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment