Re: disable automatic renaming, associated with warning 314
William S Fulton <[email protected]> Sun, 6 Nov 2022 19:09:47 +0000
| Newsgroups | gmane.comp.programming.swig |
|---|---|
| Message-ID | <CANGqftD2jD_gcZCBYvvRJP0hzaDTKdiXfaEFyJxf4JSfy6usDA@mail.gmail.com> |
For the record, this is being discussed in issue https://github.com/swig/swig/issues/2424. On Mon, 31 Oct 2022 at 22:09, Burlen Loring <[email protected]> wrote: > Hi, Is there a way to tell SWIG not to rename things? > > In my case I have the following enumeration: > > /** flag used to indicate whether or not a transfer operation should be > * synchronous or not. > */ > enum class buffer_transfer > { > async = 0, ///< all operations are asynchronous > sync_cpu = 1,///< operations moving data from GPU to CPU memory are > synchronous > sync = 2 ///< all operations are synchronous > }; > > SWIG warns: > > /work/rblas/gpu_linsolver/HAMR/python/../hamr_buffer_transfer.h:15: > Warning 314: 'async' is a python keyword, renaming to '_async' > > then in my module I have the following at module scope: > > 'buffer_transfer__async', 'buffer_transfer_sync', > 'buffer_transfer_sync_cpu' > > Note the double _ . I think SWIG's renaming behavior doesn't make sense > when applied to enumerations. Is there a way to disable? > > Thank you > Burlen > > > > _______________________________________________ > 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