summaryrefslogtreecommitdiff
path: root/src/runtime/c/pgf/pgf.c
diff options
context:
space:
mode:
authorkr.angelov <kr.angelov@gmail.com>2014-10-09 13:44:26 +0000
committerkr.angelov <kr.angelov@gmail.com>2014-10-09 13:44:26 +0000
commit86e9acc7a7b714307e08ab25117ca03cecb00936 (patch)
tree38dd7904147567c4e97e1f62eca64739d3a516eb /src/runtime/c/pgf/pgf.c
parent8e3ed825a8dde13894a44169ddc09cc2c2be60b2 (diff)
throw away the long obsolete runtime type information in the C runtime
Diffstat (limited to 'src/runtime/c/pgf/pgf.c')
-rw-r--r--src/runtime/c/pgf/pgf.c10
1 files changed, 4 insertions, 6 deletions
diff --git a/src/runtime/c/pgf/pgf.c b/src/runtime/c/pgf/pgf.c
index 875c65903..9fc4b9b6c 100644
--- a/src/runtime/c/pgf/pgf.c
+++ b/src/runtime/c/pgf/pgf.c
@@ -10,8 +10,6 @@
#include <stdio.h>
#include <math.h>
-GU_DEFINE_TYPE(PgfExn, abstract, _);
-
PgfPGF*
pgf_read(const char* fpath,
GuPool* pool, GuExn* err)
@@ -47,7 +45,7 @@ pgf_iter_languages(PgfPGF* pgf, GuMapItor* itor, GuExn* err)
size_t n_concrs = gu_seq_length(pgf->concretes);
for (size_t i = 0; i < n_concrs; i++) {
PgfConcr* concr = gu_seq_index(pgf->concretes, PgfConcr, i);
- itor->fn(itor, concr->name, concr, err);
+ itor->fn(itor, concr->name, &concr, err);
if (!gu_ok(err))
break;
}
@@ -71,7 +69,7 @@ pgf_iter_categories(PgfPGF* pgf, GuMapItor* itor, GuExn* err)
size_t n_cats = gu_seq_length(pgf->abstract.cats);
for (size_t i = 0; i < n_cats; i++) {
PgfAbsCat* cat = gu_seq_index(pgf->abstract.cats, PgfAbsCat, i);
- itor->fn(itor, cat->name, cat, err);
+ itor->fn(itor, cat->name, &cat, err);
if (!gu_ok(err))
break;
}
@@ -123,7 +121,7 @@ pgf_iter_functions(PgfPGF* pgf, GuMapItor* itor, GuExn* err)
size_t n_funs = gu_seq_length(pgf->abstract.funs);
for (size_t i = 0; i < n_funs; i++) {
PgfAbsFun* fun = gu_seq_index(pgf->abstract.funs, PgfAbsFun, i);
- itor->fn(itor, fun->name, fun, err);
+ itor->fn(itor, fun->name, &fun, err);
if (!gu_ok(err))
break;
}
@@ -138,7 +136,7 @@ pgf_iter_functions_by_cat(PgfPGF* pgf, PgfCId catname,
PgfAbsFun* fun = gu_seq_index(pgf->abstract.funs, PgfAbsFun, i);
if (strcmp(fun->type->cid, catname) == 0) {
- itor->fn(itor, fun->name, fun, err);
+ itor->fn(itor, fun->name, &fun, err);
if (!gu_ok(err))
break;
}