Commit 1482babe authored by Radford Neal's avatar Radford Neal

added macros such as MARK_NOT_MUTABLE and MAYBE_SHARED for R Core compatibility

parent 5d304ed6
......@@ -318,6 +318,10 @@
and \code{[[} on \code{x}, so it should work automatically on
any objects for which appropriate methods on those generics
are defined.
\item The C macros \code{MAYBE_SHARED}, \code{NO_REFERENCES},
\code{MAYBE_REFERENCED}, \code{NOT_SHARED}, and \code{MARK_MUTABLE}
have been added to \file{Rinternals.h}, for compatibility with
recent R Core versions.
}}
\subsection{BUG FIXES}{
......
Add defs for R Core macros like MAYBE_REFERENCED, for compatibiltiy.
......@@ -750,6 +750,15 @@ extern void helpers_wait_until_not_in_use(SEXP);
#endif
/* Macros for compatibility with later R Core versions. */
#define MAYBE_SHARED(x) NAMEDCNT_GT_1(x)
#define NO_REFERENCES(x) NAMEDCNT_EQ_0(x)
#define MAYBE_REFERENCED(x) NAMEDCNT_GT_0(x)
#define NOT_SHARED(x) (! NAMEDCNT_GT_1(x))
#define MARK_NOT_MUTABLE(x) SET_NAMEDCNT_MAX(x)
/* Decrement NAMEDCNT for object and for PRVALUE if object is a promise. */
#if 0 /* temporarily disabled, pending problem resolution */
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment