Path: remove some more deprecated Py2 code

This commit is contained in:
wmayer
2021-04-26 11:11:35 +02:00
parent 322e027c2b
commit b84dcf9b27
6 changed files with 12 additions and 79 deletions

View File

@@ -204,11 +204,7 @@ PyObject* PathPy::toGCode(PyObject * args)
{
if (PyArg_ParseTuple(args, "")) {
std::string result = getToolpathPtr()->toGCode();
#if PY_MAJOR_VERSION >= 3
return PyUnicode_FromString(result.c_str());
#else
return PyString_FromString(result.c_str());
#endif
}
throw Py::TypeError("This method accepts no argument");
}