diff options
author | Momtchil Momtchev <momtchil@momtchev.com> | 2023-04-21 18:50:22 +0200 |
---|---|---|
committer | Olly Betts <ojwbetts@gmail.com> | 2023-04-22 08:51:27 +1200 |
commit | 64516bb2a3b79c4ec3f88592fbb0a6fb3f0aff9d (patch) | |
tree | 50bd5811486a2f28a167cb96814c890373ae152e | |
parent | 2fecdd8372c7a80dd3e87c463dccdf843449c279 (diff) | |
download | swig-64516bb2a3b79c4ec3f88592fbb0a6fb3f0aff9d.tar.gz |
use the renamed name when creating a constant
-rw-r--r-- | Source/Modules/javascript.cxx | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/Source/Modules/javascript.cxx b/Source/Modules/javascript.cxx index 50d7a7cef..17ba4f766 100644 --- a/Source/Modules/javascript.cxx +++ b/Source/Modules/javascript.cxx @@ -1133,9 +1133,8 @@ int JSEmitter::emitConstant(Node *n) { Wrapper *wrapper = NewWrapper(); SwigType *type = Getattr(n, "type"); - String *name = Getattr(n, "name"); String *iname = Getattr(n, "sym:name"); - String *wname = Swig_name_wrapper(name); + String *wname = Swig_name_get(Getattr(current_namespace, NAME_MANGLED), iname); String *rawval = Getattr(n, "rawval"); String *value = rawval ? rawval : Getattr(n, "value"); |