Merge branch 'r-script-fixes'

* r-script-fixes:
  Fix further missing semicolons in R code.
  fixed some missing semicolons. Each one caused a compile error in generated code
This commit is contained in:
William S Fulton 2020-06-02 10:19:54 +01:00
commit 85f2378b84
3 changed files with 8 additions and 8 deletions

View file

@ -17,7 +17,7 @@
SWIG_exception_fail(SWIG_RuntimeError, "Let's see how the bindings manage this exception!");
}
%typemap(scoerceout) Foo*
%{ if (!is.null($result) && !is.logical($result)) {$result <- new("$R_class", ref=$result) ;} %}
%{ if (!is.null($result) && !is.logical($result)) {$result <- new("$R_class", ref=$result) ;}; %}
%inline %{
#include <string>

View file

@ -94,20 +94,20 @@
%{ $input = enumToInteger($input, "$R_class"); %}
%typemap(scoercein) SWIGTYPE, SWIGTYPE *, SWIGTYPE *const, SWIGTYPE &, SWIGTYPE &&
%{ if (inherits($input, "ExternalReference")) $input = slot($input,"ref") %}
%{ if (inherits($input, "ExternalReference")) $input = slot($input,"ref"); %}
/*
%typemap(scoercein) SWIGTYPE *, SWIGTYPE *const
%{ $input = coerceIfNotSubclass($input, "$R_class") %}
%{ $input = coerceIfNotSubclass($input, "$R_class"); %}
%typemap(scoercein) SWIGTYPE &
%{ $input = coerceIfNotSubclass($input, "$R_class") %}
%{ $input = coerceIfNotSubclass($input, "$R_class"); %}
%typemap(scoercein) SWIGTYPE &&
%{ $input = coerceIfNotSubclass($input, "$R_class") %}
%{ $input = coerceIfNotSubclass($input, "$R_class"); %}
%typemap(scoercein) SWIGTYPE
%{ $input = coerceIfNotSubclass($input, "$&R_class") %}
%{ $input = coerceIfNotSubclass($input, "$&R_class"); %}
*/
%typemap(scoercein) SWIGTYPE[ANY]

View file

@ -1898,7 +1898,7 @@ int R::functionWrapper(Node *n) {
name, " = getNativeSymbolInfo(", name, ");",
"\n};\n",
"if(is(", name, ", \"NativeSymbolInfo\")) {\n",
name, " = ", name, "$address", ";\n}\n",
name, " = ", name, "$address", ";\n};\n",
"if(is(", name, ", \"ExternalReference\")) {\n",
name, " = ", name, "@ref;\n}\n",
"}; \n",
@ -2120,7 +2120,7 @@ int R::functionWrapper(Node *n) {
{
String *finalizer = NewString(iname);
Replace(finalizer, "new_", "", DOH_REPLACE_FIRST);
Printf(sfun->code, "reg.finalizer(ans@ref, delete_%s)\n", finalizer);
Printf(sfun->code, "reg.finalizer(ans@ref, delete_%s);\n", finalizer);
}
Printf(sfun->code, "ans\n");
}