py3: App: files D-Z ported to python3
issue 0000995 diff to py3-branch will remain in the following files in src/App: - ExtensionContainer.cpp - FeaturePythonPyImp.h +.inl most likely these files depend on Tools and Base
This commit is contained in:
@@ -244,7 +244,11 @@ PyObject *PropertyContainerPy::getCustomAttributes(const char* attr) const
|
||||
PyObject *dict = PyDict_New();
|
||||
if (dict) {
|
||||
for ( std::map<std::string,App::Property*>::iterator it = Map.begin(); it != Map.end(); ++it )
|
||||
#if PY_MAJOR_VERSION >= 3
|
||||
PyDict_SetItem(dict, PyUnicode_FromString(it->first.c_str()), PyUnicode_FromString(""));
|
||||
#else
|
||||
PyDict_SetItem(dict, PyString_FromString(it->first.c_str()), PyString_FromString(""));
|
||||
#endif
|
||||
if (PyErr_Occurred()) {
|
||||
Py_DECREF(dict);
|
||||
dict = NULL;
|
||||
|
||||
Reference in New Issue
Block a user