disable automatic renaming, associated with warning 314

Burlen Loring <[email protected]> Mon, 31 Oct 2022 15:00:56 -0700
Newsgroups gmane.comp.programming.swig
Message-ID <[email protected]>
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