1
0
forked from GitHub/gf-core

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 fe1ce8389c
commit 6947d36e1a

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,