constructors now returning smart pointers (if class declared as such)
This commit is contained in:
parent
d4989aa7fc
commit
e6a1a7dbd1
1 changed files with 9 additions and 0 deletions
|
|
@ -2137,6 +2137,15 @@ int R::functionWrapper(Node *n) {
|
|||
if ((tm = Swig_typemap_lookup("scoerceout", n, Swig_cresult_name(), sfun))) {
|
||||
Replaceall(tm,"$source","ans");
|
||||
Replaceall(tm,"$result","ans");
|
||||
if (constructor) {
|
||||
Node * parent = Getattr(n, "parentNode");
|
||||
String * smartname = Getattr(parent, "feature:smartptr");
|
||||
if (smartname) {
|
||||
smartname = getRClassName(smartname, 1, 1);
|
||||
Replaceall(tm, "$R_class", smartname);
|
||||
Delete(smartname);
|
||||
}
|
||||
}
|
||||
replaceRClass(tm, Getattr(n, "type"));
|
||||
Chop(tm);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue