Fix cstype typemap lookup for member variables so that a fully qualified variable name matches

This commit is contained in:
William S Fulton 2013-01-15 06:45:47 +00:00
commit 0e6af5c0ea
3 changed files with 45 additions and 15 deletions

View file

@ -117,3 +117,22 @@ void hoop(WasCrashing was) {}
enum BigNumbers { big=0x80000000, bigger };
%}
// Member variable qualification
%typemap(cstype) bool "badtype1"
%typemap(cstype) bool mvar "badtype2"
%typemap(cstype) bool svar "badtype4"
%typemap(cstype) bool gvar "badtype5"
%typemap(cstype) bool MVar::mvar "bool"
%typemap(cstype) bool MVar::svar "bool"
%typemap(cstype) bool Glob::gvar "bool"
%inline %{
struct MVar {
bool mvar;
static bool svar;
};
namespace Glob {
bool gvar;
}
bool MVar::svar = false;
%}