summaryrefslogtreecommitdiff
path: root/pyuno/source/module/pyuno_except.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_except.cxx
parentd269a182506cad8f11e9631229d4dc20f5e33abe (diff)
Janitorial: remove unnecessary const_casts
The python C API has consts at these places
Diffstat (limited to 'pyuno/source/module/pyuno_except.cxx')
-rw-r--r--pyuno/source/module/pyuno_except.cxx26
1 files changed, 13 insertions, 13 deletions
diff --git a/pyuno/source/module/pyuno_except.cxx b/pyuno/source/module/pyuno_except.cxx
index 16aed8935e4f..97b876fbcc31 100644
--- a/pyuno/source/module/pyuno_except.cxx
+++ b/pyuno/source/module/pyuno_except.cxx
@@ -174,7 +174,7 @@ static PyRef createClass( const OUString & name, const Runtime &runtime )
if( isInterface )
{
PyObject_SetAttrString(
- ret.get(), const_cast< char * >("__pyunointerface__"),
+ ret.get(), "__pyunointerface__",
ustring2PyString(name).get() );
}
else
@@ -186,23 +186,23 @@ static PyRef createClass( const OUString & name, const Runtime &runtime )
PyRef eq = getObjectFromUnoModule( runtime,"_uno_struct__eq__" );
PyObject_SetAttrString(
- ret.get(), const_cast< char * >("__pyunostruct__"),
+ ret.get(), "__pyunostruct__",
ustring2PyString(name).get() );
PyObject_SetAttrString(
- ret.get(), const_cast< char * >("typeName"),
+ ret.get(), "typeName",
ustring2PyString(name).get() );
PyObject_SetAttrString(
- ret.get(), const_cast< char * >("__init__"), ctor.get() );
+ ret.get(), "__init__", ctor.get() );
PyObject_SetAttrString(
- ret.get(), const_cast< char * >("__getattr__"), getter.get() );
+ ret.get(), "__getattr__", getter.get() );
PyObject_SetAttrString(
- ret.get(), const_cast< char * >("__setattr__"), setter.get() );
+ ret.get(), "__setattr__", setter.get() );
PyObject_SetAttrString(
- ret.get(), const_cast< char * >("__repr__"), repr.get() );
+ ret.get(), "__repr__", repr.get() );
PyObject_SetAttrString(
- ret.get(), const_cast< char * >("__str__"), repr.get() );
+ ret.get(), "__str__", repr.get() );
PyObject_SetAttrString(
- ret.get(), const_cast< char * >("__eq__"), eq.get() );
+ ret.get(), "__eq__", eq.get() );
}
return ret;
}
@@ -210,10 +210,10 @@ static PyRef createClass( const OUString & name, const Runtime &runtime )
bool isInstanceOfStructOrException( PyObject *obj)
{
PyRef attr(
- PyObject_GetAttrString(obj, const_cast< char * >("__class__")),
+ PyObject_GetAttrString(obj, "__class__"),
SAL_NO_ACQUIRE );
return PyObject_HasAttrString(
- attr.get(), const_cast< char * >("__pyunostruct__"));
+ attr.get(), "__pyunostruct__");
}
sal_Bool isInterfaceClass( const Runtime &runtime, PyObject * obj )
@@ -233,11 +233,11 @@ PyRef getClass( const OUString & name , const Runtime &runtime)
ret = createClass( name, runtime );
cargo->exceptionMap[name] = ret;
if( PyObject_HasAttrString(
- ret.get(), const_cast< char * >("__pyunointerface__") ) )
+ ret.get(), "__pyunointerface__" ) )
cargo->interfaceSet.insert( ret );
PyObject_SetAttrString(
- ret.get(), const_cast< char * >("__pyunointerface__"),
+ ret.get(), "__pyunointerface__",
ustring2PyString(name).get() );
}
else