summaryrefslogtreecommitdiff
path: root/src/runtime/c/pgf/parseval.c
diff options
context:
space:
mode:
authorkr.angelov <kr.angelov@gmail.com>2013-12-10 15:00:52 +0000
committerkr.angelov <kr.angelov@gmail.com>2013-12-10 15:00:52 +0000
commit0ece8f19abf4dba1d3c568aca60d2c960d75efa6 (patch)
tree88ad121f3ece72abd43491f1a95b1f70c992c991 /src/runtime/c/pgf/parseval.c
parent8121124d722b136b116dc27afaaae174233b6731 (diff)
loading and unloading of languages in the C runtime and in the Python bindings
Diffstat (limited to 'src/runtime/c/pgf/parseval.c')
-rw-r--r--src/runtime/c/pgf/parseval.c11
1 files changed, 9 insertions, 2 deletions
diff --git a/src/runtime/c/pgf/parseval.c b/src/runtime/c/pgf/parseval.c
index c96eac56a..0090a5942 100644
--- a/src/runtime/c/pgf/parseval.c
+++ b/src/runtime/c/pgf/parseval.c
@@ -171,8 +171,15 @@ pgf_parseval(PgfConcr* concr, PgfExpr expr, PgfCId cat,
{
GuPool* pool = gu_new_pool();
+ GuExn* err = gu_new_exn(NULL, gu_kind(type), pool);
+
GuEnum* en_lins1 =
- pgf_lzr_concretize(concr, expr, pool);
+ pgf_lzr_concretize(concr, expr, err, pool);
+ if (!gu_ok(err)) {
+ gu_pool_free(pool);
+ return false;
+ }
+
PgfCncTree ctree1 = gu_next(en_lins1, PgfCncTree, pool);
if (gu_variant_is_null(ctree1)) {
gu_pool_free(pool);
@@ -213,7 +220,7 @@ pgf_parseval(PgfConcr* concr, PgfExpr expr, PgfCId cat,
}
GuEnum* en_lins2 =
- pgf_lzr_concretize(concr, ep->expr, pool);
+ pgf_lzr_concretize(concr, ep->expr, err, pool);
PgfCncTree ctree2 = gu_next(en_lins2, PgfCncTree, pool);
if (gu_variant_is_null(ctree2)) {
gu_pool_free(pool);