Apply Ubuntu patch to fix Ruby and std::vector wrappers with -minherit.

git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@11987 626c5289-ae23-0410-ae9c-e8d60b6d4f22
This commit is contained in:
William S Fulton 2010-04-09 23:27:40 +00:00
commit 894f89fe97
3 changed files with 14 additions and 1 deletions

View file

@ -1,6 +1,10 @@
Version 2.0.0 (in progress)
============================
2010-04-09: wsfulton
[Ruby] Apply Ubuntu patch to fix Ruby and std::vector wrappers with -minherit.
https://bugs.launchpad.net/ubuntu/+source/swig1.3/+bug/522874
2010-04-09: wsfulton
[Mzscheme] Apply Ubuntu patch to fix std::map wrappers:
https://bugs.launchpad.net/ubuntu/+source/swig1.3/+bug/203876

View file

@ -75,3 +75,8 @@ int wget(SpamPtr f) {
#endif
// Was causing runtime error in Ruby
%include <std_vector.i>
%template(IntVector) std::vector<int>;

View file

@ -1248,7 +1248,11 @@ public:
Iterator alias = First(aliases);
while (alias.item) {
if (Len(alias.item) > 0) {
Printv(klass->init, tab4, "rb_define_alias(", klass->vname, ", \"", alias.item, "\", \"", iname, "\");\n", NIL);
if (multipleInheritance) {
Printv(klass->init, tab4, "rb_define_alias(", klass->mImpl, ", \"", alias.item, "\", \"", iname, "\");\n", NIL);
} else {
Printv(klass->init, tab4, "rb_define_alias(", klass->vname, ", \"", alias.item, "\", \"", iname, "\");\n", NIL);
}
}
alias = Next(alias);
}