Improve target language symbol tables for Java and C#, using different scopes for the constants interface, module class and intermediary class rather than incorrectly putting all the symbols into one scope

git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@11857 626c5289-ae23-0410-ae9c-e8d60b6d4f22
This commit is contained in:
William S Fulton 2010-02-13 00:42:09 +00:00
commit 4bf5049397
5 changed files with 71 additions and 16 deletions

View file

@ -305,6 +305,7 @@ CPP_TEST_CASES += \
static_const_member_2 \
struct_initialization_cpp \
struct_value \
symbol_clash \
template \
template_arg_replace \
template_arg_scope \

View file

@ -0,0 +1,28 @@
%module symbol_clash
// ::Vector and ::Text::Vector were incorrectly clashing in the target language symbol tables
#if defined(SWIGJAVA) || defined(SWIGCSHARP)
#if defined(SWIGJAVA)
%include "enumtypeunsafe.swg"
#elif defined(SWIGCSHARP)
%include "enumsimple.swg"
#endif
%inline %{
class Vector
{
};
namespace Text
{
enum Preference
{
Raster,
Vector
};
}
%}
#endif