1
0
mirror of https://github.com/weechat/weechat.git synced 2026-06-26 04:46:37 +02:00

script plugins: use new macros to reduce code length

This commit is contained in:
Sebastien Helleu
2011-10-26 18:51:16 +02:00
parent b3ac47bcf1
commit d95aef2134
10 changed files with 4335 additions and 14387 deletions
File diff suppressed because it is too large Load Diff
+6 -6
View File
@@ -642,7 +642,7 @@ weechat_python_load_cb (void *data, const char *filename)
void
weechat_python_unload (struct t_plugin_script *script)
{
int *r;
int *rc;
void *interpreter;
PyThreadState *old_interpreter;
@@ -655,12 +655,12 @@ weechat_python_unload (struct t_plugin_script *script)
if (script->shutdown_func && script->shutdown_func[0])
{
r = (int *) weechat_python_exec (script, WEECHAT_SCRIPT_EXEC_INT,
script->shutdown_func, NULL, NULL);
if (r)
free (r);
rc = (int *) weechat_python_exec (script, WEECHAT_SCRIPT_EXEC_INT,
script->shutdown_func, NULL, NULL);
if (rc)
free (rc);
}
old_interpreter = PyThreadState_Swap (NULL);
interpreter = script->interpreter;