+ Prefer prefix ++/-- operators for non-primitive types

This commit is contained in:
wmayer
2015-10-07 14:29:49 +02:00
parent b7be7aec13
commit 7ca6bb4072
5 changed files with 21 additions and 21 deletions

View File

@@ -80,8 +80,8 @@ PyMethodDef Application::Methods[] = {
"Get the name of the module that can export the filetype"},
{"getResourceDir", (PyCFunction) Application::sGetResourceDir ,1,
"Get the root directory of all resources"},
{"getUserAppDataDir", (PyCFunction) Application::sGetUserAppDataDir ,1,
"Get the root directory of user settings"},
{"getUserAppDataDir", (PyCFunction) Application::sGetUserAppDataDir ,1,
"Get the root directory of user settings"},
{"getHomePath", (PyCFunction) Application::sGetHomePath ,1,
"Get the home path, i.e. the parent directory of the executable"},
@@ -360,7 +360,7 @@ PyObject* Application::sDumpConfig(PyObject * /*self*/, PyObject *args,PyObject
PyObject *dict = PyDict_New();
for (std::map<std::string,std::string>::iterator It= GetApplication()._mConfig.begin();
It!=GetApplication()._mConfig.end();It++) {
It!=GetApplication()._mConfig.end();++It) {
PyDict_SetItemString(dict,It->first.c_str(), PyString_FromString(It->second.c_str()));
}
return dict;
@@ -527,15 +527,15 @@ PyObject* Application::sGetResourceDir(PyObject * /*self*/, PyObject *args,PyObj
return Py::new_reference_to(datadir);
}
PyObject* Application::sGetUserAppDataDir(PyObject * /*self*/, PyObject *args,PyObject * /*kwd*/)
{
if (!PyArg_ParseTuple(args, "")) // convert args: Python->C
return NULL; // NULL triggers exception
Py::String user_data_dir(Application::getUserAppDataDir(),"utf-8");
return Py::new_reference_to(user_data_dir);
}
PyObject* Application::sGetUserAppDataDir(PyObject * /*self*/, PyObject *args,PyObject * /*kwd*/)
{
if (!PyArg_ParseTuple(args, "")) // convert args: Python->C
return NULL; // NULL triggers exception
Py::String user_data_dir(Application::getUserAppDataDir(),"utf-8");
return Py::new_reference_to(user_data_dir);
}
PyObject* Application::sGetHomePath(PyObject * /*self*/, PyObject *args,PyObject * /*kwd*/)
{
if (!PyArg_ParseTuple(args, "")) // convert args: Python->C