Fix regression in introduced in merge of C++11 strongly typed enums support
- Guile constants bad casts generated - Go non-public enum value wrappers assert failure Also cosmetic test comment correction
This commit is contained in:
parent
b9b9b3cd21
commit
7f8bb02d78
3 changed files with 5 additions and 7 deletions
|
|
@ -1,6 +1,3 @@
|
||||||
|
|
||||||
// This is the bool runtime testcase. It checks that the C++ bool type works.
|
|
||||||
|
|
||||||
using System;
|
using System;
|
||||||
using cpp11_strongly_typed_enumerationsNamespace;
|
using cpp11_strongly_typed_enumerationsNamespace;
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1959,12 +1959,13 @@ private:
|
||||||
* ------------------------------------------------------------------------ */
|
* ------------------------------------------------------------------------ */
|
||||||
|
|
||||||
virtual int enumvalueDeclaration(Node *n) {
|
virtual int enumvalueDeclaration(Node *n) {
|
||||||
Swig_require("enumvalueDeclaration", n, "*sym:name", NIL);
|
|
||||||
Node *parent = parentNode(n);
|
|
||||||
|
|
||||||
if (!is_public(n)) {
|
if (!is_public(n)) {
|
||||||
return SWIG_OK;
|
return SWIG_OK;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Swig_require("enumvalueDeclaration", n, "*sym:name", NIL);
|
||||||
|
Node *parent = parentNode(n);
|
||||||
|
|
||||||
if (Getattr(parent, "unnamed")) {
|
if (Getattr(parent, "unnamed")) {
|
||||||
Setattr(n, "type", NewString("int"));
|
Setattr(n, "type", NewString("int"));
|
||||||
} else {
|
} else {
|
||||||
|
|
|
||||||
|
|
@ -1350,7 +1350,7 @@ public:
|
||||||
Printv(f_header, tm, "\n", NIL);
|
Printv(f_header, tm, "\n", NIL);
|
||||||
} else {
|
} else {
|
||||||
// Create variable and assign it a value
|
// Create variable and assign it a value
|
||||||
Printf(f_header, "static %s = (%s)%s;\n", SwigType_str(type, var_name), type, rvalue);
|
Printf(f_header, "static %s = (%s)(%s);\n", SwigType_str(type, var_name), SwigType_str(type, 0), rvalue);
|
||||||
}
|
}
|
||||||
{
|
{
|
||||||
/* Hack alert: will cleanup later -- Dave */
|
/* Hack alert: will cleanup later -- Dave */
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue