fix %template + static class members
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk/SWIG@6622 626c5289-ae23-0410-ae9c-e8d60b6d4f22
This commit is contained in:
parent
ec2d6ba128
commit
9cdd5195ab
2 changed files with 28 additions and 3 deletions
|
|
@ -148,3 +148,18 @@ namespace test {
|
|||
}
|
||||
%template(BooT_i) ::BooT<int>;
|
||||
|
||||
|
||||
%inline %{
|
||||
|
||||
namespace jafar {
|
||||
namespace jmath {
|
||||
class EulerT3D {
|
||||
public:
|
||||
template<class VecFrame, class Vec, class VecRes>
|
||||
static inline void toFrame(const VecFrame& frame_, const Vec&v_,VecRes& vRes){}
|
||||
};
|
||||
}
|
||||
}
|
||||
%}
|
||||
|
||||
%template(EulerT3D_toFrame) jafar::jmath::EulerT3D::toFrame<int,int,int>;
|
||||
|
|
|
|||
|
|
@ -761,8 +761,8 @@ static String *resolve_namespace_class(String *cname) {
|
|||
if (!ns) {
|
||||
Swig_error(cparse_file,cparse_line,"Undefined scope '%s'\n", prefix);
|
||||
} else {
|
||||
if (Strcmp(nodeType(ns),"namespace") != 0) {
|
||||
Swig_error(cparse_file,cparse_line,"'%s' is not defined as namespace.\n", prefix);
|
||||
if (Getattr(ns,"symtab") == 0) {
|
||||
Swig_error(cparse_file,cparse_line,"'%s' is not defined as a valid scope.\n", prefix);
|
||||
ns = 0;
|
||||
} else {
|
||||
Symtab *nscope = Getattr(ns,"symtab");
|
||||
|
|
@ -798,7 +798,17 @@ static String *resolve_namespace_class(String *cname) {
|
|||
ns1 = Getattr(ns1,"namespace");
|
||||
}
|
||||
} else {
|
||||
assert(0);
|
||||
/* this is a class, or nested classes */
|
||||
si = Next(si);
|
||||
for (; si.item; si = Next(si)) {
|
||||
if (si.item) {
|
||||
Printf(sname,"::%s",si.item);
|
||||
}
|
||||
}
|
||||
Printf(sname,"::%s",base);
|
||||
Delete(base);
|
||||
base = sname;
|
||||
break;
|
||||
}
|
||||
ns2 = new_node("namespace");
|
||||
Setattr(ns2,"name",sname);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue