Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: Update vendored sources to igraph/igraph@0f383457a13864b86a29eed4faf4efaade4c1254 #1299

Draft
wants to merge 12 commits into
base: main
Choose a base branch
from
12 changes: 6 additions & 6 deletions src/rinterface_extra.c
Original file line number Diff line number Diff line change
Expand Up @@ -2283,7 +2283,7 @@ void checkInterruptFn(void *dummy) {
R_CheckUserInterrupt();
}

igraph_error_t R_igraph_interrupt_handler(void *data) {
igraph_bool_t R_igraph_interrupt_handler() {
/* We need to call R_CheckUserInterrupt() regularly to enable interruptions.
* However, if an interruption is pending, R_CheckUserInterrupt() will
* longjmp back to the top level so we cannot clean up ourselves by calling
Expand All @@ -2299,9 +2299,9 @@ igraph_error_t R_igraph_interrupt_handler(void *data) {
*/
if (R_ToplevelExec(checkInterruptFn, NULL) == FALSE) {
IGRAPH_FINALLY_FREE();
return IGRAPH_INTERRUPTED;
return 1;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's a good idea to use true / false instead of 1 and 0. That way it's immediately clear that what's returned is a boolean, not an integer. The same goes for NULL vs 0.

}
return IGRAPH_SUCCESS;
return 0;
}

igraph_error_t R_igraph_progress_handler(const char *message, double percent,
Expand Down Expand Up @@ -3325,7 +3325,7 @@ void R_igraph_SEXP_to_matrixlist(SEXP matrixlist, igraph_matrix_list_t *list) {

igraph_error_t R_igraph_SEXP_to_strvector(SEXP rval, igraph_strvector_t *sv) {
igraph_integer_t length = Rf_xlength(rval);
sv->stor_begin=(char**) R_alloc((size_t) length, sizeof(char*));
sv->stor_begin=(const char**) R_alloc((size_t) length, sizeof(char*));
sv->stor_end=sv->stor_begin+length;
sv->end=sv->stor_end;
for (igraph_integer_t i=0; i<igraph_strvector_size(sv); i++) {
Expand Down Expand Up @@ -6690,8 +6690,8 @@ SEXP R_igraph_spinglass_my_community(SEXP graph, SEXP weights,
igraph_vector_int_t community;
igraph_real_t cohesion;
igraph_real_t adhesion;
igraph_integer_t inner_links;
igraph_integer_t outer_links;
igraph_real_t inner_links;
igraph_real_t outer_links;

SEXP result, names;

Expand Down
Loading