Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
7
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Open sidebar
Knot projects
Knot Resolver
Commits
5db6f5ef
Commit
5db6f5ef
authored
Apr 10, 2015
by
Karel Slaný
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
style: Encapsulated REGISTER_MODULE_CALL definition into 'do { } while(0)'.
parent
0d62a65e
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
2 deletions
+3
-2
daemon/engine.c
daemon/engine.c
+3
-2
No files found.
daemon/engine.c
View file @
5db6f5ef
...
...
@@ -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
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment