Avoid `.Call()` in code other than `aaa-auto.R`
All calls into C code should be autogenerated. This ensures that we either mess up big time (and notice it), or get it right.
In practice, this means hunting down all instances of .Call in user code and using autogenerated bindings instead. Related: #1044.
https://github.com/igraph/rigraph/pull/1057#issuecomment-1872612836
One issue that will need to be solved (also for transitivity()) is what happened here: https://github.com/igraph/rigraph/pull/1028#issuecomment-1871607308 This problem went away for k_shortest_paths() after I figured out how to use the generated function directly (instead of calling it). But we'll need a solution when we call it. Do you have any suggestions @krlmlr ?
In short, suppose the function has a mode = c("out", "in", "all") parameter. Multiple values are allowed as a default, but not as a manually passed value. This poses an issue when passing the default mode to the _impl function.
We can call rlang::arg_match() in the manual wrapper in such cases, before forwarding to _impl().
Scratch that, we probably need igraph.match.arg() also in the manual wrapper.
It's a case-insensitive version of match.arg(), and rlang::arg_match() is a version of that with better behavior and error messages.
Now using the new switch_igraph_arg() for translating enums (=R strings) to integers.