Re: Excluding functions with ifndef SWIG causing wrong function to get called

William S Fulton <[email protected]> Tue, 23 Aug 2022 19:27:13 +0100
Newsgroups gmane.comp.programming.swig
Message-ID <CANGqftDk0BNbC2vQJ4mBW1_tF6XGH2dNNbMhJwAJ4TVKe6gDoA@mail.gmail.com>
This doesn't sound familiar. Maybe you have hit a corner case bug or
something. Can you post a simple example of this behaviour and the version
of SWIG you are using? What you could do to self-diagnose is look at the
preprocessed output using swig -E.

William


On Tue, 23 Aug 2022 at 02:33, Abshire, Ian <[email protected]> wrote:

> Hello,
>
>
>
> I have some question about an issue we have encountered. We use the SWIG
> preprocessor definition to exclude functions in the header file that we
> don’t want wrapped (e.g. #ifndef SWIG).
>
>
>
> The issue we found is when we surround a function we want to exclude with
> this block, the functions declared after that will not get called correctly
> from Python. Instead, some other unexpected function will get called as if
> there is an offset. When we move all exclusion blocks to the end of the
> public section of the header, the wrapped functions work as expected. We
> also generate a C# interface and have not seen this issue there, only
> Python.
>
>
>
> Is the way we are excluding functions a good practice? Is it best practice
> to put all functions we want excluded at the end of the header? Is this a
> bug or a configuration issue?
>
>
>
> I’ve searched through the docs, but so far have been unable to discern
> answers to these questions.
>
>
>
> Thank you in advance for any help or insights!
>
>
>
> Ian
> _______________________________________________
> 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