mirror of
https://github.com/weechat/weechat.git
synced 2026-06-25 12:26:40 +02:00
script plugins: use new macros to reduce code length
This commit is contained in:
@@ -380,7 +380,7 @@ weechat_lua_load_cb (void *data, const char *filename)
|
||||
void
|
||||
weechat_lua_unload (struct t_plugin_script *script)
|
||||
{
|
||||
int *r;
|
||||
int *rc;
|
||||
void *interpreter;
|
||||
|
||||
if ((weechat_lua_plugin->debug >= 1) || !lua_quiet)
|
||||
@@ -392,12 +392,12 @@ weechat_lua_unload (struct t_plugin_script *script)
|
||||
|
||||
if (script->shutdown_func && script->shutdown_func[0])
|
||||
{
|
||||
r = weechat_lua_exec (script,
|
||||
WEECHAT_SCRIPT_EXEC_INT,
|
||||
script->shutdown_func,
|
||||
NULL, NULL);
|
||||
if (r)
|
||||
free (r);
|
||||
rc = (int *)weechat_lua_exec (script,
|
||||
WEECHAT_SCRIPT_EXEC_INT,
|
||||
script->shutdown_func,
|
||||
NULL, NULL);
|
||||
if (rc)
|
||||
free (rc);
|
||||
}
|
||||
|
||||
interpreter = script->interpreter;
|
||||
|
||||
Reference in New Issue
Block a user