Skip to content
Snippets Groups Projects
Commit 0c60fa7d authored by Lukas Stadler's avatar Lukas Stadler
Browse files

fill lists allocated from native code with “NULL” values

parent d05a54a9
Branches
No related tags found
No related merge requests found
......@@ -387,7 +387,12 @@ public abstract class JavaUpCallsRFFIImpl implements UpCallsRFFI {
case RAWSXP:
return RDataFactory.createRawVector(new byte[n]);
case VECSXP:
return RDataFactory.createList(n);
// fill list with "NULL" values
RList list = RDataFactory.createList(n);
for (int i = 0; i < n; i++) {
list.setElement(i, RNull.instance);
}
return list;
case LANGSXP:
return RDataFactory.createLangPairList(n);
default:
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment