Skip to content

Separate top-level vs helper functions in rinterface_extra.c #2105

Description

@szhorvat

rinterface_extra.c contains two kinds of functions:

  • Top-level: Those that will eventually be called through .Call from R, and use IGRAPH_R_CHECK()
  • Helper: Those that are called by other functions, including top-level functions, and use IGRAPH_CHECK()

These are mixed together in the same file and are not annotated. I am not convinced that the use of IGRAPH_R_CHECK vs IGRAPH_CHECK is not incorrect somewhere. Even if this is not incorrect now, it is very easy to make a mistake since it's unclear which functions are top-level.

I suggest making a clean separation between these, either placing them in separate files, or separate sections of the same file.

It would be even better to use different naming schemes. One might think that all R_ functions are top-level, but it is not so.

This is the biggest step of #1056.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions