Fix generated quoting when using %javaconst(1)/%csconst(1) for static const char member variables.
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@11760 626c5289-ae23-0410-ae9c-e8d60b6d4f22
This commit is contained in:
parent
d756b28611
commit
bf8ba3bf55
4 changed files with 29 additions and 3 deletions
|
|
@ -1394,7 +1394,14 @@ public:
|
|||
enum_constant_flag = false;
|
||||
} else {
|
||||
// Alternative constant handling will use the C syntax to make a true C# constant and hope that it compiles as C# code
|
||||
Printf(constants_code, "%s;\n", Getattr(n, "wrappedasconstant") ? Getattr(n, "staticmembervariableHandler:value") : Getattr(n, "value"));
|
||||
if (Getattr(n, "wrappedasconstant")) {
|
||||
if (SwigType_type(t) == T_CHAR)
|
||||
Printf(constants_code, "\'%s\';\n", Getattr(n, "staticmembervariableHandler:value"));
|
||||
else
|
||||
Printf(constants_code, "%s;\n", Getattr(n, "staticmembervariableHandler:value"));
|
||||
} else {
|
||||
Printf(constants_code, "%s;\n", Getattr(n, "value"));
|
||||
}
|
||||
}
|
||||
|
||||
// Emit the generated code to appropriate place
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue