summaryrefslogtreecommitdiff
path: root/pyuno
diff options
context:
space:
mode:
Diffstat (limited to 'pyuno')
-rw-r--r--pyuno/source/module/pyuno_impl.hxx5
-rw-r--r--pyuno/source/module/pyuno_module.cxx3
-rw-r--r--pyuno/source/module/pyuno_runtime.cxx4
-rw-r--r--pyuno/source/module/pyuno_util.cxx4
4 files changed, 9 insertions, 7 deletions
diff --git a/pyuno/source/module/pyuno_impl.hxx b/pyuno/source/module/pyuno_impl.hxx
index 6517884a01ef..e48dae7ce9ac 100644
--- a/pyuno/source/module/pyuno_impl.hxx
+++ b/pyuno/source/module/pyuno_impl.hxx
@@ -39,6 +39,7 @@
#include <pyuno.hxx>
+#include <string_view>
#include <unordered_map>
#include <unordered_set>
@@ -76,7 +77,7 @@ const sal_Int32 ARGS = 2;
}
bool isLog( RuntimeCargo const *cargo, sal_Int32 loglevel );
-void log( RuntimeCargo *cargo, sal_Int32 level, const OUString &logString );
+void log( RuntimeCargo *cargo, sal_Int32 level, std::u16string_view logString );
void log( RuntimeCargo *cargo, sal_Int32 level, const char *str );
void logCall( RuntimeCargo *cargo, const char *intro,
void * ptr, const OUString & aFunctionName,
@@ -168,7 +169,7 @@ typedef struct
} PyUNO_list_iterator;
PyRef ustring2PyUnicode( const OUString &source );
-PyRef ustring2PyString( const OUString & source );
+PyRef ustring2PyString( std::u16string_view source );
OUString pyString2ustring( PyObject *str );
/// @throws css::reflection::InvocationTargetException
diff --git a/pyuno/source/module/pyuno_module.cxx b/pyuno/source/module/pyuno_module.cxx
index cb2824d00005..4a9d1921386f 100644
--- a/pyuno/source/module/pyuno_module.cxx
+++ b/pyuno/source/module/pyuno_module.cxx
@@ -22,6 +22,7 @@
#include "pyuno_impl.hxx"
#include <cassert>
+#include <string_view>
#include <unordered_map>
#include <osl/module.hxx>
@@ -216,7 +217,7 @@ OUString getLibDir()
return sLibDir;
}
-void raisePySystemException( const char * exceptionType, const OUString & message )
+void raisePySystemException( const char * exceptionType, std::u16string_view message )
{
OString buf = OStringLiteral("Error during bootstrapping uno (") +
exceptionType +
diff --git a/pyuno/source/module/pyuno_runtime.cxx b/pyuno/source/module/pyuno_runtime.cxx
index 91005f1e13aa..961014ebc74b 100644
--- a/pyuno/source/module/pyuno_runtime.cxx
+++ b/pyuno/source/module/pyuno_runtime.cxx
@@ -474,8 +474,8 @@ PyRef Runtime::any2PyObject (const Any &a ) const
{
if( pEnumDesc->pEnumValues[i] == l )
{
- OString v = OUStringToOString( pEnumDesc->ppEnumNames[i], RTL_TEXTENCODING_ASCII_US);
- OString e = OUStringToOString( pEnumDesc->aBase.pTypeName, RTL_TEXTENCODING_ASCII_US);
+ OString v = OUStringToOString( OUString::unacquired(&pEnumDesc->ppEnumNames[i]), RTL_TEXTENCODING_ASCII_US);
+ OString e = OUStringToOString( OUString::unacquired(&pEnumDesc->aBase.pTypeName), RTL_TEXTENCODING_ASCII_US);
return PyRef( PyUNO_Enum_new(e.getStr(),v.getStr(), *this ), SAL_NO_ACQUIRE );
}
}
diff --git a/pyuno/source/module/pyuno_util.cxx b/pyuno/source/module/pyuno_util.cxx
index 77006c33acac..35b96183c739 100644
--- a/pyuno/source/module/pyuno_util.cxx
+++ b/pyuno/source/module/pyuno_util.cxx
@@ -48,7 +48,7 @@ PyRef ustring2PyUnicode( const OUString & str )
return ret;
}
-PyRef ustring2PyString( const OUString &str )
+PyRef ustring2PyString( std::u16string_view str )
{
OString o = OUStringToOString( str, osl_getThreadTextEncoding() );
return PyRef( PyUnicode_FromString( o.getStr() ), SAL_NO_ACQUIRE );
@@ -95,7 +95,7 @@ bool isLog( RuntimeCargo const * cargo, sal_Int32 loglevel )
return cargo && cargo->logFile && loglevel <= cargo->logLevel;
}
-void log( RuntimeCargo * cargo, sal_Int32 level, const OUString &logString )
+void log( RuntimeCargo * cargo, sal_Int32 level, std::u16string_view logString )
{
log( cargo, level, OUStringToOString( logString, osl_getThreadTextEncoding() ).getStr() );
}