diff options
Diffstat (limited to 'src/plugins/scripts/python')
-rw-r--r-- | src/plugins/scripts/python/Makefile.am | 2 | ||||
-rw-r--r-- | src/plugins/scripts/python/weechat-python.c | 34 |
2 files changed, 19 insertions, 17 deletions
diff --git a/src/plugins/scripts/python/Makefile.am b/src/plugins/scripts/python/Makefile.am index a7e1dcc1a..9e8b96ba9 100644 --- a/src/plugins/scripts/python/Makefile.am +++ b/src/plugins/scripts/python/Makefile.am @@ -14,7 +14,7 @@ # along with this program. If not, see <http://www.gnu.org/licenses/>. # -INCLUDES = -DLOCALEDIR=\"$(datadir)/locale\" $(PYTHON_CFLAGS) +INCLUDES = -DLOCALEDIR=\"$(datadir)/locale\" $(PYTHON_CFLAGS) libdir = ${weechat_libdir}/plugins diff --git a/src/plugins/scripts/python/weechat-python.c b/src/plugins/scripts/python/weechat-python.c index a2dc8312a..e406de6b7 100644 --- a/src/plugins/scripts/python/weechat-python.c +++ b/src/plugins/scripts/python/weechat-python.c @@ -44,18 +44,20 @@ struct t_plugin_script *python_current_script = NULL; const char *python_current_script_filename = NULL; PyThreadState *python_mainThreadState = NULL; -/* string used to execute action "install": - when signal "python_install_script" is received, name of string - is added to this string, to be installed later by a timer (when nothing is - running in script) -*/ +/* + * string used to execute action "install": + * when signal "python_install_script" is received, name of string + * is added to this string, to be installed later by a timer (when nothing is + * running in script) + */ char *python_action_install_list = NULL; -/* string used to execute action "remove": - when signal "python_remove_script" is received, name of string - is added to this string, to be removed later by a timer (when nothing is - running in script) -*/ +/* + * string used to execute action "remove": + * when signal "python_remove_script" is received, name of string + * is added to this string, to be removed later by a timer (when nothing is + * running in script) + */ char *python_action_remove_list = NULL; char python_buffer_output[128]; @@ -179,10 +181,10 @@ weechat_python_exec (struct t_plugin_script *script, ret_value = NULL; - /* - ugly hack : rc = NULL while 'return weechat.WEECHAT_RC_OK .... - because of '#define WEECHAT_RC_OK 0' - */ + /* + * ugly hack : rc = NULL while 'return weechat.WEECHAT_RC_OK .... + * because of '#define WEECHAT_RC_OK 0' + */ if (rc == NULL) rc = PyInt_FromLong (0); @@ -259,7 +261,7 @@ weechat_python_output (PyObject *self, PyObject *args) python_buffer_output[0] = '\0'; } } - else + else { m = msg; while ((p = strchr (m, '\n')) != NULL) @@ -367,7 +369,7 @@ weechat_python_load (const char *filename) return 0; } - /* adding $weechat_dir/python in $PYTHONPATH */ + /* adding $weechat_dir/python in $PYTHONPATH */ python_path = PySys_GetObject ("path"); weechat_home = weechat_info_get ("weechat_dir", ""); if (weechat_home) |