Skip to content

Commit 6c1de05

Browse files
author
ripley
committed
update for Rboolean -> bool
git-svn-id: https://svn.r-project.org/R/trunk@87910 00db46b3-68df-0310-9c12-caf00c1e9a41
1 parent 89facf7 commit 6c1de05

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

doc/manual/R-exts.texi

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16287,14 +16287,21 @@ C++ header @file{cfloat}, which provide constants such as
1628716287
@apivar TRUE
1628816288
@apivar FALSE
1628916289
@apihdr R_ext/Boolean.h
16290-
Further, the included header @file{R_ext/Boolean.h} has enumeration
16290+
The included header @file{R_ext/Boolean.h} has enumeration
1629116291
constants @code{TRUE} and @code{FALSE} of type @code{Rboolean} in
1629216292
order to provide a way of using ``logical'' variables in C consistently.
1629316293
This can conflict with other software: for example it conflicts with the
1629416294
headers in @I{IJG}'s @code{jpeg-9} (but not earlier versions).
1629516295
@code{Rboolean} cannot represent @code{NA} and hence cannot be used for
1629616296
elements of R logical vectors.
1629716297

16298+
Type @code{Rboolean} is being phased out: as from @R{}@tie{}4.5.0 the
16299+
header also makes available the type @code{bool} and values @code{true}
16300+
and @code{false}. These are reserved words in C23 and C++11 and
16301+
available @emph{via} header @file{stdbool.h} as from C99. (@code{bool}
16302+
is not a drop-in replacement for @code{Rboolean} as it is usually stored
16303+
in a byte and @code{Raoolean} in an @code{int}, hence 4 bytes.)
16304+
1629816305

1629916306
@node Optimization
1630016307
@section Optimization

0 commit comments

Comments
 (0)