summaryrefslogtreecommitdiff
path: root/plugins/pychrysalide/analysis/scan/core.c
diff options
context:
space:
mode:
Diffstat (limited to 'plugins/pychrysalide/analysis/scan/core.c')
-rw-r--r--plugins/pychrysalide/analysis/scan/core.c9
1 files changed, 6 insertions, 3 deletions
diff --git a/plugins/pychrysalide/analysis/scan/core.c b/plugins/pychrysalide/analysis/scan/core.c
index f609f7d..dcf5bf8 100644
--- a/plugins/pychrysalide/analysis/scan/core.c
+++ b/plugins/pychrysalide/analysis/scan/core.c
@@ -119,7 +119,8 @@ static PyObject *py_scan_register_token_modifier(PyObject *self, PyObject *args)
static PyObject *py_scan_find_token_modifiers_for_name(PyObject *self, PyObject *args)
{
PyObject *result; /* Bilan à retourner */
- const char *name; /* Nom d'appel à rechercher */
+ sized_string_t name; /* Nom d'appel à rechercher */
+ Py_ssize_t len; /* Taille de ce nom */
int ret; /* Bilan de lecture des args. */
GScanTokenModifier *modifier; /* Instance mise en place */
@@ -135,10 +136,12 @@ static PyObject *py_scan_find_token_modifiers_for_name(PyObject *self, PyObject
" if no instance was found for the provided name." \
)
- ret = PyArg_ParseTuple(args, "s", &name);
+ ret = PyArg_ParseTuple(args, "s#", &name.static_data, &len);
if (!ret) return NULL;
- modifier = find_scan_token_modifiers_for_name(name);
+ name.len = len;
+
+ modifier = find_scan_token_modifiers_for_name(&name);
if (modifier != NULL)
{