mirror of
https://github.com/GrammaticalFramework/gf-core.git
synced 2026-04-23 11:42:49 -06:00
fix a crash in the python binding
This commit is contained in:
@@ -1206,9 +1206,6 @@ Concr_parse(ConcrObject* self, PyObject *args, PyObject *keywds)
|
|||||||
heuristics, pyres->pool, out_pool);
|
heuristics, pyres->pool, out_pool);
|
||||||
|
|
||||||
if (pyres->res == NULL) {
|
if (pyres->res == NULL) {
|
||||||
Py_DECREF(pyres);
|
|
||||||
pyres = NULL;
|
|
||||||
|
|
||||||
PgfToken tok =
|
PgfToken tok =
|
||||||
pgf_lexer_current_token(lexer);
|
pgf_lexer_current_token(lexer);
|
||||||
|
|
||||||
@@ -1221,6 +1218,9 @@ Concr_parse(ConcrObject* self, PyObject *args, PyObject *keywds)
|
|||||||
PyString_AsString(py_tok));
|
PyString_AsString(py_tok));
|
||||||
Py_DECREF(py_tok);
|
Py_DECREF(py_tok);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Py_DECREF(pyres);
|
||||||
|
pyres = NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
Py_XDECREF(py_lexer);
|
Py_XDECREF(py_lexer);
|
||||||
|
|||||||
Reference in New Issue
Block a user