Skip to content

Commit

Permalink
Py3: suppress warning: 'tp_print' is deprecated [-Wdeprecated-declara…
Browse files Browse the repository at this point in the history
…tions]

If the tp_print slot is not set the warning -Wmissing-field-initializers is raised. If it's set then -Wdeprecated-declarations is raised.
So, the only way is to suppress it.
  • Loading branch information
wwmayer committed Oct 15, 2020
1 parent 9c72532 commit da4a2e4
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions src/Tools/generateTemplates/templateClassPyExport.py
Expand Up @@ -279,6 +279,11 @@ class @self.export.Namespace.replace("::","_")@Export @self.export.Name@ : publi
#include <Base/Exception.h>
#include <CXX/Objects.hxx>
#if defined(__clang__)
# pragma clang diagnostic push
# pragma clang diagnostic ignored "-Wdeprecated-declarations"
#endif
using Base::streq;
using namespace @self.export.Namespace@;
Expand Down Expand Up @@ -892,6 +897,10 @@ class @self.export.Namespace.replace("::","_")@Export @self.export.Name@ : publi
return static_cast<@self.export.TwinPointer@ *>(_pcTwinPointer);
}
#if defined(__clang__)
# pragma clang diagnostic pop
#endif
#if 0
/* From here on come the methods you have to implement, but NOT in this module. Implement in @self.export.Name@Imp.cpp! This prototypes
* are just for convenience when you add a new method.
Expand Down

0 comments on commit da4a2e4

Please sign in to comment.