Skip to content

Commit

Permalink
Replace usage of private igraph_i_attribute_gettype
Browse files Browse the repository at this point in the history
This fixes the build for igraph 0.9.0+, in which
`igraph_i_attribute_gettype` has been removed:
igraph/igraph@463cc7c
  • Loading branch information
sporksmith committed Dec 8, 2021
1 parent f9252f3 commit 03ab465
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions src/tgen-markovmodel.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand All @@ -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);
Expand Down Expand Up @@ -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);
Expand Down

0 comments on commit 03ab465

Please sign in to comment.