Skip to content

Commit 88ef6e0

Browse files
committed
Fix display of template classnames in generated R code
1 parent 7648542 commit 88ef6e0

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

Source/Modules/r.cxx

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1126,8 +1126,8 @@ int R::OutputMemberReferenceMethod(String *className, int isSet,
11261126
}
11271127
Printf(f->code, "}\n");
11281128

1129-
1130-
Printf(out, "# Start of accessor method for %s\n", className);
1129+
String *classname_str = SwigType_namestr(className);
1130+
Printf(out, "# Start of accessor method for %s\n", classname_str);
11311131
Printf(out, "setMethod('$%s', '_p%s', ",
11321132
isSet ? "<-" : "",
11331133
getRClassName(className));
@@ -1143,11 +1143,12 @@ int R::OutputMemberReferenceMethod(String *className, int isSet,
11431143
Printf(out, ");\n");
11441144
}
11451145

1146+
Printf(out, "# end of accessor method for %s\n", classname_str);
1147+
1148+
Delete(classname_str);
11461149
DelWrapper(attr);
11471150
DelWrapper(f);
11481151

1149-
Printf(out, "# end of accessor method for %s\n", className);
1150-
11511152
return SWIG_OK;
11521153
}
11531154

0 commit comments

Comments
 (0)