Base: fix possible Python type mismatch for Base::Vector2dPy

when using FreeCAD as a pure Python module.

See forum topic: https://forum.freecadweb.org/viewtopic.php?f=10&t=67617
This commit is contained in:
wmayer
2022-03-31 15:08:48 +02:00
parent 19feabd072
commit f62a6c8658
2 changed files with 19 additions and 0 deletions

View File

@@ -51,6 +51,10 @@ inline Vector3<T> getVectorFromTuple(PyObject* o)
class BaseExport Vector2dPy : public Py::PythonClass<Vector2dPy>
{
public:
static Py::PythonType &behaviors();
static PyTypeObject *type_object();
static bool check( PyObject *p );
static Py::PythonClassObject<Vector2dPy> create(const Vector2d&);
static Py::PythonClassObject<Vector2dPy> create(double x, double y);
Vector2dPy(Py::PythonClassInstance *self, Py::Tuple &args, Py::Dict &kwds);