summaryrefslogtreecommitdiff
path: root/plugins/yaml/python/line.c
diff options
context:
space:
mode:
authorCyrille Bagard <nocbos@gmail.com>2023-02-04 16:36:10 (GMT)
committerCyrille Bagard <nocbos@gmail.com>2023-02-04 16:36:10 (GMT)
commite85f35454bf94b7414dd9d2f5e6609601951293c (patch)
treef8cf3afe5b2ed34949878552b663d4b037e16238 /plugins/yaml/python/line.c
parentdb3b204dd7a71b2f74a4e69b2159a96e3ab66614 (diff)
Provide constructor to load Yaml contents without external files.
Diffstat (limited to 'plugins/yaml/python/line.c')
-rw-r--r--plugins/yaml/python/line.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/plugins/yaml/python/line.c b/plugins/yaml/python/line.c
index 11898d2..f098273 100644
--- a/plugins/yaml/python/line.c
+++ b/plugins/yaml/python/line.c
@@ -26,6 +26,7 @@
#include <pygobject.h>
+#include <string.h>
#include <plugins/pychrysalide/helpers.h>
@@ -92,7 +93,7 @@ static PyObject *py_yaml_line_new(PyTypeObject *type, PyObject *args, PyObject *
ret = PyArg_ParseTuple(args, "sn", &raw, &index);
if (!ret) return NULL;
- line = g_yaml_line_new(raw, index);
+ line = g_yaml_line_new(raw, strlen(raw), index);
if (line == NULL)
{