fix nested namespace issue reported by Charlie
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@8863 626c5289-ae23-0410-ae9c-e8d60b6d4f22
This commit is contained in:
parent
8e29e828be
commit
3db62d3c27
2 changed files with 36 additions and 1 deletions
|
|
@ -60,3 +60,38 @@ namespace oss
|
|||
{
|
||||
%template(hi1_hi0) hi1<hello::Hi0 >;
|
||||
}
|
||||
|
||||
|
||||
%rename(MyFoo) geos::algorithm::Foo;
|
||||
|
||||
%inline
|
||||
{
|
||||
namespace geos {
|
||||
namespace algorithm {
|
||||
class Foo
|
||||
{
|
||||
};
|
||||
}
|
||||
|
||||
namespace planargraph { // geos.planargraph
|
||||
namespace algorithm { // geos.planargraph.algorithm
|
||||
|
||||
class Foo {
|
||||
public:
|
||||
typedef int size_type;
|
||||
};
|
||||
}
|
||||
namespace algorithm { // geos.planargraph.algorithm
|
||||
|
||||
class ConnectedSubgraphFinder : public Foo {
|
||||
public:
|
||||
ConnectedSubgraphFinder(size_type)
|
||||
{
|
||||
}
|
||||
|
||||
};
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -3811,7 +3811,7 @@ cpp_namespace_decl : NAMESPACE idcolon LBRACE {
|
|||
Hash *h;
|
||||
$1 = Swig_symbol_current();
|
||||
h = Swig_symbol_clookup($2,0);
|
||||
if (h && (Strcmp(nodeType(h),"namespace") == 0)) {
|
||||
if (h && ($1 == Getattr(h,k_symsymtab)) && (Strcmp(nodeType(h),"namespace") == 0)) {
|
||||
if (Getattr(h,k_alias)) {
|
||||
h = Getattr(h,k_namespace);
|
||||
Swig_warning(WARN_PARSE_NAMESPACE_ALIAS, cparse_file, cparse_line, "Namespace alias '%s' not allowed here. Assuming '%s'\n",
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue