py3: ported Raytracing to python3

This commit is contained in:
wmayer
2016-01-23 17:13:22 +01:00
parent 165dcb97c2
commit ab383c1df6
3 changed files with 13 additions and 7 deletions

View File

@@ -201,8 +201,10 @@ private:
vecs[i][l] = PyFloat_AsDouble(temp);
else if (PyLong_Check(temp))
vecs[i][l] = (double) PyLong_AsLong(temp);
#if PY_MAJOR_VERSION < 3
else if (PyInt_Check(temp))
vecs[i][l] = (double) PyInt_AsLong(temp);
#endif
else
throw Py::ValueError("Wrong parameter format, four Tuple of three floats needed!");
}