Handle deprecated functions in SWIG

Create issue
Issue #19 new
Matt Williams created an issue

There are two things to handle here:

  1. Don't emit compiler warnings when wrapping deprecated functions
  2. Mark the functions as deprecated in the target language

For step 1 it should be possible to undefine POLYVOX_DEPRECATED when building with SWIG.

For the second step, it will take a bit more wrangling and may not be possible to insert the required code across all target languages.

Comments (4)

  1. Matt Williams reporter

    Undefine POLYVOX_DEPRECATED when compiling with SWIG

    We want to wrap the deprecated functions but we don't want to be told off for it.

    See issue #19

    → <<cset b71b4dd032f4>>

  2. Matt Williams reporter

    Commit a419c4f marked Vector::operator< as deprecated in the Python bindings using %feature("pythonprepend"). It should also be possible to do the same with C# using %csattributes if I can work out the right way to escape the quotes.

  3. David Williams

    It's worth noting that there are currently no deprecated functions in PolyVox (cleaning up for 0.3 release). Also, point (1) appears to be handled now:

    // The depreacated macro (and possibly others?) cause confusion for SWIG, so we undefine them if SWIG is running.
    #if defined SWIG
      //Do nothing in this case
      #define POLYVOX_DEPRECATED //Define it to nothing to avoid warnings

    SWIG bindings are broken anyway (my fault!) since the switch to being header-only, so it might be appropriate to just close this issue.

  4. Log in to comment