Skip to content

Please avoid direct use of NAMED and SET_NAMED macros

1 message · Luke Tierney

#
To allow for future changes in the way the need for duplication is
detected in R internal C code, package C code should avoid direct
use of NAMED,and SET_NAMED, or assumptions on the maximal value
of NAMED. Use the macros MAYBE_REFERENCED, MAYBE_SHARED, and
MARK_NOT_MUTABLE instead. These currently correspond to

MAYBE_REFERENCED(x):   NAMED(x) > 0
MAYBE_SHARED(x):       NAMED(x) > 1
MARK_NOT_MUTABLE(x):   SET_NAMED(c, NAMEDMAX)

Best,

luke