change r to allow logical enums. add change to CHANGES.current
This commit is contained in:
parent
810fb67e4e
commit
be05daa39a
2 changed files with 17 additions and 2 deletions
|
|
@ -6,6 +6,12 @@ the issue number to the end of the URL: https://github.com/swig/swig/issues/
|
|||
|
||||
Version 4.0.0 (in progress)
|
||||
===========================
|
||||
2017-10-10: joequant
|
||||
[R] pass enum expressions to R. This will generate
|
||||
incorrect files when there is an arithmetic expression
|
||||
in the enum, but this is better than silently generating
|
||||
incorrect code
|
||||
|
||||
2017-10-09: olly
|
||||
[PHP] Fix incorrect wrapper code generated when there's a
|
||||
combination of overloading, parameters with a default value
|
||||
|
|
|
|||
|
|
@ -1,3 +1,4 @@
|
|||
|
||||
/* -----------------------------------------------------------------------------
|
||||
* This file is part of SWIG, which is licensed as a whole under version 3
|
||||
* (or any later version) of the GNU General Public License. Some additional
|
||||
|
|
@ -1245,8 +1246,16 @@ int R::enumDeclaration(Node *n) {
|
|||
// This won't work in general, but will at least handle cases like (3)
|
||||
// and 3+7, and when it doesn't work, it'll fail noisly rather than
|
||||
// quietly using the wrong enum value like we used to.
|
||||
Printf(scode, "%s%s%s'%s' = %s%s\n", tab8, tab8, tab8, name, val,
|
||||
nextSibling(c) ? ", " : "");
|
||||
if (!Strcmp(val, "true")) {
|
||||
Printf(scode, "%s%s%s'%s' = %s%s\n", tab8, tab8, tab8, name, "TRUE",
|
||||
nextSibling(c) ? ", " : "");
|
||||
} else if (!Strcmp(val, "false")) {
|
||||
Printf(scode, "%s%s%s'%s' = %s%s\n", tab8, tab8, tab8, name, "FALSE",
|
||||
nextSibling(c) ? ", " : "");
|
||||
} else {
|
||||
Printf(scode, "%s%s%s'%s' = %s%s\n", tab8, tab8, tab8, name, val,
|
||||
nextSibling(c) ? ", " : "");
|
||||
}
|
||||
} else {
|
||||
Printf(scode, "%s%s%s'%s' = %d%s\n", tab8, tab8, tab8, name, value,
|
||||
nextSibling(c) ? ", " : "");
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue