fix for directors, now the test-suite runs again using -directors
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@8856 626c5289-ae23-0410-ae9c-e8d60b6d4f22
This commit is contained in:
parent
50ac99c2cc
commit
d388046661
6 changed files with 31 additions and 10 deletions
|
|
@ -9,7 +9,13 @@ include Abstract_signature
|
|||
|
||||
exceptionRaised = false
|
||||
begin
|
||||
Abstract_foo.new
|
||||
foo = Abstract_foo.new
|
||||
begin
|
||||
foo.meth(1)
|
||||
rescue RuntimeError
|
||||
# here we are using directors
|
||||
exceptionRaised = true
|
||||
end
|
||||
rescue NameError
|
||||
exceptionRaised = true
|
||||
rescue TypeError
|
||||
|
|
@ -27,7 +33,13 @@ end
|
|||
|
||||
exceptionRaised = false
|
||||
begin
|
||||
Abstract_bar.new
|
||||
bar = Abstract_bar.new
|
||||
begin
|
||||
bar.meth(1)
|
||||
rescue RuntimeError
|
||||
# here we are using directors
|
||||
exceptionRaised = true
|
||||
end
|
||||
rescue NameError
|
||||
exceptionRaised = true
|
||||
rescue TypeError
|
||||
|
|
|
|||
|
|
@ -25,17 +25,17 @@ public:
|
|||
|
||||
// Testing ignore
|
||||
|
||||
%ignore std::vector<Flow>::vector(size_type);
|
||||
%ignore std::tvector<Flow>::tvector(size_type);
|
||||
|
||||
%inline %{
|
||||
|
||||
namespace std {
|
||||
|
||||
template<class T> class vector {
|
||||
template<class T> class tvector {
|
||||
public:
|
||||
typedef size_t size_type;
|
||||
vector() {}
|
||||
vector(size_type n) { T t = T(); }
|
||||
tvector() {}
|
||||
tvector(size_type n) { T t = T(); }
|
||||
};
|
||||
}
|
||||
|
||||
|
|
@ -46,4 +46,4 @@ public:
|
|||
};
|
||||
%}
|
||||
|
||||
%template(VectFlow) std::vector<Flow>;
|
||||
%template(VectFlow) std::tvector<Flow>;
|
||||
|
|
|
|||
|
|
@ -50,3 +50,8 @@ type SWIGMACRO_##name(lparams) {
|
|||
|
||||
*/
|
||||
|
||||
%{
|
||||
#ifdef max
|
||||
#undef max
|
||||
#endif
|
||||
%}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue