mirror of
https://github.com/octoleo/lsyncd.git
synced 2024-12-13 14:43:09 +00:00
Make register_inotify() a bit more obvious
This commit is contained in:
parent
3d065fccba
commit
702f6d3d4e
@ -351,7 +351,6 @@ inotify_ready(lua_State *L, struct observance *obs)
|
|||||||
extern void
|
extern void
|
||||||
register_inotify(lua_State *L)
|
register_inotify(lua_State *L)
|
||||||
{
|
{
|
||||||
lua_pushstring(L, "inotify");
|
|
||||||
luaL_register(L, "inotify", linotfylib);
|
luaL_register(L, "inotify", linotfylib);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
8
lsyncd.c
8
lsyncd.c
@ -1394,13 +1394,13 @@ register_lsyncd(lua_State *L)
|
|||||||
lua_settable(L, -3);
|
lua_settable(L, -3);
|
||||||
lua_pop(L, 1);
|
lua_pop(L, 1);
|
||||||
|
|
||||||
lua_getglobal(L, "lsyncd");
|
|
||||||
#ifdef LSYNCD_WITH_INOTIFY
|
#ifdef LSYNCD_WITH_INOTIFY
|
||||||
// TODO why is the here?
|
lua_getglobal(L, "lsyncd");
|
||||||
register_inotify(L);
|
register_inotify(L);
|
||||||
lua_settable(L, -3);
|
lua_setfield(L, -2, "inotify");
|
||||||
#endif
|
|
||||||
lua_pop(L, 1);
|
lua_pop(L, 1);
|
||||||
|
#endif
|
||||||
|
|
||||||
if (lua_gettop(L)) {
|
if (lua_gettop(L)) {
|
||||||
logstring("Error", "internal, stack not empty in lsyncd_register()");
|
logstring("Error", "internal, stack not empty in lsyncd_register()");
|
||||||
exit(-1); // ERRNO
|
exit(-1); // ERRNO
|
||||||
|
Loading…
Reference in New Issue
Block a user