Skip to content

Commit 25bb77a

Browse files
author
luke
committed
CHARACTER_DATA and CHARACTER_POINTER now return a consts pointer.
git-svn-id: https://svn.r-project.org/R/trunk@89002 00db46b3-68df-0310-9c12-caf00c1e9a41
1 parent 5a5a2a0 commit 25bb77a

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

src/include/Rdefines.h

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,8 @@ and its contents are no longer documented.
9393
#define LOGICAL_POINTER(x) LOGICAL(x)
9494
#define INTEGER_POINTER(x) INTEGER(x)
9595
#define NUMERIC_POINTER(x) REAL(x)
96-
#define CHARACTER_POINTER(x) STRING_PTR(x)
96+
/* Writable pointers to string data ar not safe eo use in packages. */
97+
#define CHARACTER_POINTER(x) STRING_PTR_RO(x)
9798
#define COMPLEX_POINTER(x) COMPLEX(x)
9899
/* Use of VECTOR_PTR will fail; This is probably unused. */
99100
#define LIST_POINTER(x) VECTOR_PTR(x)
@@ -111,7 +112,8 @@ and its contents are no longer documented.
111112
#define INTEGER_DATA(x) (INTEGER(x))
112113
#define DOUBLE_DATA(x) (REAL(x))
113114
#define NUMERIC_DATA(x) (REAL(x))
114-
#define CHARACTER_DATA(x) (STRING_PTR(x))
115+
/* Writable pointers to string data ar not safe eo use in packages. */
116+
#define CHARACTER_DATA(x) (STRING_PTR_RO(x))
115117
#define COMPLEX_DATA(x) (COMPLEX(x))
116118
/* Use of VECTOR_PTR will now always fail in packages.
117119
VECTOR_DATA seems unused, and RECURSIVE_DATA is used only in

0 commit comments

Comments
 (0)