fix naming of RClass when template of a shared_ptr
This commit is contained in:
parent
38c2c15e61
commit
a71bb2bc6e
1 changed files with 15 additions and 3 deletions
|
|
@ -2092,9 +2092,21 @@ int R::functionWrapper(Node *n) {
|
||||||
Node * parent = Getattr(n, "parentNode");
|
Node * parent = Getattr(n, "parentNode");
|
||||||
String * smartname = Getattr(parent, "feature:smartptr");
|
String * smartname = Getattr(parent, "feature:smartptr");
|
||||||
if (smartname) {
|
if (smartname) {
|
||||||
smartname = getRClassName(smartname, 1, 1);
|
String * classtypeobj = NewString(Getattr(parent, "classtypeobj")); // this is the correct name, e.g. ClassName(int)
|
||||||
Replaceall(tm, "$R_class", smartname);
|
String * classtype = NewString(Getattr(parent, "classtype")); // this is the "wrong" name e.g. ClassName<int>
|
||||||
Delete(smartname);
|
|
||||||
|
// we replace inside smartname ClassName<int> with ClassName<int>
|
||||||
|
String * smartname_fixed = NewString(smartname);
|
||||||
|
Replaceall(classtype, " ", ""); // classtype actually has spaces inside so we remove them
|
||||||
|
Replaceall(smartname_fixed, classtype, classtypeobj);
|
||||||
|
|
||||||
|
String * smartname_fixed_rclass = getRClassName(smartname_fixed, 1, 1);
|
||||||
|
Replaceall(tm, "$R_class", smartname_fixed_rclass);
|
||||||
|
|
||||||
|
Delete(classtypeobj);
|
||||||
|
Delete(classtype);
|
||||||
|
Delete(smartname_fixed);
|
||||||
|
Delete(smartname_fixed_rclass);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (debugMode) {
|
if (debugMode) {
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue