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
|
extern void
|
||||||
register_inotify(lua_State *L)
|
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
|
void
|
||||||
register_lsyncd(lua_State *L)
|
register_lsyncd(lua_State *L)
|
||||||
{
|
{
|
||||||
luaL_register(L, "lsyncd", lsyncdlib);
|
luaL_register(L, LSYNCD_LIBNAME, lsyncdlib);
|
||||||
lua_setglobal(L, "lsyncd");
|
lua_setglobal(L, LSYNCD_LIBNAME);
|
||||||
|
|
||||||
// creates the metatable for jiffies userdata
|
// creates the metatable for jiffies userdata
|
||||||
luaL_newmetatable(L, "Lsyncd.jiffies");
|
luaL_newmetatable(L, "Lsyncd.jiffies");
|
||||||
|
@ -1393,9 +1393,9 @@ register_lsyncd(lua_State *L)
|
||||||
lua_pop(L, 1); // pop(mt)
|
lua_pop(L, 1); // pop(mt)
|
||||||
|
|
||||||
#ifdef LSYNCD_WITH_INOTIFY
|
#ifdef LSYNCD_WITH_INOTIFY
|
||||||
lua_getglobal(L, "lsyncd");
|
lua_getglobal(L, LSYNCD_LIBNAME);
|
||||||
register_inotify(L);
|
register_inotify(L);
|
||||||
lua_setfield(L, -2, "inotify");
|
lua_setfield(L, -2, LSYNCD_INOTIFYLIBNAME);
|
||||||
lua_pop(L, 1);
|
lua_pop(L, 1);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue