summaryrefslogtreecommitdiff
path: root/src/plugins/scripts/python/weechat-python.c
diff options
context:
space:
mode:
authorSebastien Helleu <flashcode@flashtux.org>2011-10-26 18:51:16 +0200
committerSebastien Helleu <flashcode@flashtux.org>2011-10-26 18:51:16 +0200
commitd95aef21346b04c1fc17d52b96d0dfaa0cf3d43c (patch)
tree9b1ede10258e6a196ad6b699415ca09c42d68670 /src/plugins/scripts/python/weechat-python.c
parentb3ac47bcf1bd096c1b9484bd8dbe19e6eaf015aa (diff)
downloadweechat-d95aef21346b04c1fc17d52b96d0dfaa0cf3d43c.zip
script plugins: use new macros to reduce code length
Diffstat (limited to 'src/plugins/scripts/python/weechat-python.c')
-rw-r--r--src/plugins/scripts/python/weechat-python.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/plugins/scripts/python/weechat-python.c b/src/plugins/scripts/python/weechat-python.c
index 30866b60d..a6fe6f663 100644
--- a/src/plugins/scripts/python/weechat-python.c
+++ b/src/plugins/scripts/python/weechat-python.c
@@ -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;