From 1ef20ea6deac8691c02f97eaf016f3b84dbf2d20 Mon Sep 17 00:00:00 2001 From: stepan <stepan.sindelar@oracle.com> Date: Mon, 29 Jan 2018 19:31:25 +0100 Subject: [PATCH] Add correct class attribute to RegisteredNativeSymbols --- .../src/com/oracle/truffle/r/runtime/ffi/DLL.java | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/com.oracle.truffle.r.runtime/src/com/oracle/truffle/r/runtime/ffi/DLL.java b/com.oracle.truffle.r.runtime/src/com/oracle/truffle/r/runtime/ffi/DLL.java index f65913a8cd..8bc97e9541 100644 --- a/com.oracle.truffle.r.runtime/src/com/oracle/truffle/r/runtime/ffi/DLL.java +++ b/com.oracle.truffle.r.runtime/src/com/oracle/truffle/r/runtime/ffi/DLL.java @@ -105,7 +105,8 @@ public class DLL { @Override public void beforeDispose(RContext contextArg) { - if (!isShareDLLKind(context.getKind())) { + // Note: the first entry should be RLib + if (!isShareDLLKind(context.getKind()) && list.size() > 1) { RootCallTarget closeCallTarget = DLCloseRootNode.create(contextArg); for (int i = 1; i < list.size(); i++) { DLLInfo dllInfo = list.get(i); @@ -341,7 +342,9 @@ public class DLL { data[3] = rnt.dotSymbol.numArgs; klass[0] = rnt.nst.name() + "Routine"; } - return RDataFactory.createList(data, n > 3 ? NAMES_4_VEC : NAMES_3_VEC); + RList result = RDataFactory.createList(data, n > 3 ? NAMES_4_VEC : NAMES_3_VEC); + result.setClassAttr(RDataFactory.createStringVector(klass, RDataFactory.COMPLETE_VECTOR)); + return result; } } -- GitLab