From 39e3c3b9d774a483fbec8f0fcf6c136833a79bf8 Mon Sep 17 00:00:00 2001 From: William S Fulton Date: Mon, 18 Mar 2019 17:49:24 +0000 Subject: [PATCH] Fix R return by C++11 const ref enum classes --- Lib/r/r.swg | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Lib/r/r.swg b/Lib/r/r.swg index e6153892e..8cf8cdf53 100644 --- a/Lib/r/r.swg +++ b/Lib/r/r.swg @@ -196,7 +196,7 @@ unsigned char *OUTPUT %{ temp = ($*1_ltype)INTEGER($input)[0]; $1 = &temp; %} -%typemap(out) const enum SWIGTYPE & %{ $result = Rf_ScalarInteger(*$1); %} +%typemap(out) const enum SWIGTYPE & %{ $result = Rf_ScalarInteger((int)*$1); %} %typemap(memberin) char[] %{ if ($input) strcpy($1, $input);