Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 3 additions & 9 deletions src/rinterface.c
Original file line number Diff line number Diff line change
Expand Up @@ -5323,7 +5323,7 @@ SEXP R_igraph_pagerank(SEXP graph, SEXP algo, SEXP vids, SEXP directed, SEXP dam
igraph_real_t c_damping;
igraph_vector_t c_weights;
igraph_arpack_options_t c_options1;
void* c_options;
void* c_options = NULL;
SEXP vector;
SEXP value;

Expand All @@ -5346,8 +5346,6 @@ SEXP R_igraph_pagerank(SEXP graph, SEXP algo, SEXP vids, SEXP directed, SEXP dam
if (c_algo == IGRAPH_PAGERANK_ALGO_ARPACK) {
Rz_SEXP_to_igraph_arpack_options(options, &c_options1);
c_options = &c_options1;
} else {
c_options = NULL;
}
}
/* Call igraph */
Expand Down Expand Up @@ -5396,7 +5394,7 @@ SEXP R_igraph_personalized_pagerank(SEXP graph, SEXP algo, SEXP vids, SEXP direc
igraph_vector_t c_personalized;
igraph_vector_t c_weights;
igraph_arpack_options_t c_options1;
void* c_options;
void* c_options = NULL;
SEXP vector;
SEXP value;

Expand All @@ -5422,8 +5420,6 @@ SEXP R_igraph_personalized_pagerank(SEXP graph, SEXP algo, SEXP vids, SEXP direc
if (c_algo == IGRAPH_PAGERANK_ALGO_ARPACK) {
Rz_SEXP_to_igraph_arpack_options(options, &c_options1);
c_options = &c_options1;
} else {
c_options = NULL;
}
}
/* Call igraph */
Expand Down Expand Up @@ -5472,7 +5468,7 @@ SEXP R_igraph_personalized_pagerank_vs(SEXP graph, SEXP algo, SEXP vids, SEXP di
igraph_vs_t c_reset_vids;
igraph_vector_t c_weights;
igraph_arpack_options_t c_options1;
void* c_options;
void* c_options = NULL;
SEXP vector;
SEXP value;

Expand All @@ -5497,8 +5493,6 @@ SEXP R_igraph_personalized_pagerank_vs(SEXP graph, SEXP algo, SEXP vids, SEXP di
if (c_algo == IGRAPH_PAGERANK_ALGO_ARPACK) {
Rz_SEXP_to_igraph_arpack_options(options, &c_options1);
c_options = &c_options1;
} else {
c_options = NULL;
}
}
/* Call igraph */
Expand Down
12 changes: 8 additions & 4 deletions tools/stimulus/types-RC.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -995,16 +995,20 @@ SIR_LIST:
IGRAPH_FINALLY_CLEAN(1);

PAGERANKOPT:
CTYPE: |-
CTYPE: void*
# The argument is optional,
# so the code generator wraps the input conversion into `if (!Rf_isNull(...))`.
# The pointer is passed on to igraph unconditionally,
# therefore it must be initialized here
# to stay well-defined on the path where the conversion is skipped.
CDECL: |-
igraph_arpack_options_t %C%1;
void*
void* %C% = NULL;
INCONV:
INOUT: |-
if (%C1% == IGRAPH_PAGERANK_ALGO_ARPACK) {
Rz_SEXP_to_igraph_arpack_options(%I%, &%C%1);
%C% = &%C%1;
} else {
%C% = NULL;
}
OUTCONV:
INOUT: |-
Expand Down
Loading