diff options
author | William S Fulton <wsf@fultondesigns.co.uk> | 2014-12-07 20:27:29 +0000 |
---|---|---|
committer | William S Fulton <wsf@fultondesigns.co.uk> | 2014-12-07 21:31:14 +0000 |
commit | 7f8bb02d78fe8ab3bff62f9cfd7a2c5b9825516c (patch) | |
tree | a13b080e887fc55ae644f0b56d34c1e3eac39b11 /Source | |
parent | b9b9b3cd215a51039d08c3ee9857687d18af75fe (diff) | |
download | swig-7f8bb02d78fe8ab3bff62f9cfd7a2c5b9825516c.tar.gz |
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
Diffstat (limited to 'Source')
-rw-r--r-- | Source/Modules/go.cxx | 7 | ||||
-rw-r--r-- | Source/Modules/guile.cxx | 2 |
2 files changed, 5 insertions, 4 deletions
diff --git a/Source/Modules/go.cxx b/Source/Modules/go.cxx index 20a8650ef..eac83a5a5 100644 --- a/Source/Modules/go.cxx +++ b/Source/Modules/go.cxx @@ -1959,12 +1959,13 @@ private: * ------------------------------------------------------------------------ */ virtual int enumvalueDeclaration(Node *n) { - Swig_require("enumvalueDeclaration", n, "*sym:name", NIL); - Node *parent = parentNode(n); - if (!is_public(n)) { return SWIG_OK; } + + Swig_require("enumvalueDeclaration", n, "*sym:name", NIL); + Node *parent = parentNode(n); + if (Getattr(parent, "unnamed")) { Setattr(n, "type", NewString("int")); } else { diff --git a/Source/Modules/guile.cxx b/Source/Modules/guile.cxx index ce8d19c06..1c135b53d 100644 --- a/Source/Modules/guile.cxx +++ b/Source/Modules/guile.cxx @@ -1350,7 +1350,7 @@ public: Printv(f_header, tm, "\n", NIL); } else { // 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 */ |