From 573de3809ce08387c054a08879fbec26109a8469 Mon Sep 17 00:00:00 2001
From: Adam Welc <adam.welc@oracle.com>
Date: Mon, 27 Jun 2016 18:29:15 +0200
Subject: [PATCH] SET_TYPEOF problem fix.

---
 .../fficall/src/common/inlined_fastr.c                       | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/com.oracle.truffle.r.native/fficall/src/common/inlined_fastr.c b/com.oracle.truffle.r.native/fficall/src/common/inlined_fastr.c
index 0041d2830b..72b60fd49b 100644
--- a/com.oracle.truffle.r.native/fficall/src/common/inlined_fastr.c
+++ b/com.oracle.truffle.r.native/fficall/src/common/inlined_fastr.c
@@ -191,6 +191,8 @@ INLINE_FUN SEXP listAppend(SEXP s, SEXP t)
 }
 
 
+SEXP SET_TYPEOF_FASTR(SEXP x, int v);
+
 /* Language based list constructs.  These are identical to the list */
 /* constructs, but the results can be evaluated. */
 
@@ -199,8 +201,7 @@ INLINE_FUN SEXP listAppend(SEXP s, SEXP t)
 INLINE_FUN SEXP lcons(SEXP car, SEXP cdr)
 {
     SEXP e = cons(car, cdr);
-    e = SET_TYPEOF_FASTR(e, LANGSXP);
-    return e;
+    return SET_TYPEOF_FASTR(e, LANGSXP);
 }
 
 INLINE_FUN SEXP lang1(SEXP s)
-- 
GitLab