diff options
author | Sebastien Helleu <flashcode@flashtux.org> | 2011-10-26 18:51:16 +0200 |
---|---|---|
committer | Sebastien Helleu <flashcode@flashtux.org> | 2011-10-26 18:51:16 +0200 |
commit | d95aef21346b04c1fc17d52b96d0dfaa0cf3d43c (patch) | |
tree | 9b1ede10258e6a196ad6b699415ca09c42d68670 /src/plugins/scripts/python/weechat-python.c | |
parent | b3ac47bcf1bd096c1b9484bd8dbe19e6eaf015aa (diff) | |
download | weechat-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.c | 12 |
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; |