Skip to content

Commit b9494f5

Browse files
author
hornik
committed
Prefer Rf_ forms in documentation.
git-svn-id: https://svn.r-project.org/R/trunk@87896 00db46b3-68df-0310-9c12-caf00c1e9a41
1 parent f77ce8a commit b9494f5

File tree

1 file changed

+20
-20
lines changed

1 file changed

+20
-20
lines changed

doc/manual/R-exts.texi

Lines changed: 20 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -8935,7 +8935,7 @@ print.svycoxph <- function (x, ...)
89358935
It may not be obvious that the assignment to @code{x$call} will cause
89368936
the entire object @code{x} to be copied. This copying to preserve the
89378937
call-by-value illusion is usually done by the internal C function
8938-
@code{duplicate}.
8938+
@code{Rf_duplicate}.
89398939

89408940
The main reason that memory-use profiling is difficult is garbage
89418941
collection. Memory is allocated at well-defined times in an @R{}
@@ -8951,7 +8951,7 @@ The sampling profiler @code{Rprof} described in the previous section can
89518951
be given the option @code{memory.profiling=TRUE}. It then writes out the
89528952
total @R{} memory allocation in small vectors, large vectors, and cons
89538953
cells or nodes at each sampling interval. It also writes out the number
8954-
of calls to the internal function @code{duplicate}, which is called to
8954+
of calls to the internal function @code{Rf_duplicate}, which is called to
89558955
copy @R{} objects. @code{summaryRprof} provides summaries of this
89568956
information. The main reason that this can be misleading is that the
89578957
memory use is attributed to the function running at the end of the
@@ -8992,7 +8992,7 @@ are no vector allocations over 1000 bytes.
89928992
The third method of memory profiling involves tracing copies made of a
89938993
specific (presumably large) @R{} object. Calling @code{tracemem} on an
89948994
object marks it so that a message is printed to standard output when
8995-
the object is copied @emph{via} @code{duplicate} or coercion to another type,
8995+
the object is copied @emph{via} @code{Rf_duplicate} or coercion to another type,
89968996
or when a new object of the same size is created in arithmetic
89978997
operations. The main reason that this can be misleading is that
89988998
copying of subsets or components of an object is not tracked. It may
@@ -12701,7 +12701,7 @@ object, you can change the type by using
1270112701
@noindent
1270212702
Protection is needed as a new @emph{object} is created; the object
1270312703
formerly pointed to by the @code{SEXP} is still protected but now
12704-
unused.@footnote{If no coercion was required, @code{coerceVector} would
12704+
unused.@footnote{If no coercion was required, @code{Rf_coerceVector} would
1270512705
have passed the old object through unchanged.}
1270612706

1270712707
All the coercion functions do their own error-checking, and generate
@@ -12814,8 +12814,8 @@ functions get and set individual attributes. Their second argument is a
1281412814
want; these and many such symbols are defined in the header file
1281512815
@file{Rinternals.h}.
1281612816

12817-
There are shortcuts here too: the functions @code{namesgets},
12818-
@code{dimgets} and @code{dimnamesgets} are the internal versions of the
12817+
There are shortcuts here too: the functions @code{Rf_namesgets},
12818+
@code{Rf_dimgets} and @code{Rf_dimnamesgets} are the internal versions of the
1281912819
default methods of @code{names<-}, @code{dim<-} and @code{dimnames<-}
1282012820
(for vectors and arrays), and there are functions such as
1282112821
@code{Rf_GetColNames}, @code{Rf_GetRowNames}, @code{Rf_GetMatrixDimnames} and
@@ -12916,7 +12916,7 @@ We can use
1291612916
@noindent
1291712917
As the value is a character vector, we have to know how to create that
1291812918
from a C character array, which we do using the function
12919-
@code{mkChar}.
12919+
@code{Rf_mkChar}.
1292012920

1292112921
@node S4 objects
1292212922
@subsection S4 objects
@@ -13129,14 +13129,14 @@ void Rf_setVar(SEXP symbol, SEXP value, SEXP rho)
1312913129
@apifun Rf_setVar
1313013130

1313113131
@noindent
13132-
can be used to assign values to @R{} variables. @code{defineVar}
13132+
can be used to assign values to @R{} variables. @code{Rf_defineVar}
1313313133
creates a new binding or changes the value of an existing binding in the
1313413134
specified environment frame; it is the analogue of @code{assign(symbol,
1313513135
value, envir = rho, inherits = FALSE)}, but unlike @code{assign},
13136-
@code{defineVar} does not make a copy of the object
13136+
@code{Rf_defineVar} does not make a copy of the object
1313713137
@code{value}.@footnote{You can assign a @emph{copy} of the object in the
1313813138
environment frame @code{rho} using @code{defineVar(symbol,
13139-
duplicate(value), rho)}).} @code{setVar} searches for an existing
13139+
duplicate(value), rho)}).} @code{Rf_setVar} searches for an existing
1314013140
binding for @code{symbol} in @code{rho} or its enclosing environments.
1314113141
If a binding is found, its value is changed to @code{value}. Otherwise,
1314213142
a new binding with the specified value is created in the global
@@ -13493,7 +13493,7 @@ counting and there may currently be fewer bindings.
1349313493

1349413494
It is safe to modify the value of any @code{SEXP} for which
1349513495
@code{NAMED(foo)} is zero, and if @code{NAMED(foo)} is two or more, the
13496-
value should be duplicated (@emph{via} a call to @code{duplicate})
13496+
value should be duplicated (@emph{via} a call to @code{Rf_duplicate})
1349713497
before any modification. Note that it is the responsibility of the
1349813498
author of the code making the modification to do the duplication, even
1349913499
if it is @code{x} whose value is being modified after @code{y <- x}.
@@ -14722,7 +14722,7 @@ function is rarely needed and specifically is not needed with
1472214722
when needed, it is better to use it in preference of @code{Rf_getCharCE}, as it
1472314723
is safer against future changes in the semantics of encoding marks and
1472414724
covers strings internally represented in the native encoding. Note
14725-
that @code{charIsUTF8()} is not equivalent to @code{getCharCE() == CE_UTF8}.
14725+
that @code{Rf_charIsUTF8()} is not equivalent to @code{getCharCE() == CE_UTF8}.
1472614726

1472714727
Similarly, function
1472814728

@@ -17285,9 +17285,9 @@ functions that should be used instead:
1728517285
@code{R_ExternalPtrAddr}.
1728617286
@item OBJECT
1728717287
@itemx IS_S4_OBJECT
17288-
Use @code{isObject} and @code{isS4}.
17288+
Use @code{Rf_isObject} and @code{Rf_isS4}.
1728917289
@item GetOption
17290-
Use @code{GetOption1}.
17290+
Use @code{Rf_GetOption1}.
1729117291
@item R_lsInternal
1729217292
Use @code{R_lsInternal3}.
1729317293
@item REAL0
@@ -17300,7 +17300,7 @@ functions that should be used instead:
1730017300
writable pointers to these data can violate the memory manager's
1730117301
integrity assumptions and is not supported.
1730217302
@item isFrame
17303-
Use @code{isDataFrame}, added in @R{} 4.5.0.
17303+
Use @code{Rf_isDataFrame}, added in @R{} 4.5.0.
1730417304
@item BODY
1730517305
@itemx FORMALS
1730617306
@itemx CLOENV
@@ -17309,7 +17309,7 @@ functions that should be used instead:
1730917309
@item ENCLOS
1731017310
Use @code{R_ParentEnv}, added in @R{} 4.5.0.
1731117311
@item IS_ASCII
17312-
Use @code{charIsASCII}, added in @R{} 4.5.0.
17312+
Use @code{Rf_charIsASCII}, added in @R{} 4.5.0.
1731317313
@item IS_UTF8
1731417314
Use @code{charIsUTF8}, added in @R{} 4.5.0, or avoid completely.
1731517315
@item Rf_allocSExp
@@ -17321,12 +17321,12 @@ functions that should be used instead:
1732117321
Use @code{R_getVar} or @code{R_getVarEx}, added in @R{} 4.5.0.
1732217322
In some cases using @code{eval} may suffice.
1732317323
@item ATTRIB
17324-
Use @code{getAttrib} for individual attributes. To test whether
17324+
Use @code{Rf_getAttrib} for individual attributes. To test whether
1732517325
there are any attributes use @code{ANY_ATTRIB}, added in @R{}
1732617326
4.5.0.
1732717327
@item SET_ATTRIB
1732817328
@itemx SET_OBJECT
17329-
Use @code{setAttrib} for individual attributes,
17329+
Use @code{Rf_setAttrib} for individual attributes,
1733017330
@code{DUPLICATE_ATTRIB} or @code{SHALLOW_DUPLICATE_ATTRIB} for
1733117331
copying attributes from one object to another. Use
1733217332
@code{CLEAR_ATTRIB} for removing all attributes, added in @R{}
@@ -17419,7 +17419,7 @@ have been copying their definition and directly accessing the bits in
1741917419
memory. The structure of the object header is, however, internal to @R{} and
1742017420
may have to change in the future.
1742117421

17422-
@code{IS_ASCII} can be replaced by @code{charIsASCII}, added in @R{} 4.5.0.
17422+
@code{IS_ASCII} can be replaced by @code{Rf_charIsASCII}, added in @R{} 4.5.0.
1742317423
It can also be replaced by code that checks individual characters (bytes).
1742417424

1742517425
Information provided by the other macros is available via function
@@ -17462,7 +17462,7 @@ char *asutf8(SEXP c)
1746217462
@}
1746317463
@end example
1746417464
@noindent
17465-
as the encoding flags are already checked in @code{translateCharUTF8}. Also
17465+
as the encoding flags are already checked in @code{Rf_translateCharUTF8}. Also
1746617466
note the non-compliant check does not handle native encoding.
1746717467

1746817468
@node Working with attributes

0 commit comments

Comments
 (0)