diff options
author | Florent Le Coz <louiz@louiz.org> | 2011-09-14 13:59:25 +0200 |
---|---|---|
committer | Florent Le Coz <louiz@louiz.org> | 2011-09-14 13:59:25 +0200 |
commit | c332732d139eef10d2fe463e0ba2ce4c4e986ce7 (patch) | |
tree | b94a7046ddd3d6ffb1762ac6f6b3dcf92bbd3885 /src | |
parent | b33a09f0f6439fa8e9f7a4dbc38bf6f17465f641 (diff) | |
download | poezio-c332732d139eef10d2fe463e0ba2ce4c4e986ce7.tar.gz poezio-c332732d139eef10d2fe463e0ba2ce4c4e986ce7.tar.bz2 poezio-c332732d139eef10d2fe463e0ba2ce4c4e986ce7.tar.xz poezio-c332732d139eef10d2fe463e0ba2ce4c4e986ce7.zip |
Clean a little bit the poopt module, and fix some comments
Diffstat (limited to 'src')
-rw-r--r-- | src/pooptmodule.c | 16 |
1 files changed, 2 insertions, 14 deletions
diff --git a/src/pooptmodule.c b/src/pooptmodule.c index b314d21d..b696fe4e 100644 --- a/src/pooptmodule.c +++ b/src/pooptmodule.c @@ -9,8 +9,7 @@ **/ /* This file is a python3 module for poezio, used to replace some time-critical -python functions that are too slow. If compiled, poezio will use this module, -otherwise it will just use the equivalent python functions. */ +python functions that are too slow. */ #define PY_SSIZE_T_CLEAN @@ -30,11 +29,10 @@ PyObject *ErrorObject; will return [(0, 6), (7, 10), (11, 17), (17, 22)], meaning that the lines are "vivent", "les", "frigid" and "aires" */ -PyDoc_STRVAR(poopt_cut_text_doc, "cut_text(width, text)\n\n\nReturn the list of strings, cut according to the given size."); +PyDoc_STRVAR(poopt_cut_text_doc, "cut_text(text, width)\n\n\nReturn a list of two-tuple, the first int is the starting position of the line and the second is its end."); static PyObject *poopt_cut_text(PyObject *self, PyObject *args) { - /* int length; */ unsigned char *buffer; int width; @@ -145,8 +143,6 @@ static PyTypeObject Str_Type = { 0, /*tp_is_gc*/ }; -/* ---------- */ - static PyObject * null_richcompare(PyObject *self, PyObject *other, int op) { @@ -269,11 +265,3 @@ PyInit_poopt(void) Py_XDECREF(m); return NULL; } - -/* /\* test function *\/ */ -/* int main(void) */ -/* { */ -/* char coucou[] = "vive le foutre, le beurre et le caca boudin"; */ - -/* cut_text(coucou, 8); */ -/* } */ |