Re: (EXT) Re: Lua bindings break when upgrading from swig 2.0.9 to 4.0.1
Merijn Broeren via Swig-user <[email protected]> Wed, 16 Dec 2020 10:30:13 +0000
| Newsgroups | gmane.comp.programming.swig |
|---|---|
| Message-ID | <[email protected]> |
Hello William, Thanks, this was very helpful. It makes a lot of sense, we’ll just need to rewrite a bit on the lua side, but this is already unblocking us. Cheers, Merijn From: William S Fulton <[email protected]> Sent: Saturday, November 28, 2020 11:13 PM To: Merijn Broeren <[email protected]> Cc: [email protected] Subject: (EXT) Re: [Swig-user] Lua bindings break when upgrading from swig 2.0.9 to 4.0.1 Hi Merijn The %nspace directive provides support for multiple C++ namespaces in the target language. While this is not provided for all target languages, Lua support is now available. I suggest you try out the official nspace support. There is an example in the Examples/Lua/nspace directory and documentation in the Lua chapter. There is also some info in the CHANGES file for version 3.0.0. William On Thu, 19 Nov 2020 at 14:34, Merijn Broeren via Swig-user <[email protected]<mailto:[email protected]>> wrote: 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<https://nam12.safelinks.protection.outlook.com/?url=http%3A%2F%2Fgithub.com%2Fpdtpartners%2Fswig-lua-repro&data=04%7C01%7C%7Ce94a0d84a6744f70053c08d893f34126%7C17f8a405aa9b46a29dad10862de90a7e%7C0%7C1%7C637422020282124233%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&sdata=wImTJoKyZhTgNe42SS%2F6tcK9OwQ0FsikMDKDS1vqjYM%3D&reserved=0>. 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]<mailto:[email protected]> https://lists.sourceforge.net/lists/listinfo/swig-user<https://nam12.safelinks.protection.outlook.com/?url=https%3A%2F%2Flists.sourceforge.net%2Flists%2Flistinfo%2Fswig-user&data=04%7C01%7C%7Ce94a0d84a6744f70053c08d893f34126%7C17f8a405aa9b46a29dad10862de90a7e%7C0%7C1%7C637422020282124233%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&sdata=TxdjoNnLXfchPFA0iB%2F4%2FVy7aiSU3DeU%2FdyMhpGaRhY%3D&reserved=0> ________________________________ 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