+ Prefer prefix ++/-- operators for non-primitive types
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user