Browse Source

Fixed namespace conflict in C++/CLI.

Closes #533.

Related:

https://github.com/mono/CppSharp/pull/520 cf472f526c
pull/503/merge
triton 10 years ago
parent
commit
0fa18a9f62
  1. 2
      src/Generator/Generators/CLI/CLITypePrinter.cs
  2. 5
      tests/CLITemp/CLITemp.cpp
  3. 8
      tests/CLITemp/CLITemp.h

2
src/Generator/Generators/CLI/CLITypePrinter.cs

@ -327,7 +327,7 @@ namespace CppSharp.Generators.CLI @@ -327,7 +327,7 @@ namespace CppSharp.Generators.CLI
names.Add(decl.Visit(this));
return string.Join("::", names);
return "::" + string.Join("::", names);
}
public string VisitClassDecl(Class @class)

5
tests/CLITemp/CLITemp.cpp

@ -14,3 +14,8 @@ void testFreeFunction() @@ -14,3 +14,8 @@ void testFreeFunction()
{
}
void UseFoo::takesFooPtr(Foo* ptr)
{
}

8
tests/CLITemp/CLITemp.h

@ -49,3 +49,11 @@ std::ostream& operator<<(std::ostream& os, const Date& dt) @@ -49,3 +49,11 @@ std::ostream& operator<<(std::ostream& os, const Date& dt)
}
DLL_API void testFreeFunction();
class DLL_API Foo { };
class DLL_API UseFoo
{
public:
void takesFooPtr(Foo* ptr);
};
Loading…
Cancel
Save