From ee0c29ada131046ddedadd2bccaf09ec14cf09f2 Mon Sep 17 00:00:00 2001 From: Florent Le Coz Date: Thu, 20 Jun 2013 23:26:29 +0200 Subject: Use the correct arguments in PyArg_ParseTuple --- src/pooptmodule.c | 6 +++--- 1 file 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; -- cgit v1.2.3