fix in the Python binding. The input sentence to the parser needs to be copied since otherwise the Python string may be discarded the garbage collector

This commit is contained in:
krasimir
2015-12-18 19:46:59 +00:00
parent 4619cb69ac
commit 14769484a5

View File

@@ -1429,6 +1429,9 @@ Concr_parse(ConcrObject* self, PyObject *args, PyObject *keywds)
pypgf_new_callbacks_map(self->concr, py_callbacks, pyres->pool);
if (callbacks == NULL)
return NULL;
sentence = gu_string_copy(sentence, pyres->pool);
pyres->res =
pgf_parse_with_heuristics(self->concr, catname, sentence,
heuristics, callbacks, parse_err,