chore: Rename R_ to Rx_ for all .Call() functions outside aaa-auto.R#2477
chore: Rename R_ to Rx_ for all .Call() functions outside aaa-auto.R#2477
R_ to Rx_ for all .Call() functions outside aaa-auto.R#2477Conversation
Co-authored-by: krlmlr <1741643+krlmlr@users.noreply.github.com>
Co-authored-by: krlmlr <1741643+krlmlr@users.noreply.github.com>
R_ to Rx_ for .Call() functions not in aaa-auto.R
|
@copilot: All instances of |
Co-authored-by: krlmlr <1741643+krlmlr@users.noreply.github.com>
R_ to Rx_ for .Call() functions not in aaa-auto.RR_ to Rx_ for all .Call() functions outside aaa-auto.R
|
@copilot: Resolve conflicts and check if the package builds. The |
…ons-prefix # Conflicts: # R/cliques.R # R/cocitation.R # R/cohesive.blocks.R # R/flow.R # R/foreign.R # R/glet.R # R/interface.R # R/make.R # R/minimum.spanning.tree.R # R/other.R # R/rewire.R # R/structural-properties.R # src/cpp11.cpp
Co-authored-by: krlmlr <1741643+krlmlr@users.noreply.github.com>
Resolved conflicts by merging with main. The main branch converted many functions to use |
krlmlr
left a comment
There was a problem hiding this comment.
@copilot: Often, the C function called is on the line following the standalone .Call( . I still see many instances of Call(R_... in regular non-generated source files. All these must be renamed to Rx_ (if the C function is defined in rinterface_extra.c) or wrapped (if defined in rinterface.c).
Co-authored-by: krlmlr <1741643+krlmlr@users.noreply.github.com>
Co-authored-by: krlmlr <1741643+krlmlr@users.noreply.github.com>
Fixed all multiline |
R_ to Rx_ for all .Call() functions outside aaa-auto.RR_ to Rx_ for all .Call() functions outside aaa-auto.R
All functions called via
.Call()outside ofaaa-auto.Rthat don't exist inaaa-auto.Rnow use theRx_prefix instead ofR_to distinguish manual from auto-generated functions.Changes Made
R Code Updates
.Call(R_...)patterns to useRx_prefix.Call()patterns where function name appears on the following lineC Implementation
Functions renamed in rinterface_extra.c (65+ functions):
Rx_igraph_layout_fruchterman_reingold,Rx_igraph_layout_kamada_kawai,Rx_igraph_layout_graphopt, etc.Rx_igraph_barabasi_game,Rx_igraph_degree_sequence_game,Rx_igraph_watts_strogatz_game, etc.Rx_igraph_spinglass_community,Rx_igraph_walktrap_community,Rx_igraph_community_fastgreedy, etc.Rx_igraph_read_graph_edgelist,Rx_igraph_write_graph_ncol,Rx_igraph_read_graph_lgl, etc.Rx_igraph_create,Rx_igraph_decompose,Rx_igraph_ring,Rx_igraph_star, etc.Rx_igraph_shortest_paths,Rx_igraph_get_shortest_paths,Rx_igraph_diameter, etc.Rx_igraph_mybracket3_set,Rx_igraph_random_sample,Rx_igraph_es_adj, etc.Functions wrapped from rinterface.c:
Rx_igraph_adjacencyRx_igraph_weighted_adjacencyRx_igraph_create_bipartiteRx_igraph_finalizerRx_igraph_vcountRx_igraph_layout_drlRx_igraph_layout_drl_3dInfrastructure Updates
src/rinterface.hwith extern declarations for wrapped functionssrc/cpp11.cppto register all renamed/wrappedRx_functionsRx_prefix for affected functionsTesting
aaa-auto.Rcorrectly retainR_prefix.Call()instances outsideaaa-auto.Rnow useRx_prefixThe changes ensure a clear distinction between auto-generated functions (using
R_prefix inaaa-auto.R) and manually maintained functions (usingRx_prefix elsewhere).Fixes #2476
Original prompt
R_toRx_for all instances of.Call()outside ofaaa-auto.R#2476💬 We'd love your input! Share your thoughts on Copilot coding agent in our 2 minute survey.