Py3: suppress warning: 'tp_print' is deprecated [-Wdeprecated-declarations]
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.
This commit is contained in:
@@ -279,6 +279,11 @@ public:
|
||||
#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@;
|
||||
|
||||
@@ -892,6 +897,10 @@ int @self.export.Name@::_setattr(const char *attr, PyObject *value) // __setattr
|
||||
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.
|
||||
|
||||
Reference in New Issue
Block a user