Fix expansion of the $parentclassname special variable
It incorrectly contains brackets in the expanded name. Fixes SF Bug 1375.
This commit is contained in:
parent
e982dc7e3b
commit
83749b3937
3 changed files with 17 additions and 1 deletions
|
|
@ -5,3 +5,6 @@ See the RELEASENOTES file for a summary of changes in each release.
|
|||
Version 3.0.3 (in progress)
|
||||
===========================
|
||||
|
||||
2014-07-01: wsfulton
|
||||
Fix SF Bug #1375 - Expansion of the $parentclassname special variable incorrectly contains
|
||||
brackets in the expanded name.
|
||||
|
|
|
|||
|
|
@ -19,3 +19,16 @@
|
|||
struct ForExtension {
|
||||
};
|
||||
%}
|
||||
|
||||
%inline %{
|
||||
namespace Space {
|
||||
template <class T> class ExtendTemplate {};
|
||||
}
|
||||
%}
|
||||
|
||||
%extend Space::ExtendTemplate
|
||||
{
|
||||
void extending() { $parentclassname tmp; }
|
||||
}
|
||||
|
||||
%template(ExtendTemplateInt) Space::ExtendTemplate<int>;
|
||||
|
|
|
|||
|
|
@ -869,7 +869,7 @@ void Swig_replace_special_variables(Node *n, Node *parentnode, String *code) {
|
|||
String *parentclassname = 0;
|
||||
if (parentclass)
|
||||
parentclassname = Getattr(parentclass, "name");
|
||||
Replaceall(code, "$parentclassname", parentclassname ? parentclassname : "");
|
||||
Replaceall(code, "$parentclassname", parentclassname ? SwigType_str(parentclassname, "") : "");
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue