summaryrefslogtreecommitdiff
path: root/src/plugins/scripts/python/weechat-python.c
diff options
context:
space:
mode:
authorSebastien Helleu <flashcode@flashtux.org>2008-11-15 22:35:12 +0100
committerSebastien Helleu <flashcode@flashtux.org>2008-11-15 22:35:12 +0100
commit8724fc18afa1d2702eeed9aa6e7d825d25cbda98 (patch)
tree735f8d09799db47ff387129bb8613e940bb4fbf7 /src/plugins/scripts/python/weechat-python.c
parente1d639d7ebbea6cf1c28e6d3cba284f5a3562dac (diff)
downloadweechat-8724fc18afa1d2702eeed9aa6e7d825d25cbda98.zip
Use of const for some functions returning "char *"
Diffstat (limited to 'src/plugins/scripts/python/weechat-python.c')
-rw-r--r--src/plugins/scripts/python/weechat-python.c11
1 files changed, 6 insertions, 5 deletions
diff --git a/src/plugins/scripts/python/weechat-python.c b/src/plugins/scripts/python/weechat-python.c
index ea0fe9bce..e43deffe4 100644
--- a/src/plugins/scripts/python/weechat-python.c
+++ b/src/plugins/scripts/python/weechat-python.c
@@ -263,7 +263,8 @@ weechat_python_load (const char *filename)
PyThreadState *python_current_interpreter;
PyObject *weechat_module, *weechat_outputs, *weechat_dict;
PyObject *python_path, *path;
- char *w_home, *p_home;
+ const char *weechat_home;
+ char *p_home;
int len;
if ((fp = fopen (filename, "r")) == NULL)
@@ -315,14 +316,14 @@ weechat_python_load (const char *filename)
/* adding $weechat_dir/python in $PYTHONPATH */
python_path = PySys_GetObject ("path");
- w_home = weechat_info_get ("weechat_dir", "");
- if (w_home)
+ weechat_home = weechat_info_get ("weechat_dir", "");
+ if (weechat_home)
{
- len = strlen (w_home) + 1 + strlen(PYTHON_PLUGIN_NAME) + 1;
+ len = strlen (weechat_home) + 1 + strlen(PYTHON_PLUGIN_NAME) + 1;
p_home = malloc (len);
if (p_home)
{
- snprintf (p_home, len, "%s/python", w_home);
+ snprintf (p_home, len, "%s/python", weechat_home);
path = PyString_FromString (p_home);
if (path != NULL)
{