Test would not compile on windows because it defines a template class called Rectangle, but Windows defines a function called Rectangle in wingdi.h. Thus renamed Rectangle to RectangleTest. Note this should not affect any test cases, because they test RectangleInt which is defined as RectangleText<int>. Thus the external api to the produced module does not change.
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@7517 626c5289-ae23-0410-ae9c-e8d60b6d4f22
This commit is contained in:
parent
9d33ca39f2
commit
32dfafdc39
1 changed files with 5 additions and 2 deletions
|
|
@ -3,6 +3,9 @@
|
||||||
|
|
||||||
%module template_classes
|
%module template_classes
|
||||||
|
|
||||||
|
%{
|
||||||
|
%}
|
||||||
|
|
||||||
%inline %{
|
%inline %{
|
||||||
|
|
||||||
template <class T>
|
template <class T>
|
||||||
|
|
@ -14,7 +17,7 @@ private:
|
||||||
};
|
};
|
||||||
|
|
||||||
template <class T>
|
template <class T>
|
||||||
class Rectangle {
|
class RectangleTest {
|
||||||
public:
|
public:
|
||||||
Point<T>& getPoint() {return point;}
|
Point<T>& getPoint() {return point;}
|
||||||
void setPoint(Point<T>& value) {point = value;}
|
void setPoint(Point<T>& value) {point = value;}
|
||||||
|
|
@ -25,6 +28,6 @@ private:
|
||||||
%}
|
%}
|
||||||
|
|
||||||
%template(PointInt) Point<int>;
|
%template(PointInt) Point<int>;
|
||||||
%template(RectangleInt) Rectangle<int>;
|
%template(RectangleInt) RectangleTest<int>;
|
||||||
|
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue