fix linker error with gcc

This commit is contained in:
wmayer
2017-09-28 18:43:48 +02:00
parent 6126d63ac1
commit e00bb6f0b6
2 changed files with 14 additions and 4 deletions

View File

@@ -80,3 +80,16 @@ PartExport Py::Object shape2pyshape(const TopoDS_Shape &shape)
return Py::asObject(ret);
}
} //namespace Part
namespace Py {
template<>
bool TopoShape::accepts (PyObject *pyob) const
{
return (pyob && PyObject_TypeCheck(pyob, &(Part::TopoShapePy::Type)));
}
// explicit template instantiation
template class PartExport ExtensionObject<Part::TopoShapePy>;
}

View File

@@ -29,10 +29,7 @@
namespace Py {
typedef ExtensionObject<Part::TopoShapePy> TopoShape;
template<>
bool TopoShape::accepts (PyObject *pyob) const
{
return (pyob && PyObject_TypeCheck(pyob, &(Part::TopoShapePy::Type)));
}
bool TopoShape::accepts (PyObject *pyob) const;
}
#endif //PART_PYCXX_H