summaryrefslogtreecommitdiff
path: root/Source/Modules/lua.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'Source/Modules/lua.cxx')
-rw-r--r--Source/Modules/lua.cxx11
1 files changed, 10 insertions, 1 deletions
diff --git a/Source/Modules/lua.cxx b/Source/Modules/lua.cxx
index 46e21fb91..8211fb317 100644
--- a/Source/Modules/lua.cxx
+++ b/Source/Modules/lua.cxx
@@ -1184,10 +1184,12 @@ public:
if (getCurrentClass() && (cplus_mode != PUBLIC))
return SWIG_NOWRAP;
- Swig_require("enumvalueDeclaration", n, "*name", "?value", NIL);
+ Swig_require("enumvalueDeclaration", n, "*name", "?value", "*sym:name", NIL);
+ String *symname = Getattr(n, "sym:name");
String *value = Getattr(n, "value");
String *name = Getattr(n, "name");
String *tmpValue;
+ Node *parent = parentNode(n);
if (value)
tmpValue = NewString(value);
@@ -1196,6 +1198,13 @@ public:
Setattr(n, "value", tmpValue);
Setattr(n, "name", tmpValue); /* for wrapping of enums in a namespace when emit_action is used */
+
+ if (GetFlag(parent, "scopedenum")) {
+ symname = Swig_name_member(0, Getattr(parent, "sym:name"), symname);
+ Setattr(n, "sym:name", symname);
+ Delete(symname);
+ }
+
int result = constantWrapper(n);
Delete(tmpValue);