Update the C bindings to build with the current PGF API

This commit is contained in:
kevin.kofler
2010-05-16 21:09:51 +00:00
parent 1371f630b6
commit b93c405c28
4 changed files with 94 additions and 95 deletions

View File

@@ -36,13 +36,21 @@ static inline void gf_exit(void)
hs_exit();
}
typedef HsStablePtr GF_Language;
typedef HsStablePtr GF_PGF;
typedef HsStablePtr GF_Type;
typedef HsStablePtr GF_CId;
typedef HsStablePtr GF_Language;
typedef HsStablePtr GF_Type;
typedef HsStablePtr GF_Tree;
typedef HsStablePtr GF_Expr;
static inline void gf_freeCIds(GF_CId *p)
{
GF_CId *q = p;
while (*q)
gf_freeCId(*(q++));
free(p);
}
static inline void gf_freeLanguages(GF_Language *p)
{
GF_Language *q = p;
@@ -51,14 +59,6 @@ static inline void gf_freeLanguages(GF_Language *p)
free(p);
}
static inline void gf_freeTypes(GF_Type *p)
{
GF_Type *q = p;
while (*q)
gf_freeType(*(q++));
free(p);
}
static inline void gf_freeTrees(GF_Tree *p)
{
GF_Type *q = p;