implement the naturalvar feature for global vars in java and csharp
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk/SWIG@8577 626c5289-ae23-0410-ae9c-e8d60b6d4f22
This commit is contained in:
parent
3b866d286b
commit
e8b3542f9a
4 changed files with 41 additions and 32 deletions
|
|
@ -698,7 +698,7 @@ class CSHARP : public Language {
|
|||
Swig_save("functionWrapper",n,"wrap:action",NIL);
|
||||
|
||||
// below based on Swig_VargetToFunction()
|
||||
SwigType *ty = Swig_wrapped_var_type(Getattr(n,"type"));
|
||||
SwigType *ty = Swig_wrapped_var_type(Getattr(n,"type"), use_naturalvar_mode(n));
|
||||
Setattr(n,"wrap:action", NewStringf("result = (%s) %s;\n", SwigType_lstr(ty,0), Getattr(n, "value")));
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -932,7 +932,7 @@ class JAVA : public Language {
|
|||
Swig_save("functionWrapper",n,"wrap:action",NIL);
|
||||
|
||||
// below based on Swig_VargetToFunction()
|
||||
SwigType *ty = Swig_wrapped_var_type(Getattr(n,"type"));
|
||||
SwigType *ty = Swig_wrapped_var_type(Getattr(n,"type"), use_naturalvar_mode(n));
|
||||
Setattr(n,"wrap:action", NewStringf("result = (%s) %s;\n", SwigType_lstr(ty,0), Getattr(n, "value")));
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue