Re: Lua bindings break when upgrading from swig 2.0.9 to 4.0.1

William S Fulton <[email protected]> Sat, 28 Nov 2020 23:13:06 +0000
Newsgroups gmane.comp.programming.swig
Message-ID <CANGqftCtLZOviz-3CVY37H4JQr6yitEYtu5R7PEXH2=o3L6EKQ@mail.gmail.com>
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]> 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.
>
>
>
> 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
>

_______________________________________________
Swig-user mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/swig-user