py3: path: some fixes to make path py3-compileable

This commit is contained in:
looooo
2017-05-05 15:30:13 +02:00
committed by wmayer
parent 6ba65d4d63
commit 226dd17e5f
4 changed files with 30 additions and 6 deletions

View File

@@ -92,9 +92,13 @@ static PyObject * areaGetParamsDesc(PyObject *, PyObject *args, PyObject *kwd) {
if (!PyArg_ParseTupleAndKeywords(args, kwd, "|O",kwlist,&pcObj))
return 0;
#if PY_MAJOR_VERSION < 3
if(PyObject_IsTrue(pcObj))
return PyString_FromString(PARAM_PY_DOC(NAME,AREA_PARAMS_STATIC_CONF));
#else
if(PyObject_IsTrue(pcObj))
return PyUnicode_FromString(PARAM_PY_DOC(NAME,AREA_PARAMS_STATIC_CONF));
#endif
PyObject *dict = PyDict_New();
PARAM_PY_DICT_SET_DOC(dict,NAME,AREA_PARAMS_STATIC_CONF)
return dict;