summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorFlorent Le Coz <louiz@louiz.org>2013-06-20 23:26:29 +0200
committerFlorent Le Coz <louiz@louiz.org>2013-06-20 23:26:29 +0200
commitee0c29ada131046ddedadd2bccaf09ec14cf09f2 (patch)
tree834c406e4c4bac5e47996fe3eca2972d2119b0bc /src
parent7d555a62f2106faf5ad89bec54aeb41ca06cac7d (diff)
downloadpoezio-ee0c29ada131046ddedadd2bccaf09ec14cf09f2.tar.gz
poezio-ee0c29ada131046ddedadd2bccaf09ec14cf09f2.tar.bz2
poezio-ee0c29ada131046ddedadd2bccaf09ec14cf09f2.tar.xz
poezio-ee0c29ada131046ddedadd2bccaf09ec14cf09f2.zip
Use the correct arguments in PyArg_ParseTuple
Diffstat (limited to 'src')
-rw-r--r--src/pooptmodule.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/pooptmodule.c b/src/pooptmodule.c
index 64c1870f..43e4ff7c 100644
--- a/src/pooptmodule.c
+++ b/src/pooptmodule.c
@@ -42,7 +42,7 @@ static PyObject* poopt_cut_text(PyObject* self, PyObject* args)
const char* buffer;
const int buffer_len;
- if (PyArg_ParseTuple(args, "Is#", &width, &buffer, &buffer_len) == 0)
+ if (PyArg_ParseTuple(args, "ks#", &width, &buffer, &buffer_len) == 0)
return NULL;
/* Pointer to the end of the string */
@@ -221,9 +221,9 @@ PyDoc_STRVAR(poopt_cut_by_columns_doc, "cut_by_columns(n, string)\n\n\nreturns a
static PyObject* poopt_cut_by_columns(PyObject* self, PyObject* args)
{
const char* start;
- const size_t len;
+ const int len;
const size_t limit;
- if (PyArg_ParseTuple(args, "Is#", &limit, &start, &len) == 0)
+ if (PyArg_ParseTuple(args, "ks#", &limit, &start, &len) == 0)
return NULL;
const char* const end = start + len;