diff options
Diffstat (limited to 'pyuno/source/module/pyuno_type.cxx')
-rw-r--r-- | pyuno/source/module/pyuno_type.cxx | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/pyuno/source/module/pyuno_type.cxx b/pyuno/source/module/pyuno_type.cxx index 3f9f00446101..8dac1a16e1fb 100644 --- a/pyuno/source/module/pyuno_type.cxx +++ b/pyuno/source/module/pyuno_type.cxx @@ -147,7 +147,7 @@ PyRef getAnyClass( const Runtime & r ) sal_Unicode PyChar2Unicode( PyObject *obj ) throw ( RuntimeException ) { - PyRef value( PyObject_GetAttrString( obj, const_cast< char * >("value") ), SAL_NO_ACQUIRE ); + PyRef value( PyObject_GetAttrString( obj, "value" ), SAL_NO_ACQUIRE ); if( ! PyUnicode_Check( value.get() ) ) { throw RuntimeException( @@ -169,8 +169,8 @@ sal_Unicode PyChar2Unicode( PyObject *obj ) throw ( RuntimeException ) Any PyEnum2Enum( PyObject *obj ) throw ( RuntimeException ) { Any ret; - PyRef typeName( PyObject_GetAttrString( obj,const_cast< char * >("typeName") ), SAL_NO_ACQUIRE); - PyRef value( PyObject_GetAttrString( obj, const_cast< char * >("value") ), SAL_NO_ACQUIRE); + PyRef typeName( PyObject_GetAttrString( obj,"typeName" ), SAL_NO_ACQUIRE); + PyRef value( PyObject_GetAttrString( obj, "value" ), SAL_NO_ACQUIRE); if( !PyString_Check( typeName.get() ) || ! PyString_Check( value.get() ) ) { throw RuntimeException( @@ -226,7 +226,7 @@ Any PyEnum2Enum( PyObject *obj ) throw ( RuntimeException ) Type PyType2Type( PyObject * o ) throw(RuntimeException ) { - PyRef pyName( PyObject_GetAttrString( o, const_cast< char * >("typeName") ), SAL_NO_ACQUIRE); + PyRef pyName( PyObject_GetAttrString( o, "typeName" ), SAL_NO_ACQUIRE); if( !PyString_Check( pyName.get() ) ) { throw RuntimeException( @@ -234,7 +234,7 @@ Type PyType2Type( PyObject * o ) throw(RuntimeException ) Reference< XInterface > () ); } - PyRef pyTC( PyObject_GetAttrString( o, const_cast< char * >("typeClass") ), SAL_NO_ACQUIRE ); + PyRef pyTC( PyObject_GetAttrString( o, "typeClass" ), SAL_NO_ACQUIRE ); Any enumValue = PyEnum2Enum( pyTC.get() ); OUString name( OUString::createFromAscii( PyString_AsString( pyName.get() ) ) ); @@ -277,7 +277,7 @@ PyObject *importToGlobal(PyObject *str, PyObject *dict, PyObject *target) PyRef typesModule( PyDict_GetItemString( dict, "unotypes" ) ); if( ! typesModule.is() || ! PyModule_Check( typesModule.get() )) { - typesModule = PyRef( PyModule_New( const_cast< char * >("unotypes") ), SAL_NO_ACQUIRE ); + typesModule = PyRef( PyModule_New( "unotypes" ), SAL_NO_ACQUIRE ); Py_INCREF( typesModule.get() ); PyDict_SetItemString( dict, "unotypes" , typesModule.get() ); } |