summaryrefslogtreecommitdiff
path: root/src/plugins/scripts/python/weechat-python-api.c
diff options
context:
space:
mode:
authorSebastien Helleu <flashcode@flashtux.org>2009-03-18 18:02:48 +0100
committerSebastien Helleu <flashcode@flashtux.org>2009-03-18 18:02:48 +0100
commita394ed5d6fcb54970d5453de02ce228c35ddd9bb (patch)
tree1f898f7982bb8ca0479470ecd64246114efb5d76 /src/plugins/scripts/python/weechat-python-api.c
parent5f243ddd8690adeab4cc4511deb46319ca071234 (diff)
downloadweechat-a394ed5d6fcb54970d5453de02ce228c35ddd9bb.zip
Add "replacement" argument for string_remove_color in plugin API
Diffstat (limited to 'src/plugins/scripts/python/weechat-python-api.c')
-rw-r--r--src/plugins/scripts/python/weechat-python-api.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/plugins/scripts/python/weechat-python-api.c b/src/plugins/scripts/python/weechat-python-api.c
index 76f580ee3..4f0d3a8d5 100644
--- a/src/plugins/scripts/python/weechat-python-api.c
+++ b/src/plugins/scripts/python/weechat-python-api.c
@@ -324,7 +324,7 @@ weechat_python_api_ngettext (PyObject *self, PyObject *args)
static PyObject *
weechat_python_api_string_remove_color (PyObject *self, PyObject *args)
{
- char *string, *result;
+ char *string, *replacement, *result;
PyObject *object;
/* make C compiler happy */
@@ -337,14 +337,15 @@ weechat_python_api_string_remove_color (PyObject *self, PyObject *args)
}
string = NULL;
+ replacement = NULL;
- if (!PyArg_ParseTuple (args, "s", &string))
+ if (!PyArg_ParseTuple (args, "ss", &string, &replacement))
{
WEECHAT_SCRIPT_MSG_WRONG_ARGUMENTS("string_remove_color");
PYTHON_RETURN_EMPTY;
}
- result = weechat_string_remove_color (string);
+ result = weechat_string_remove_color (string, replacement);
PYTHON_RETURN_STRING_FREE(result);
}