Skip to content

Commit d7f36f9

Browse files
committed
chore: Use Rf_ prefix in all function definitions for better IDE navigation
1 parent 6c65d04 commit d7f36f9

File tree

23 files changed

+120
-120
lines changed

23 files changed

+120
-120
lines changed

src/include/Defn.h

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2027,9 +2027,9 @@ int DispatchGroup(const char *, SEXP,SEXP,SEXP,SEXP,SEXP*);
20272027
R_xlen_t dispatch_xlength(SEXP, SEXP, SEXP);
20282028
R_len_t dispatch_length(SEXP, SEXP, SEXP);
20292029
SEXP dispatch_subset2(SEXP, R_xlen_t, SEXP, SEXP);
2030-
SEXP duplicated(SEXP, Rboolean);
2031-
R_xlen_t any_duplicated(SEXP, Rboolean);
2032-
R_xlen_t any_duplicated3(SEXP, SEXP, Rboolean);
2030+
SEXP Rf_duplicated(SEXP, Rboolean);
2031+
R_xlen_t Rf_any_duplicated(SEXP, Rboolean);
2032+
R_xlen_t Rf_any_duplicated3(SEXP, SEXP, Rboolean);
20332033
SEXP evalList(SEXP, SEXP, SEXP, int);
20342034
SEXP evalListKeepMissing(SEXP, SEXP);
20352035
int factorsConform(SEXP, SEXP);

src/main/array.c

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -62,15 +62,15 @@
6262
6363
They are used in bind.c and subset.c, and advertised in Rinternals.h
6464
*/
65-
SEXP GetRowNames(SEXP dimnames)
65+
SEXP Rf_GetRowNames(SEXP dimnames)
6666
{
6767
if (TYPEOF(dimnames) == VECSXP)
6868
return VECTOR_ELT(dimnames, 0);
6969
else
7070
return R_NilValue;
7171
}
7272

73-
SEXP GetColNames(SEXP dimnames)
73+
SEXP Rf_GetColNames(SEXP dimnames)
7474
{
7575
if (TYPEOF(dimnames) == VECSXP)
7676
return VECTOR_ELT(dimnames, 1);
@@ -228,7 +228,7 @@ attribute_hidden SEXP do_matrix(SEXP call, SEXP op, SEXP args, SEXP rho)
228228
}
229229

230230

231-
SEXP allocMatrix(SEXPTYPE mode, int nrow, int ncol)
231+
SEXP Rf_allocMatrix(SEXPTYPE mode, int nrow, int ncol)
232232
{
233233
SEXP s, t;
234234
R_xlen_t n;
@@ -259,7 +259,7 @@ SEXP allocMatrix(SEXPTYPE mode, int nrow, int ncol)
259259
*
260260
* @return A 3-dimensional array of the indicated dimensions and mode
261261
*/
262-
SEXP alloc3DArray(SEXPTYPE mode, int nrow, int ncol, int nface)
262+
SEXP Rf_alloc3DArray(SEXPTYPE mode, int nrow, int ncol, int nface)
263263
{
264264
SEXP s, t;
265265
R_xlen_t n;
@@ -282,7 +282,7 @@ SEXP alloc3DArray(SEXPTYPE mode, int nrow, int ncol, int nface)
282282
}
283283

284284

285-
SEXP allocArray(SEXPTYPE mode, SEXP dims)
285+
SEXP Rf_allocArray(SEXPTYPE mode, SEXP dims)
286286
{
287287
SEXP array;
288288
int i;
@@ -313,7 +313,7 @@ SEXP allocArray(SEXPTYPE mode, SEXP dims)
313313
/* attribute. Note that this function mutates x. */
314314
/* Duplication should occur before this is called. */
315315

316-
attribute_hidden SEXP DropDims(SEXP x)
316+
attribute_hidden SEXP Rf_DropDims(SEXP x)
317317
{
318318
PROTECT(x);
319319
SEXP dims = getAttrib(x, R_DimSymbol);

src/main/attrib.c

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -163,7 +163,7 @@ attribute_hidden SEXP getAttrib0(SEXP vec, SEXP name)
163163
return R_NilValue;
164164
}
165165

166-
SEXP getAttrib(SEXP vec, SEXP name)
166+
SEXP Rf_getAttrib(SEXP vec, SEXP name)
167167
{
168168
if(TYPEOF(vec) == CHARSXP)
169169
error("cannot have attributes on a CHARSXP");
@@ -227,7 +227,7 @@ SEXP do_copyDFattr(SEXP call, SEXP op, SEXP args, SEXP env)
227227

228228

229229
/* 'name' should be 1-element STRSXP or SYMSXP */
230-
SEXP setAttrib(SEXP vec, SEXP name, SEXP val)
230+
SEXP Rf_setAttrib(SEXP vec, SEXP name, SEXP val)
231231
{
232232
PROTECT(vec);
233233
PROTECT(name);
@@ -277,7 +277,7 @@ SEXP setAttrib(SEXP vec, SEXP name, SEXP val)
277277
/* the output. Note that the Dim and Names attributes */
278278
/* should have been assigned elsewhere. */
279279

280-
void copyMostAttrib(SEXP inp, SEXP ans)
280+
void Rf_copyMostAttrib(SEXP inp, SEXP ans)
281281
{
282282
SEXP s;
283283

@@ -512,7 +512,7 @@ attribute_hidden SEXP do_comment(SEXP call, SEXP op, SEXP args, SEXP env)
512512
/* *Not* called from class(.) <- v, nor oldClass(.) <- v, but
513513
* e.g. from attr(x, "class") <- value plus our own C, e.g. ./connections.c
514514
*/
515-
SEXP classgets(SEXP vec, SEXP klass)
515+
SEXP Rf_classgets(SEXP vec, SEXP klass)
516516
{
517517
if (isNull(klass) || isString(klass)) {
518518
int ncl = length(klass);
@@ -952,7 +952,7 @@ attribute_hidden SEXP do_namesgets(SEXP call, SEXP op, SEXP args, SEXP env)
952952
return CAR(args);
953953
}
954954

955-
SEXP namesgets(SEXP vec, SEXP val)
955+
SEXP Rf_namesgets(SEXP vec, SEXP val)
956956
{
957957
int i;
958958
SEXP s, rval, tval;
@@ -1083,7 +1083,7 @@ static SEXP as_char_simpl(SEXP val1)
10831083
}
10841084

10851085

1086-
SEXP dimnamesgets(SEXP vec, SEXP val)
1086+
SEXP Rf_dimnamesgets(SEXP vec, SEXP val)
10871087
{
10881088
PROTECT(vec);
10891089
PROTECT(val);
@@ -1213,7 +1213,7 @@ attribute_hidden SEXP do_dimgets(SEXP call, SEXP op, SEXP args, SEXP env)
12131213
}
12141214

12151215
// called from setAttrib(vec, R_DimSymbol, val) :
1216-
SEXP dimgets(SEXP vec, SEXP val)
1216+
SEXP Rf_dimgets(SEXP vec, SEXP val)
12171217
{
12181218
PROTECT(vec);
12191219
PROTECT(val);
@@ -1669,7 +1669,7 @@ attribute_hidden SEXP do_attrgets(SEXP call, SEXP op, SEXP args, SEXP env)
16691669
/* the dimnames for matrices and arrays in a standard form. */
16701670

16711671
/* NB: this may return R_alloc-ed rn and dn */
1672-
void GetMatrixDimnames(SEXP x, SEXP *rl, SEXP *cl,
1672+
void Rf_GetMatrixDimnames(SEXP x, SEXP *rl, SEXP *cl,
16731673
const char **rn, const char **cn)
16741674
{
16751675
SEXP dimnames = getAttrib(x, R_DimNamesSymbol);
@@ -1697,7 +1697,7 @@ void GetMatrixDimnames(SEXP x, SEXP *rl, SEXP *cl,
16971697
}
16981698

16991699

1700-
SEXP GetArrayDimnames(SEXP x)
1700+
SEXP Rf_GetArrayDimnames(SEXP x)
17011701
{
17021702
return getAttrib(x, R_DimNamesSymbol);
17031703
}
@@ -1760,7 +1760,7 @@ static SEXP set_data_part(SEXP obj, SEXP rhs) {
17601760
return(val);
17611761
}
17621762

1763-
attribute_hidden SEXP S3Class(SEXP obj)
1763+
attribute_hidden SEXP Rf_S3Class(SEXP obj)
17641764
{
17651765
if(!s_dot_S3Class) init_slot_handling();
17661766
return getAttrib(obj, s_dot_S3Class);

src/main/builtin.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -829,7 +829,7 @@ attribute_hidden SEXP do_makevector(SEXP call, SEXP op, SEXP args, SEXP rho)
829829
/* clever with memory here if we wanted to. */
830830

831831
/* used in connections.c, attrib.c, seq.c, .. */
832-
SEXP xlengthgets(SEXP x, R_xlen_t len)
832+
SEXP Rf_xlengthgets(SEXP x, R_xlen_t len)
833833
{
834834
R_xlen_t lenx, i;
835835
SEXP rval, names, xnames, t;
@@ -927,7 +927,7 @@ SEXP xlengthgets(SEXP x, R_xlen_t len)
927927
}
928928

929929
/* older version */
930-
SEXP lengthgets(SEXP x, R_len_t len)
930+
SEXP Rf_lengthgets(SEXP x, R_len_t len)
931931
{
932932
return xlengthgets(x, (R_xlen_t) len);
933933
}

src/main/character.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1792,7 +1792,7 @@ attribute_hidden SEXP do_strtoi(SEXP call, SEXP op, SEXP args, SEXP env)
17921792
/* creates a new STRSXP which is a suffix of string, starting
17931793
with given index; the result is returned unprotected */
17941794

1795-
attribute_hidden SEXP stringSuffix(SEXP string, int fromIndex) {
1795+
attribute_hidden SEXP Rf_stringSuffix(SEXP string, int fromIndex) {
17961796

17971797
int origLen = LENGTH(string);
17981798
int newLen = origLen - fromIndex;

src/main/coerce.c

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -368,7 +368,7 @@ static SEXP StringFromRaw(Rbyte x, int *warn)
368368

369369
/* Conversion between the two list types (LISTSXP and VECSXP). */
370370

371-
SEXP PairToVectorList(SEXP x)
371+
SEXP Rf_PairToVectorList(SEXP x)
372372
{
373373
SEXP xptr, xnew, xnames;
374374
int i, len = 0, named = 0;
@@ -399,7 +399,7 @@ SEXP PairToVectorList(SEXP x)
399399
return xnew;
400400
}
401401

402-
SEXP VectorToPairList(SEXP x)
402+
SEXP Rf_VectorToPairList(SEXP x)
403403
{
404404
SEXP xptr, xnew, xnames;
405405
int i, len, named;
@@ -1180,7 +1180,7 @@ static SEXP coerceSymbol(SEXP v, SEXPTYPE type)
11801180
return rval;
11811181
}
11821182

1183-
SEXP coerceVector(SEXP v, SEXPTYPE type)
1183+
SEXP Rf_coerceVector(SEXP v, SEXPTYPE type)
11841184
{
11851185
if (TYPEOF(v) == type)
11861186
return v;
@@ -1330,7 +1330,7 @@ SEXP coerceVector(SEXP v, SEXPTYPE type)
13301330
#undef COERCE_ERROR
13311331

13321332

1333-
attribute_hidden SEXP CreateTag(SEXP x)
1333+
attribute_hidden SEXP Rf_CreateTag(SEXP x)
13341334
{
13351335
if (isNull(x) || isSymbol(x))
13361336
return x;
@@ -1444,7 +1444,7 @@ attribute_hidden SEXP do_asCharacterFactor(SEXP call, SEXP op, SEXP args,
14441444
}
14451445

14461446
/* used in attrib.c, eval.c and unique.c */
1447-
SEXP asCharacterFactor(SEXP x)
1447+
SEXP Rf_asCharacterFactor(SEXP x)
14481448
{
14491449
SEXP ans;
14501450

@@ -1802,7 +1802,7 @@ attribute_hidden SEXP do_ascall(SEXP call, SEXP op, SEXP args, SEXP rho)
18021802

18031803

18041804
/* return int, not Rboolean, for NA_LOGICAL : */
1805-
attribute_hidden int asLogical2(SEXP x, int checking, SEXP call)
1805+
attribute_hidden int Rf_asLogical2(SEXP x, int checking, SEXP call)
18061806
{
18071807
int warn = 0;
18081808

@@ -1834,13 +1834,13 @@ attribute_hidden int asLogical2(SEXP x, int checking, SEXP call)
18341834
return NA_LOGICAL;
18351835
}
18361836

1837-
int asLogical(SEXP x)
1837+
int Rf_asLogical(SEXP x)
18381838
{
18391839
return asLogical2(x, /* checking = */ 0, R_NilValue);
18401840
}
18411841

18421842

1843-
int asInteger(SEXP x)
1843+
int Rf_asInteger(SEXP x)
18441844
{
18451845
int warn = 0, res;
18461846

@@ -1908,7 +1908,7 @@ R_xlen_t asXLength(SEXP x)
19081908
return (R_xlen_t) d;
19091909
}
19101910

1911-
double asReal(SEXP x)
1911+
double Rf_asReal(SEXP x)
19121912
{
19131913
int warn = 0;
19141914
double res;
@@ -1944,7 +1944,7 @@ double asReal(SEXP x)
19441944
return NA_REAL;
19451945
}
19461946

1947-
Rcomplex asComplex(SEXP x)
1947+
Rcomplex Rf_asComplex(SEXP x)
19481948
{
19491949
int warn = 0;
19501950
Rcomplex z;
@@ -2795,7 +2795,7 @@ attribute_hidden SEXP do_docall(SEXP call, SEXP op, SEXP args, SEXP rho)
27952795
Arguments to do_substitute should not be evaluated.
27962796
*/
27972797

2798-
SEXP substitute(SEXP lang, SEXP rho)
2798+
SEXP Rf_substitute(SEXP lang, SEXP rho)
27992799
{
28002800
SEXP t;
28012801
switch (TYPEOF(lang)) {

src/main/context.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -531,7 +531,7 @@ attribute_hidden SEXP R_sysfunction(int n, RCNTXT *cptr)
531531
/* browser contexts are a bit special because they are transient and for */
532532
/* any closure context with the debug bit set one will be created; so we */
533533
/* need to count those as well */
534-
attribute_hidden int countContexts(int ctxttype, int browser) {
534+
attribute_hidden int Rf_countContexts(int ctxttype, int browser) {
535535
int n=0;
536536
RCNTXT *cptr;
537537

src/main/duplicate.c

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -130,7 +130,7 @@ attribute_hidden void reset_duplicate_counter(void)
130130
}
131131
#endif
132132

133-
SEXP duplicate(SEXP s){
133+
SEXP Rf_duplicate(SEXP s){
134134
SEXP t;
135135

136136
#ifdef R_PROFILING
@@ -148,7 +148,7 @@ SEXP duplicate(SEXP s){
148148
return t;
149149
}
150150

151-
SEXP shallow_duplicate(SEXP s)
151+
SEXP Rf_shallow_duplicate(SEXP s)
152152
{
153153
SEXP t;
154154

@@ -167,7 +167,7 @@ SEXP shallow_duplicate(SEXP s)
167167
return t;
168168
}
169169

170-
SEXP lazy_duplicate(SEXP s) {
170+
SEXP Rf_lazy_duplicate(SEXP s) {
171171
switch (TYPEOF(s)) {
172172
case NILSXP:
173173
case SYMSXP:
@@ -371,7 +371,7 @@ static SEXP duplicate1(SEXP s, Rboolean deep)
371371
return t;
372372
}
373373

374-
void copyVector(SEXP s, SEXP t)
374+
void Rf_copyVector(SEXP s, SEXP t)
375375
{
376376
SEXPTYPE sT = TYPEOF(s), tT = TYPEOF(t);
377377
if (sT != tT)
@@ -405,7 +405,7 @@ void copyVector(SEXP s, SEXP t)
405405
}
406406
}
407407

408-
void copyListMatrix(SEXP s, SEXP t, Rboolean byrow)
408+
void Rf_copyListMatrix(SEXP s, SEXP t, Rboolean byrow)
409409
{
410410
int nr = nrows(s), nc = ncols(s);
411411
R_xlen_t ns = ((R_xlen_t) nr) * nc;
@@ -440,7 +440,7 @@ static R_INLINE SEXP VECTOR_ELT_LD(SEXP x, R_xlen_t i)
440440
return lazy_duplicate(VECTOR_ELT(x, i));
441441
}
442442

443-
void copyMatrix(SEXP s, SEXP t, Rboolean byrow)
443+
void Rf_copyMatrix(SEXP s, SEXP t, Rboolean byrow)
444444
{
445445
int nr = nrows(s), nc = ncols(s);
446446
R_xlen_t nt = XLENGTH(t);

0 commit comments

Comments
 (0)