summaryrefslogtreecommitdiff
path: root/plugins/pychrysalide/glibext/linegen.c
diff options
context:
space:
mode:
authorCyrille Bagard <nocbos@gmail.com>2019-07-21 20:21:59 (GMT)
committerCyrille Bagard <nocbos@gmail.com>2019-07-21 20:21:59 (GMT)
commit6a8385724c74b07cf9ed4cb9052f1af1816e3ea5 (patch)
treea7bea8a4bb9c816da77cf5c3dd44fbd8fb89b3a7 /plugins/pychrysalide/glibext/linegen.c
parentf0682e7b195acbd4d83148f3829479d682f9ee9f (diff)
Created more converters for Python arguments.
Diffstat (limited to 'plugins/pychrysalide/glibext/linegen.c')
-rw-r--r--plugins/pychrysalide/glibext/linegen.c14
1 files changed, 4 insertions, 10 deletions
diff --git a/plugins/pychrysalide/glibext/linegen.c b/plugins/pychrysalide/glibext/linegen.c
index c9ad013..d0e6f23 100644
--- a/plugins/pychrysalide/glibext/linegen.c
+++ b/plugins/pychrysalide/glibext/linegen.c
@@ -215,24 +215,18 @@ static PyObject *py_line_generator_get_flags(PyObject *self, PyObject *args)
static PyObject *py_line_generator_print(PyObject *self, PyObject *args)
{
GLineGenerator *generator; /* Version native */
- PyObject *py_line; /* Ligne version Python */
+ GBufferLine *line; /* Ligne de rendu à compléter */
size_t index; /* Indice dans le tampon */
size_t repeat; /* Utilisations successives */
- PyObject *py_content; /* Contenu version Python */
- int ret; /* Bilan de lecture des args. */
- GBufferLine *line; /* Ligne de rendu à compléter */
GBinContent *content; /* Contenu binaire associé */
+ int ret; /* Bilan de lecture des args. */
generator = G_LINE_GENERATOR(pygobject_get(self));
- ret = PyArg_ParseTuple(args, "O!kkO!", get_python_buffer_line_type(), &py_line, &index,
- &repeat, get_python_binary_content_type(), &py_content);
+ ret = PyArg_ParseTuple(args, "O&kkO&", convert_to_buffer_line, &line, &index,
+ &repeat, convert_to_binary_content, &content);
if (!ret) return NULL;
- line = G_BUFFER_LINE(pygobject_get(py_line));
-
- content = G_BIN_CONTENT(pygobject_get(py_content));
-
g_line_generator_print(generator, line, index, repeat, content);
Py_RETURN_NONE;