R - fix $typemap() for R specific typemaps
Add support for special variable replacement in the $typemap() special variable macro for R specific typemaps (rtype, rtypecheck, scoercein, scoereout).
This commit is contained in:
parent
1d73341aa4
commit
6370fab025
2 changed files with 16 additions and 1 deletions
|
|
@ -7,6 +7,11 @@ the issue number to the end of the URL: https://github.com/swig/swig/issues/
|
||||||
Version 4.1.0 (in progress)
|
Version 4.1.0 (in progress)
|
||||||
===========================
|
===========================
|
||||||
|
|
||||||
|
2022-10-24: wsfulton
|
||||||
|
[R] Add support for special variable replacement in the $typemap()
|
||||||
|
special variable macro for R specific typemaps (rtype, rtypecheck,
|
||||||
|
scoercein, scoereout).
|
||||||
|
|
||||||
2022-10-24: wsfulton
|
2022-10-24: wsfulton
|
||||||
[R] Polymorphism in the wrappers was only working for C++ classes,
|
[R] Polymorphism in the wrappers was only working for C++ classes,
|
||||||
now this works for C++ structs too.
|
now this works for C++ structs too.
|
||||||
|
|
|
||||||
|
|
@ -242,8 +242,8 @@ public:
|
||||||
return status;
|
return status;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Not used:
|
|
||||||
String *runtimeCode();
|
String *runtimeCode();
|
||||||
|
void replaceSpecialVariables(String *method, String *tm, Parm *parm);
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
int addRegistrationRoutine(String *rname, int nargs);
|
int addRegistrationRoutine(String *rname, int nargs);
|
||||||
|
|
@ -2666,6 +2666,16 @@ String * R::runtimeCode() {
|
||||||
return s;
|
return s;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/*----------------------------------------------------------------------
|
||||||
|
* replaceSpecialVariables()
|
||||||
|
*--------------------------------------------------------------------*/
|
||||||
|
|
||||||
|
void R::replaceSpecialVariables(String *method, String *tm, Parm *parm) {
|
||||||
|
(void)method;
|
||||||
|
SwigType *type = Getattr(parm, "type");
|
||||||
|
replaceRClass(tm, type);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
/* -----------------------------------------------------------------------
|
/* -----------------------------------------------------------------------
|
||||||
* Called when SWIG wants to initialize this
|
* Called when SWIG wants to initialize this
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue