Path: py3 fixes

Needed for unit tests to pass
This commit is contained in:
Peter Lama
2017-06-15 16:38:22 -04:00
committed by wmayer
parent f6a086dde0
commit 17031e2a24
7 changed files with 62 additions and 39 deletions

View File

@@ -179,7 +179,7 @@ PyObject* PathPy::toGCode(PyObject * args)
if (PyArg_ParseTuple(args, "")) {
std::string result = getToolpathPtr()->toGCode();
#if PY_MAJOR_VERSION >= 3
return PyBytes_FromString(result.c_str());
return PyUnicode_FromString(result.c_str());
#else
return PyString_FromString(result.c_str());
#endif