diff --git a/src/Mod/Points/App/PointsPy.xml b/src/Mod/Points/App/PointsPy.xml
index af555c8b3..5508183d6 100644
--- a/src/Mod/Points/App/PointsPy.xml
+++ b/src/Mod/Points/App/PointsPy.xml
@@ -58,7 +58,7 @@ transforming and much more.
Return the number of vertices of the points object.
-
+
diff --git a/src/Mod/Points/App/PointsPyImp.cpp b/src/Mod/Points/App/PointsPyImp.cpp
index 4b22b6ffa..f4f21d04e 100644
--- a/src/Mod/Points/App/PointsPyImp.cpp
+++ b/src/Mod/Points/App/PointsPyImp.cpp
@@ -67,9 +67,15 @@ int PointsPy::PyInit(PyObject* args, PyObject* /*kwd*/)
if (!addPoints(args))
return -1;
}
+#if PY_MAJOR_VERSION >= 3
+ else if (PyUnicode_Check(pcObj)) {
+ getPointKernelPtr()->load(PyUnicode_AsUTF8(pcObj));
+ }
+#else
else if (PyString_Check(pcObj)) {
getPointKernelPtr()->load(PyString_AsString(pcObj));
}
+#endif
else {
PyErr_SetString(PyExc_TypeError, "optional argument must be list, tuple or string");
return -1;
@@ -168,7 +174,7 @@ PyObject* PointsPy::addPoints(PyObject * args)
Py_Return;
}
-
+
PyObject* PointsPy::fromSegment(PyObject * args)
{
PyObject *obj;
@@ -216,10 +222,10 @@ PyObject* PointsPy::fromValid(PyObject * args)
return 0;
}
}
-
-Py::Int PointsPy::getCountPoints(void) const
+
+Py::Long PointsPy::getCountPoints(void) const
{
- return Py::Int((long)getPointKernelPtr()->size());
+ return Py::Long((long)getPointKernelPtr()->size());
}
Py::List PointsPy::getPoints(void) const