From 5ea9bd92bdf67496a56dcc95cb07b1bfafdb887e Mon Sep 17 00:00:00 2001 From: Jim Newsome Date: Tue, 7 Dec 2021 19:04:41 -0600 Subject: [PATCH] Replace usage of private igraph_i_attribute_gettype This fixes the build for igraph 0.9.0+, in which `igraph_i_attribute_gettype` has been removed: https://github.com/igraph/igraph/commit/463cc7c1bbddce87f772672bcc2f528b42f0f034 --- src/tgen-markovmodel.c | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/src/tgen-markovmodel.c b/src/tgen-markovmodel.c index 4bc5cab..265ebb8 100644 --- a/src/tgen-markovmodel.c +++ b/src/tgen-markovmodel.c @@ -240,7 +240,8 @@ static gboolean _tgenmarkovmodel_findVertexAttributeString(TGenMarkovModel* mmod if(igraph_cattribute_has_attr(mmodel->graph, IGRAPH_ATTRIBUTE_VERTEX, name)) { igraph_attribute_type_t type = IGRAPH_ATTRIBUTE_DEFAULT; - igraph_i_attribute_gettype(mmodel->graph, &type, IGRAPH_ATTRIBUTE_VERTEX, name); + g_assert(igraph_cattribute_table.gettype); + igraph_cattribute_table.gettype(mmodel->graph, &type, IGRAPH_ATTRIBUTE_VERTEX, name); if(type == IGRAPH_ATTRIBUTE_STRING) { const gchar* value = igraph_cattribute_VAS(mmodel->graph, name, vertexIndex); @@ -266,7 +267,8 @@ static gboolean _tgenmarkovmodel_findEdgeAttributeDouble(TGenMarkovModel* mmodel if(igraph_cattribute_has_attr(mmodel->graph, IGRAPH_ATTRIBUTE_EDGE, name)) { igraph_attribute_type_t type = IGRAPH_ATTRIBUTE_DEFAULT; - igraph_i_attribute_gettype(mmodel->graph, &type, IGRAPH_ATTRIBUTE_EDGE, name); + g_assert(igraph_cattribute_table.gettype); + igraph_cattribute_table.gettype(mmodel->graph, &type, IGRAPH_ATTRIBUTE_EDGE, name); if(type == IGRAPH_ATTRIBUTE_NUMERIC) { gdouble value = (gdouble) igraph_cattribute_EAN(mmodel->graph, name, edgeIndex); @@ -297,7 +299,8 @@ static gboolean _tgenmarkovmodel_findEdgeAttributeString(TGenMarkovModel* mmodel if(igraph_cattribute_has_attr(mmodel->graph, IGRAPH_ATTRIBUTE_EDGE, name)) { igraph_attribute_type_t type = IGRAPH_ATTRIBUTE_DEFAULT; - igraph_i_attribute_gettype(mmodel->graph, &type, IGRAPH_ATTRIBUTE_EDGE, name); + g_assert(igraph_cattribute_table.gettype); + igraph_cattribute_table.gettype(mmodel->graph, &type, IGRAPH_ATTRIBUTE_EDGE, name); if(type == IGRAPH_ATTRIBUTE_STRING) { const gchar* value = igraph_cattribute_EAS(mmodel->graph, name, edgeIndex);