-
-
Notifications
You must be signed in to change notification settings - Fork 206
Open
Labels
upkeepmaintenance, infrastructure, and similarmaintenance, infrastructure, and similar
Description
CSan checks complain about our hack in IGRAPH_FINALLY() calling IGRAPH_FINALLY_REAL() with a cast function pointer: https://github.com/igraph/rigraph/actions/runs/12108577215/job/33756736066#step:6:10130 . My most recent submission got rejected from CRAN because of this.
Propose to only use IGRAPH_FINALLY_REAL() instead of IGRAPH_FINALLY() in the R interface, and create wrapper functions for each function called:
# Bad:
IGRAPH_FINALLY(igraph_vector_int_destroy, &news);
# Good:
IGRAPH_FINALLY_REAL(igraph_vector_int_destroy_pv, &news);
void igraph_vector_int_destroy_pv(void* v) {
igraph_vector_int_destroy((magic_cast*)v);
}(For some magic_cast we'd have to figure out. I can't quite parse igraph_vector.h . These days, I'd write a code generator and commit the generated code to version control, instead of this complex preprocessor logic because I find that easier to read.)
Metadata
Metadata
Assignees
Labels
upkeepmaintenance, infrastructure, and similarmaintenance, infrastructure, and similar