Correct node stored in language symbol tables for main module

This commit is contained in:
William S Fulton 2024-02-03 14:19:25 +00:00
parent 71b0073ff7
commit 44e6e288c0
3 changed files with 10 additions and 7 deletions

View File

@ -290,7 +290,8 @@ public:
virtual int top(Node *n) {
// Get any options set in the module directive
Node *optionsnode = Getattr(Getattr(n, "module"), "options");
Node *module = Getattr(n, "module");
Node *optionsnode = Getattr(module, "options");
if (optionsnode) {
if (Getattr(optionsnode, "imclassname"))
@ -374,9 +375,9 @@ public:
}
// module class and intermediary classes are always created
if (!addSymbol(imclass_name, n))
if (!addSymbol(imclass_name, module))
return SWIG_ERROR;
if (!addSymbol(module_class_name, n))
if (!addSymbol(module_class_name, module))
return SWIG_ERROR;
imclass_class_code = NewString("");

View File

@ -347,7 +347,8 @@ public:
* --------------------------------------------------------------------------- */
virtual int top(Node *n) {
// Get any options set in the module directive
Node *optionsnode = Getattr(Getattr(n, "module"), "options");
Node *module = Getattr(n, "module");
Node *optionsnode = Getattr(module, "options");
if (optionsnode) {
if (Getattr(optionsnode, "imdmodulename")) {

View File

@ -332,7 +332,8 @@ public:
virtual int top(Node *n) {
// Get any options set in the module directive
Node *optionsnode = Getattr(Getattr(n, "module"), "options");
Node *module = Getattr(n, "module");
Node *optionsnode = Getattr(module, "options");
if (optionsnode) {
if (Getattr(optionsnode, "jniclassname"))
@ -417,9 +418,9 @@ public:
constants_interface_name = NewStringf("%sConstants", module_class_name);
// module class and intermediary classes are always created
if (!addSymbol(imclass_name, n))
if (!addSymbol(imclass_name, module))
return SWIG_ERROR;
if (!addSymbol(module_class_name, n))
if (!addSymbol(module_class_name, module))
return SWIG_ERROR;
imclass_class_code = NewString("");