Fix $typemap() expansion for "ctype" typemap
This didn't work correctly before because we need to override the base class replaceSpecialVariables() method to expand $resolved_type, which appears during the expansion, using the type supplied as $typemap() argument instead of doing it later using it the type to which the typemap containing the macro is attached. This is a prerequisite for implementing smart pointers support.
This commit is contained in:
parent
2f4eb2d412
commit
9204e57cc1
1 changed files with 12 additions and 0 deletions
|
|
@ -331,6 +331,18 @@ public:
|
|||
Delete(type);
|
||||
}
|
||||
|
||||
/*----------------------------------------------------------------------
|
||||
* replaceSpecialVariables()
|
||||
*
|
||||
* Override the base class method to ensure that $resolved_type is expanded correctly inside $typemap().
|
||||
*--------------------------------------------------------------------*/
|
||||
|
||||
virtual void replaceSpecialVariables(String *method, String *tm, Parm *parm) {
|
||||
(void)method;
|
||||
SwigType *type = Getattr(parm, "type");
|
||||
substituteResolvedType(type, tm);
|
||||
}
|
||||
|
||||
/* ------------------------------------------------------------
|
||||
* main()
|
||||
* ------------------------------------------------------------ */
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue