summaryrefslogtreecommitdiffstats
path: root/pyuno/source/module/pyuno_module.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'pyuno/source/module/pyuno_module.cxx')
-rw-r--r--pyuno/source/module/pyuno_module.cxx29
1 files changed, 16 insertions, 13 deletions
diff --git a/pyuno/source/module/pyuno_module.cxx b/pyuno/source/module/pyuno_module.cxx
index fc0e9939506e..53527df35780 100644
--- a/pyuno/source/module/pyuno_module.cxx
+++ b/pyuno/source/module/pyuno_module.cxx
@@ -96,7 +96,7 @@ public:
, nPosConsumed (0)
{
if ( ! used )
- throw RuntimeException("pyuno._createUnoStructHelper failed to create new dictionary");
+ throw RuntimeException(u"pyuno._createUnoStructHelper failed to create new dictionary"_ustr);
}
~fillStructState()
{
@@ -196,21 +196,24 @@ void fillStruct(
}
}
-OUString getLibDir()
+OUString getLibDir();
+OUString getLibDirImpl()
{
- static OUString sLibDir = []() {
- OUString libDir;
+ OUString libDir;
- // workarounds the $(ORIGIN) until it is available
- if (Module::getUrlFromAddress(reinterpret_cast<oslGenericFunction>(getLibDir), libDir))
- {
- libDir = libDir.copy(0, libDir.lastIndexOf('/'));
- OUString name("PYUNOLIBDIR");
- rtl_bootstrap_set(name.pData, libDir.pData);
- }
- return libDir;
- }();
+ // workarounds the $(ORIGIN) until it is available
+ if (Module::getUrlFromAddress(reinterpret_cast<oslGenericFunction>(getLibDir), libDir))
+ {
+ libDir = libDir.copy(0, libDir.lastIndexOf('/'));
+ OUString name(u"PYUNOLIBDIR"_ustr);
+ rtl_bootstrap_set(name.pData, libDir.pData);
+ }
+ return libDir;
+}
+OUString getLibDir()
+{
+ static OUString sLibDir = getLibDirImpl();
return sLibDir;
}