Skip to content

Commit 85f2378

Browse files
committed
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
2 parents ac3f668 + 6542d84 commit 85f2378

File tree

3 files changed

+8
-8
lines changed

3 files changed

+8
-8
lines changed

Examples/test-suite/r_memory_leak.i

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
SWIG_exception_fail(SWIG_RuntimeError, "Let's see how the bindings manage this exception!");
1818
}
1919
%typemap(scoerceout) Foo*
20-
%{ if (!is.null($result) && !is.logical($result)) {$result <- new("$R_class", ref=$result) ;} %}
20+
%{ if (!is.null($result) && !is.logical($result)) {$result <- new("$R_class", ref=$result) ;}; %}
2121

2222
%inline %{
2323
#include <string>

Lib/r/rtype.swg

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -94,20 +94,20 @@
9494
%{ $input = enumToInteger($input, "$R_class"); %}
9595

9696
%typemap(scoercein) SWIGTYPE, SWIGTYPE *, SWIGTYPE *const, SWIGTYPE &, SWIGTYPE &&
97-
%{ if (inherits($input, "ExternalReference")) $input = slot($input,"ref") %}
97+
%{ if (inherits($input, "ExternalReference")) $input = slot($input,"ref"); %}
9898

9999
/*
100100
%typemap(scoercein) SWIGTYPE *, SWIGTYPE *const
101-
%{ $input = coerceIfNotSubclass($input, "$R_class") %}
101+
%{ $input = coerceIfNotSubclass($input, "$R_class"); %}
102102

103103
%typemap(scoercein) SWIGTYPE &
104-
%{ $input = coerceIfNotSubclass($input, "$R_class") %}
104+
%{ $input = coerceIfNotSubclass($input, "$R_class"); %}
105105

106106
%typemap(scoercein) SWIGTYPE &&
107-
%{ $input = coerceIfNotSubclass($input, "$R_class") %}
107+
%{ $input = coerceIfNotSubclass($input, "$R_class"); %}
108108

109109
%typemap(scoercein) SWIGTYPE
110-
%{ $input = coerceIfNotSubclass($input, "$&R_class") %}
110+
%{ $input = coerceIfNotSubclass($input, "$&R_class"); %}
111111
*/
112112

113113
%typemap(scoercein) SWIGTYPE[ANY]

Source/Modules/r.cxx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1898,7 +1898,7 @@ int R::functionWrapper(Node *n) {
18981898
name, " = getNativeSymbolInfo(", name, ");",
18991899
"\n};\n",
19001900
"if(is(", name, ", \"NativeSymbolInfo\")) {\n",
1901-
name, " = ", name, "$address", ";\n}\n",
1901+
name, " = ", name, "$address", ";\n};\n",
19021902
"if(is(", name, ", \"ExternalReference\")) {\n",
19031903
name, " = ", name, "@ref;\n}\n",
19041904
"}; \n",
@@ -2120,7 +2120,7 @@ int R::functionWrapper(Node *n) {
21202120
{
21212121
String *finalizer = NewString(iname);
21222122
Replace(finalizer, "new_", "", DOH_REPLACE_FIRST);
2123-
Printf(sfun->code, "reg.finalizer(ans@ref, delete_%s)\n", finalizer);
2123+
Printf(sfun->code, "reg.finalizer(ans@ref, delete_%s);\n", finalizer);
21242124
}
21252125
Printf(sfun->code, "ans\n");
21262126
}

0 commit comments

Comments
 (0)