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);