Lua bindings break when upgrading from swig 2.0.9 to 4.0.1

Merijn Broeren via Swig-user <[email protected]>
Newsgroups gmane.comp.programming.swig
Message-ID <[email protected]>
Hello,

We're using swig for many years to create Perl, Python and Lua bindings for many of our internal C++ libraries. We're now having to upgrade to Python 3 which makes it necessary to upgrade swig as well. We've been using swig 2.0.9 for years and are attempting to jump to swig 4.0.1. This works well for Perl and Python, but we are seeing an issue in Lua.

We've always had a terrible hack in place to deal with the issue of having C++ classes with the same name in different namespaces, and this works fine in swig 2, but breaks in swig 4. A much simplified example demonstrating the issue, and our hack, can be found here: https://github.com/pdtpartners/swig-lua-repro.

Could somebody tell us how to go about doing this in Swig 4? Or whether we're missing a better way of doing this? Renaming our classes to not have nameclashes is not an option though.

Cheers,
Merijn

________________________________
This communication is intended only for the addressee(s), may contain confidential, privileged or proprietary information, and may be protected by US and other laws. Your acceptance of this communication constitutes your agreement to keep confidential all the confidential information contained in this communication, as well as any information derived by you from the confidential information contained in this communication. We do not waive any confidentiality by misdelivery.

If you receive this communication in error, any use, dissemination, printing or copying is strictly prohibited; please destroy all electronic and paper copies and notify the sender immediately. Nothing in this email is intended to constitute (1) investment or trading advice or recommendations or any advertisement or (2) a solicitation of an investment in any jurisdiction in which such a solicitation would be unlawful.

Please note that PDT Partners UK, LLP, including its affiliates, reserves the right to intercept, archive, monitor and review all communications to and from its network.

_______________________________________________
Swig-user mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/swig-user
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.