Py3: suppress warnings about un-initialized/deprecated tp_print slot
This commit is contained in:
@@ -106,11 +106,21 @@ App::DocumentObjectExecReturn* Primitive::execute(void) {
|
||||
return Part::Feature::execute();
|
||||
}
|
||||
|
||||
// suppress warning about tp_print for Py3.8
|
||||
#if defined(__clang__)
|
||||
# pragma clang diagnostic push
|
||||
# pragma clang diagnostic ignored "-Wmissing-field-initializers"
|
||||
#endif
|
||||
|
||||
namespace Part {
|
||||
PYTHON_TYPE_DEF(PrimitivePy, PartFeaturePy)
|
||||
PYTHON_TYPE_IMP(PrimitivePy, PartFeaturePy)
|
||||
}
|
||||
|
||||
#if defined(__clang__)
|
||||
# pragma clang diagnostic pop
|
||||
#endif
|
||||
|
||||
PyObject* Primitive::getPyObject()
|
||||
{
|
||||
if (PythonObject.is(Py::_None())){
|
||||
|
||||
@@ -155,9 +155,19 @@ void FeaturePrimitive::handleChangedPropertyName(Base::XMLReader &reader, const
|
||||
extHandleChangedPropertyName(reader, TypeName, PropName); // AttachExtension
|
||||
}
|
||||
|
||||
// suppress warning about tp_print for Py3.8
|
||||
#if defined(__clang__)
|
||||
# pragma clang diagnostic push
|
||||
# pragma clang diagnostic ignored "-Wmissing-field-initializers"
|
||||
#endif
|
||||
|
||||
PYTHON_TYPE_DEF(PrimitivePy, PartDesign::FeaturePy)
|
||||
PYTHON_TYPE_IMP(PrimitivePy, PartDesign::FeaturePy)
|
||||
|
||||
#if defined(__clang__)
|
||||
# pragma clang diagnostic pop
|
||||
#endif
|
||||
|
||||
PyObject* FeaturePrimitive::getPyObject()
|
||||
{
|
||||
if (PythonObject.is(Py::_None())){
|
||||
|
||||
Reference in New Issue
Block a user