Skip to content

Commit 97f29e0

Browse files
author
Pavel Marek
committed
Rewrite comment on VectorDataLibrary.materializeCharSXPStorage
(cherry picked from commit a4df82f)
1 parent b15502d commit 97f29e0

File tree

1 file changed

+10
-5
lines changed

1 file changed

+10
-5
lines changed

com.oracle.truffle.r.runtime/src/com/oracle/truffle/r/runtime/data/VectorDataLibrary.java

Lines changed: 10 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -147,12 +147,17 @@ public boolean isWriteable(Object data) {
147147
public abstract Object materialize(Object data);
148148

149149
/**
150-
* Similarly to {@link #materialize(Object)}, returns an instance of object that implements
151-
* {@link VectorDataLibrary}. Moreover, the receiver should transform into an object containing
152-
* {@link CharSXPWrapper} data, if possible.
153-
*
150+
* Returns vector data (an object implementing {@link VectorDataLibrary}) that implements
151+
* CHARSXP-specific messages, like {@link #getCharSXPAt(Object, int)} or
152+
* {@link #setCharSXPAt(Object, int, CharSXPWrapper)}. More specifically, the returned vector
153+
* data must not throw an exception when a CHARSXP element is set on it via, e.g.,
154+
* {@link #setCharSXPAt(Object, int, CharSXPWrapper)}.
155+
* <p>
154156
* Must be implemented when {@code getType() == Character}.
155-
*
157+
* <p>
158+
* This method is necessary when the character vector data is passed to the native side. There,
159+
* all the elements of a character vector are treated as CHARSXP elements.
160+
* <p>
156161
* If the result is the same as the {@code data}, it means that the receiver already has
157162
* materialized CharSXP storage.
158163
*

0 commit comments

Comments
 (0)