mirror of https://github.com/octoleo/lsyncd.git
Use LSYNCD_*LIBNAME to refer to lsyncd/.inotify tables
This should prevent typos and resulting issues
This commit is contained in:
parent
68982e6e5b
commit
dea7e87b40
|
@ -351,7 +351,7 @@ inotify_ready(lua_State *L, struct observance *obs)
|
|||
extern void
|
||||
register_inotify(lua_State *L)
|
||||
{
|
||||
luaL_register(L, "inotify", linotfylib);
|
||||
luaL_register(L, LSYNCD_INOTIFYLIBNAME, linotfylib);
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
8
lsyncd.c
8
lsyncd.c
|
@ -1368,8 +1368,8 @@ l_jiffies_le(lua_State *L)
|
|||
void
|
||||
register_lsyncd(lua_State *L)
|
||||
{
|
||||
luaL_register(L, "lsyncd", lsyncdlib);
|
||||
lua_setglobal(L, "lsyncd");
|
||||
luaL_register(L, LSYNCD_LIBNAME, lsyncdlib);
|
||||
lua_setglobal(L, LSYNCD_LIBNAME);
|
||||
|
||||
// creates the metatable for jiffies userdata
|
||||
luaL_newmetatable(L, "Lsyncd.jiffies");
|
||||
|
@ -1393,9 +1393,9 @@ register_lsyncd(lua_State *L)
|
|||
lua_pop(L, 1); // pop(mt)
|
||||
|
||||
#ifdef LSYNCD_WITH_INOTIFY
|
||||
lua_getglobal(L, "lsyncd");
|
||||
lua_getglobal(L, LSYNCD_LIBNAME);
|
||||
register_inotify(L);
|
||||
lua_setfield(L, -2, "inotify");
|
||||
lua_setfield(L, -2, LSYNCD_INOTIFYLIBNAME);
|
||||
lua_pop(L, 1);
|
||||
#endif
|
||||
|
||||
|
|
Loading…
Reference in New Issue