Fix display of template classnames in generated R code

This commit is contained in:
William S Fulton 2020-01-30 08:34:07 +00:00
commit 88ef6e0931

View file

@ -1126,8 +1126,8 @@ int R::OutputMemberReferenceMethod(String *className, int isSet,
}
Printf(f->code, "}\n");
Printf(out, "# Start of accessor method for %s\n", className);
String *classname_str = SwigType_namestr(className);
Printf(out, "# Start of accessor method for %s\n", classname_str);
Printf(out, "setMethod('$%s', '_p%s', ",
isSet ? "<-" : "",
getRClassName(className));
@ -1143,11 +1143,12 @@ int R::OutputMemberReferenceMethod(String *className, int isSet,
Printf(out, ");\n");
}
Printf(out, "# end of accessor method for %s\n", classname_str);
Delete(classname_str);
DelWrapper(attr);
DelWrapper(f);
Printf(out, "# end of accessor method for %s\n", className);
return SWIG_OK;
}