making sure the resolve_scope_node is working fine before release, and fix for unnamed namespace
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk/SWIG@6641 626c5289-ae23-0410-ae9c-e8d60b6d4f22
This commit is contained in:
parent
8aaf75a78e
commit
a0c0486d76
4 changed files with 94 additions and 25 deletions
|
|
@ -158,10 +158,34 @@ namespace jafar {
|
|||
static void hello(){}
|
||||
|
||||
template<class VecFrame, class Vec, class VecRes>
|
||||
static void toFrame(const VecFrame& frame_, const Vec&v_,VecRes& vRes){}
|
||||
static void toFrame(const VecFrame& frame_, const Vec&v_,const VecRes& vRes){}
|
||||
};
|
||||
}
|
||||
}
|
||||
%}
|
||||
|
||||
%template(toFrame) jafar::jmath::EulerT3D::toFrame<int,int,int>;
|
||||
|
||||
|
||||
%inline %{
|
||||
|
||||
namespace {
|
||||
/* the unnamed namespace is 'private', so, the following
|
||||
declarations shouldn't be wrapped */
|
||||
class Private1
|
||||
{
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
namespace a
|
||||
{
|
||||
namespace
|
||||
{
|
||||
class Private2
|
||||
{
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
%}
|
||||
|
|
|
|||
34
Examples/test-suite/python/namespace_class_runme.py
Normal file
34
Examples/test-suite/python/namespace_class_runme.py
Normal file
|
|
@ -0,0 +1,34 @@
|
|||
from namespace_class import *
|
||||
|
||||
try:
|
||||
p = Private1()
|
||||
error = 1
|
||||
except:
|
||||
error = 0
|
||||
|
||||
if (error):
|
||||
raise RuntimeError, "Private1 is private"
|
||||
|
||||
try:
|
||||
p = Private2()
|
||||
error = 1
|
||||
except:
|
||||
error = 0
|
||||
|
||||
if (error):
|
||||
raise RuntimeError, "Private2 is private"
|
||||
|
||||
EulerT3D.toFrame(1,1,1)
|
||||
|
||||
b = BooT_i()
|
||||
b = BooT_H()
|
||||
|
||||
|
||||
f = FooT_i()
|
||||
f.quack(1)
|
||||
|
||||
f = FooT_d()
|
||||
f.moo(1)
|
||||
|
||||
f = FooT_H()
|
||||
f.foo(Hi)
|
||||
|
|
@ -140,6 +140,6 @@ if (nsoverload() != 1050):
|
|||
raise RuntimeError, ("nsoverload(const char *)")
|
||||
|
||||
|
||||
A.foo(1)
|
||||
b = B()
|
||||
|
||||
b.foo(1)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue