summaryrefslogtreecommitdiff
path: root/pyuno/source/module/pyuno_module.cxx
diff options
context:
space:
mode:
authorLionel Elie Mamane <lionel@mamane.lu>2011-08-20 17:33:37 +0200
committerLionel Elie Mamane <lionel@mamane.lu>2011-08-21 01:46:09 +0200
commit58aa95c94459aec8cb467f3d6ec8ac9491c7a46c (patch)
treec7602c890b3a972d18e5d92d279fcdd0fd76dbc8 /pyuno/source/module/pyuno_module.cxx
parentd269a182506cad8f11e9631229d4dc20f5e33abe (diff)
Janitorial: remove unnecessary const_casts
The python C API has consts at these places
Diffstat (limited to 'pyuno/source/module/pyuno_module.cxx')
-rw-r--r--pyuno/source/module/pyuno_module.cxx36
1 files changed, 18 insertions, 18 deletions
diff --git a/pyuno/source/module/pyuno_module.cxx b/pyuno/source/module/pyuno_module.cxx
index 973ef00c8b2e..a4144d91b77d 100644
--- a/pyuno/source/module/pyuno_module.cxx
+++ b/pyuno/source/module/pyuno_module.cxx
@@ -447,7 +447,7 @@ static PyObject *getTypeByName( PyObject *, PyObject *args )
{
char *name;
- if (PyArg_ParseTuple (args, const_cast< char * >("s"), &name))
+ if (PyArg_ParseTuple (args, "s", &name))
{
OUString typeName ( OUString::createFromAscii( name ) );
TypeDescription typeDesc( typeName );
@@ -479,7 +479,7 @@ static PyObject *getConstantByName( PyObject *, PyObject *args )
{
char *name;
- if (PyArg_ParseTuple (args, const_cast< char * >("s"), &name))
+ if (PyArg_ParseTuple (args, "s", &name))
{
OUString typeName ( OUString::createFromAscii( name ) );
Runtime runtime;
@@ -801,21 +801,21 @@ static PyObject *setCurrentContext( PyObject *, PyObject * args )
struct PyMethodDef PyUNOModule_methods [] =
{
- {const_cast< char * >("getComponentContext"), getComponentContext, METH_VARARGS, NULL},
- {const_cast< char * >("_createUnoStructHelper"), reinterpret_cast<PyCFunction>(createUnoStructHelper), METH_VARARGS | METH_KEYWORDS, NULL},
- {const_cast< char * >("getTypeByName"), getTypeByName, METH_VARARGS, NULL},
- {const_cast< char * >("getConstantByName"), getConstantByName, METH_VARARGS, NULL},
- {const_cast< char * >("getClass"), getClass, METH_VARARGS, NULL},
- {const_cast< char * >("checkEnum"), checkEnum, METH_VARARGS, NULL},
- {const_cast< char * >("checkType"), checkType, METH_VARARGS, NULL},
- {const_cast< char * >("generateUuid"), generateUuid, METH_VARARGS, NULL},
- {const_cast< char * >("systemPathToFileUrl"), systemPathToFileUrl, METH_VARARGS, NULL},
- {const_cast< char * >("fileUrlToSystemPath"), fileUrlToSystemPath, METH_VARARGS, NULL},
- {const_cast< char * >("absolutize"), absolutize, METH_VARARGS | METH_KEYWORDS, NULL},
- {const_cast< char * >("isInterface"), isInterface, METH_VARARGS, NULL},
- {const_cast< char * >("invoke"), invoke, METH_VARARGS | METH_KEYWORDS, NULL},
- {const_cast< char * >("setCurrentContext"), setCurrentContext, METH_VARARGS, NULL},
- {const_cast< char * >("getCurrentContext"), getCurrentContext, METH_VARARGS, NULL},
+ {"getComponentContext", getComponentContext, METH_VARARGS, NULL},
+ {"_createUnoStructHelper", reinterpret_cast<PyCFunction>(createUnoStructHelper), METH_VARARGS | METH_KEYWORDS, NULL},
+ {"getTypeByName", getTypeByName, METH_VARARGS, NULL},
+ {"getConstantByName", getConstantByName, METH_VARARGS, NULL},
+ {"getClass", getClass, METH_VARARGS, NULL},
+ {"checkEnum", checkEnum, METH_VARARGS, NULL},
+ {"checkType", checkType, METH_VARARGS, NULL},
+ {"generateUuid", generateUuid, METH_VARARGS, NULL},
+ {"systemPathToFileUrl", systemPathToFileUrl, METH_VARARGS, NULL},
+ {"fileUrlToSystemPath", fileUrlToSystemPath, METH_VARARGS, NULL},
+ {"absolutize", absolutize, METH_VARARGS | METH_KEYWORDS, NULL},
+ {"isInterface", isInterface, METH_VARARGS, NULL},
+ {"invoke", invoke, METH_VARARGS | METH_KEYWORDS, NULL},
+ {"setCurrentContext", setCurrentContext, METH_VARARGS, NULL},
+ {"getCurrentContext", getCurrentContext, METH_VARARGS, NULL},
{NULL, NULL, 0, NULL}
};
@@ -845,7 +845,7 @@ PyObject* PyInit_pyuno()
void initpyuno()
{
PyEval_InitThreads();
- Py_InitModule (const_cast< char * >("pyuno"), PyUNOModule_methods);
+ Py_InitModule ("pyuno", PyUNOModule_methods);
}
#endif /* PY_MAJOR_VERSION >= 3 */