Skip to content

Commit aec70cc

Browse files
author
ripley
committed
revert the Rboolean changes pending further testing
git-svn-id: https://svn.r-project.org/R/trunk@87679 00db46b3-68df-0310-9c12-caf00c1e9a41
1 parent 0a76818 commit aec70cc

File tree

2 files changed

+8
-36
lines changed

2 files changed

+8
-36
lines changed

doc/NEWS.Rd

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -306,6 +306,8 @@
306306

307307
The macro \code{_R_RBOOLEAN_IS_BOOL_} is defined where
308308
\code{Rboolean} is implemented \emph{via} \code{bool}.
309+
310+
[Deferred pending further testing.]
309311
}
310312
}
311313

src/include/R_ext/Boolean.h

Lines changed: 6 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
/*
22
* R : A Computer Language for Statistical Data Analysis
3-
* Copyright (C) 2000, 2025 The R Core Team.
3+
* Copyright (C) 2000, 2001 The R Core Team.
44
*
55
* This header file is free software; you can redistribute it and/or modify
66
* it under the terms of the GNU Lesser General Public License as published by
@@ -21,51 +21,21 @@
2121
* https://www.R-project.org/Licenses/
2222
*/
2323

24-
/* Included by R.h: Part of the API. */
24+
/* Included by R.h: API */
2525

2626
#ifndef R_EXT_BOOLEAN_H_
2727
#define R_EXT_BOOLEAN_H_
2828

2929
#undef FALSE
3030
#undef TRUE
3131

32-
33-
3432
#ifdef __cplusplus
35-
3633
extern "C" {
37-
/* once cpp11 is sorted
38-
typedef bool Rboolean;
39-
#define FALSE false
40-
#define TRUE true
41-
*/
42-
typedef enum { FALSE = 0, TRUE } Rboolean;
43-
}
44-
45-
# else
46-
47-
// Also include standard C boolean type
48-
#if defined __STDC_VERSION__ && __STDC_VERSION__ > 201710L
49-
// C23 so these are keywords
50-
#else
51-
// stdbool.h is C99, so available everywhere
52-
//# include <stdbool.h>
5334
#endif
35+
typedef enum { FALSE = 0, TRUE /*, MAYBE */ } Rboolean;
5436

55-
/*
56-
__bool_true_false_are_defined is defined in stdbool.h, and C23, but
57-
it and stdbool.h are declared obsolescent in C23.
58-
*/
59-
#ifdef __bool_true_false_are_defined
60-
typedef bool Rboolean;
61-
# define FALSE false
62-
# define TRUE true
63-
# define _R_RBOOLEAN_IS_BOOL_ 1
64-
#else
65-
typedef enum { FALSE = 0, TRUE } Rboolean;
66-
#endif //__bool_true_false_are_defined
67-
68-
# endif // __cplusplus
69-
37+
#ifdef __cplusplus
38+
}
39+
#endif
7040

7141
#endif /* R_EXT_BOOLEAN_H_ */

0 commit comments

Comments
 (0)