summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStephan Bergmann <sbergman@redhat.com>2015-03-26 15:29:57 +0100
committerStephan Bergmann <sbergman@redhat.com>2015-03-26 15:33:33 +0100
commit9bd2b842a5f332ac380c7447487078acc5732a29 (patch)
tree334c391c61afc7ccc41f0403974ea4ad295c5e0f
parentb857703113055388adb64f4cb67a9c3702ad9468 (diff)
const_cast: convert some C-style casts and remove some redundant ones
Change-Id: I71ebd11d850304772535cfb873086176d301172a
-rw-r--r--pyuno/source/loader/pyuno_loader.cxx4
-rw-r--r--pyuno/source/module/pyuno.cxx2
-rw-r--r--pyuno/source/module/pyuno_adapter.cxx8
-rw-r--r--pyuno/source/module/pyuno_type.cxx4
-rw-r--r--pyuno/source/module/pyuno_util.cxx2
5 files changed, 10 insertions, 10 deletions
diff --git a/pyuno/source/loader/pyuno_loader.cxx b/pyuno/source/loader/pyuno_loader.cxx
index e13f503a59f7..d23349d7e8ce 100644
--- a/pyuno/source/loader/pyuno_loader.cxx
+++ b/pyuno/source/loader/pyuno_loader.cxx
@@ -94,7 +94,7 @@ static PyRef getLoaderModule() throw( RuntimeException )
static PyRef getObjectFromLoaderModule( const char * func )
throw ( RuntimeException )
{
- PyRef object( PyDict_GetItemString(getLoaderModule().get(), (char*)func ) );
+ PyRef object( PyDict_GetItemString(getLoaderModule().get(), func ) );
if( !object.is() )
{
OUStringBuffer buf;
@@ -215,7 +215,7 @@ Reference< XInterface > CreateInstance( const Reference< XComponentContext > & c
#endif
#if PY_MAJOR_VERSION >= 3
- PyImport_AppendInittab( (char*)"pyuno", PyInit_pyuno );
+ PyImport_AppendInittab( "pyuno", PyInit_pyuno );
#else
PyImport_AppendInittab( (char*)"pyuno", initpyuno );
#endif
diff --git a/pyuno/source/module/pyuno.cxx b/pyuno/source/module/pyuno.cxx
index 518a5af6ec30..cc9555c0062a 100644
--- a/pyuno/source/module/pyuno.cxx
+++ b/pyuno/source/module/pyuno.cxx
@@ -365,7 +365,7 @@ PyObject *PyUNO_invoke( PyObject *object, const char *name , PyObject *args )
}
PyTuple_SetItem( paras.get(), i , element );
}
- callable = PyRef( PyObject_GetAttrString( object , (char*)name ), SAL_NO_ACQUIRE );
+ callable = PyRef( PyObject_GetAttrString( object , name ), SAL_NO_ACQUIRE );
if( !callable.is() )
return 0;
}
diff --git a/pyuno/source/module/pyuno_adapter.cxx b/pyuno/source/module/pyuno_adapter.cxx
index fe01dbe2e6fe..9c5fade9f870 100644
--- a/pyuno/source/module/pyuno_adapter.cxx
+++ b/pyuno/source/module/pyuno_adapter.cxx
@@ -223,7 +223,7 @@ Any Adapter::invoke( const OUString &aFunctionName,
}
// get callable
- PyRef method(PyObject_GetAttrString( mWrappedObject.get(), (char*)TO_ASCII(aFunctionName)),
+ PyRef method(PyObject_GetAttrString( mWrappedObject.get(), TO_ASCII(aFunctionName)),
SAL_NO_ACQUIRE);
raiseInvocationTargetExceptionWhenNeeded( runtime);
if( !method.is() )
@@ -359,7 +359,7 @@ void Adapter::setValue( const OUString & aPropertyName, const Any & value )
PyRef obj = runtime.any2PyObject( value );
PyObject_SetAttrString(
- mWrappedObject.get(), (char*)TO_ASCII(aPropertyName), obj.get() );
+ mWrappedObject.get(), TO_ASCII(aPropertyName), obj.get() );
raiseInvocationTargetExceptionWhenNeeded( runtime);
}
@@ -377,7 +377,7 @@ Any Adapter::getValue( const OUString & aPropertyName )
{
Runtime runtime;
PyRef pyRef(
- PyObject_GetAttrString( mWrappedObject.get(), (char*)TO_ASCII(aPropertyName) ),
+ PyObject_GetAttrString( mWrappedObject.get(), TO_ASCII(aPropertyName) ),
SAL_NO_ACQUIRE );
if (!pyRef.is() || PyErr_Occurred())
@@ -405,7 +405,7 @@ sal_Bool Adapter::hasProperty( const OUString & aPropertyName )
PyThreadAttach guard( mInterpreter );
{
bRet = PyObject_HasAttrString(
- mWrappedObject.get() , (char*) TO_ASCII( aPropertyName ));
+ mWrappedObject.get() , TO_ASCII( aPropertyName ));
}
return bRet;
}
diff --git a/pyuno/source/module/pyuno_type.cxx b/pyuno/source/module/pyuno_type.cxx
index 08f487a1289f..7b48e6c97d97 100644
--- a/pyuno/source/module/pyuno_type.cxx
+++ b/pyuno/source/module/pyuno_type.cxx
@@ -97,7 +97,7 @@ const char *typeClassToString( TypeClass t )
static PyRef getClass( const Runtime & r , const char * name)
{
- return PyRef( PyDict_GetItemString( r.getImpl()->cargo->getUnoModule().get(), (char*) name ) );
+ return PyRef( PyDict_GetItemString( r.getImpl()->cargo->getUnoModule().get(), name ) );
}
PyRef getTypeClass( const Runtime & r )
@@ -236,7 +236,7 @@ Type PyType2Type( PyObject * o ) throw(RuntimeException )
static PyObject* callCtor( const Runtime &r , const char * clazz, const PyRef & args )
{
- PyRef code( PyDict_GetItemString( r.getImpl()->cargo->getUnoModule().get(), (char*)clazz ) );
+ PyRef code( PyDict_GetItemString( r.getImpl()->cargo->getUnoModule().get(), clazz ) );
if( ! code.is() )
{
OStringBuffer buf;
diff --git a/pyuno/source/module/pyuno_util.cxx b/pyuno/source/module/pyuno_util.cxx
index ddfbb0aca534..356524fabf4f 100644
--- a/pyuno/source/module/pyuno_util.cxx
+++ b/pyuno/source/module/pyuno_util.cxx
@@ -102,7 +102,7 @@ OUString pyString2ustring( PyObject *pystr )
PyRef getObjectFromUnoModule( const Runtime &runtime, const char * func )
throw ( RuntimeException )
{
- PyRef object(PyDict_GetItemString( runtime.getImpl()->cargo->getUnoModule().get(), (char*)func ) );
+ PyRef object(PyDict_GetItemString( runtime.getImpl()->cargo->getUnoModule().get(), func ) );
if( !object.is() )
{
OUStringBuffer buf;