lua: Minor formating cleanup
This commit is contained in:
parent
0694cb9045
commit
d11b7f258c
1 changed files with 10 additions and 0 deletions
|
@ -336,8 +336,10 @@ static int api_print_closure(char *word[], void *udata)
|
||||||
lua_rawgeti(L, LUA_REGISTRYINDEX, info->ref);
|
lua_rawgeti(L, LUA_REGISTRYINDEX, info->ref);
|
||||||
|
|
||||||
for(j = 31; j >= 1; j--)
|
for(j = 31; j >= 1; j--)
|
||||||
|
{
|
||||||
if(*word[j])
|
if(*word[j])
|
||||||
break;
|
break;
|
||||||
|
}
|
||||||
lua_newtable(L);
|
lua_newtable(L);
|
||||||
for(i = 1; i <= j; i++)
|
for(i = 1; i <= j; i++)
|
||||||
{
|
{
|
||||||
|
@ -399,8 +401,10 @@ static int api_print_attrs_closure(char *word[], hexchat_event_attrs *attrs, voi
|
||||||
base = lua_gettop(L);
|
base = lua_gettop(L);
|
||||||
lua_rawgeti(L, LUA_REGISTRYINDEX, info->ref);
|
lua_rawgeti(L, LUA_REGISTRYINDEX, info->ref);
|
||||||
for(j = 31; j >= 1; j--)
|
for(j = 31; j >= 1; j--)
|
||||||
|
{
|
||||||
if(*word[j])
|
if(*word[j])
|
||||||
break;
|
break;
|
||||||
|
}
|
||||||
lua_newtable(L);
|
lua_newtable(L);
|
||||||
for(i = 1; i <= j; i++)
|
for(i = 1; i <= j; i++)
|
||||||
{
|
{
|
||||||
|
@ -1406,7 +1410,9 @@ static int reload_script(char const *filename)
|
||||||
return 0;
|
return 0;
|
||||||
|
|
||||||
if(script->status & STATUS_ACTIVE)
|
if(script->status & STATUS_ACTIVE)
|
||||||
|
{
|
||||||
script->status |= STATUS_DEFERRED_RELOAD;
|
script->status |= STATUS_DEFERRED_RELOAD;
|
||||||
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
char *filename = g_strdup(script->filename);
|
char *filename = g_strdup(script->filename);
|
||||||
|
@ -1427,8 +1433,10 @@ static void autoload_scripts(void)
|
||||||
{
|
{
|
||||||
char const *filename;
|
char const *filename;
|
||||||
while((filename = g_dir_read_name(dir)))
|
while((filename = g_dir_read_name(dir)))
|
||||||
|
{
|
||||||
if(is_lua_file(filename))
|
if(is_lua_file(filename))
|
||||||
load_script(filename);
|
load_script(filename);
|
||||||
|
}
|
||||||
g_dir_close(dir);
|
g_dir_close(dir);
|
||||||
}
|
}
|
||||||
g_free(path);
|
g_free(path);
|
||||||
|
@ -1617,7 +1625,9 @@ static int command_lua(char *word[], char *word_eol[], void *userdata)
|
||||||
{
|
{
|
||||||
if(interp)
|
if(interp)
|
||||||
if(interp->status & STATUS_ACTIVE)
|
if(interp->status & STATUS_ACTIVE)
|
||||||
|
{
|
||||||
interp->status |= STATUS_DEFERRED_RELOAD;
|
interp->status |= STATUS_DEFERRED_RELOAD;
|
||||||
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
run_unload_hooks(interp, NULL);
|
run_unload_hooks(interp, NULL);
|
||||||
|
|
Loading…
Add table
Reference in a new issue