File tree Expand file tree Collapse file tree 1 file changed +15
-3
lines changed Expand file tree Collapse file tree 1 file changed +15
-3
lines changed Original file line number Diff line number Diff line change @@ -2092,9 +2092,21 @@ int R::functionWrapper(Node *n) {
2092
2092
Node * parent = Getattr (n, " parentNode" );
2093
2093
String * smartname = Getattr (parent, " feature:smartptr" );
2094
2094
if (smartname) {
2095
- smartname = getRClassName (smartname, 1 , 1 );
2096
- Replaceall (tm, " $R_class" , smartname);
2097
- Delete (smartname);
2095
+ String * classtypeobj = NewString (Getattr (parent, " classtypeobj" )); // this is the correct name, e.g. ClassName(int)
2096
+ String * classtype = NewString (Getattr (parent, " classtype" )); // this is the "wrong" name e.g. ClassName<int>
2097
+
2098
+ // we replace inside smartname ClassName<int> with ClassName<int>
2099
+ String * smartname_fixed = NewString (smartname);
2100
+ Replaceall (classtype, " " , " " ); // classtype actually has spaces inside so we remove them
2101
+ Replaceall (smartname_fixed, classtype, classtypeobj);
2102
+
2103
+ String * smartname_fixed_rclass = getRClassName (smartname_fixed, 1 , 1 );
2104
+ Replaceall (tm, " $R_class" , smartname_fixed_rclass);
2105
+
2106
+ Delete (classtypeobj);
2107
+ Delete (classtype);
2108
+ Delete (smartname_fixed);
2109
+ Delete (smartname_fixed_rclass);
2098
2110
}
2099
2111
}
2100
2112
if (debugMode) {
You can’t perform that action at this time.
0 commit comments