summaryrefslogtreecommitdiff
path: root/pyuno
diff options
context:
space:
mode:
Diffstat (limited to 'pyuno')
-rw-r--r--pyuno/source/loader/pyuno_loader.cxx4
-rw-r--r--pyuno/source/module/pyuno_callable.cxx4
-rw-r--r--pyuno/source/module/pyuno_gc.cxx10
3 files changed, 18 insertions, 0 deletions
diff --git a/pyuno/source/loader/pyuno_loader.cxx b/pyuno/source/loader/pyuno_loader.cxx
index ffdb81143961..8f1a0f6a89a3 100644
--- a/pyuno/source/loader/pyuno_loader.cxx
+++ b/pyuno/source/loader/pyuno_loader.cxx
@@ -175,6 +175,8 @@ static void prependPythonPath( const OUString & pythonPathBootstrap )
osl_setEnvironment(envVar.pData, envValue.pData);
}
+namespace {
+
struct PythonInit
{
PythonInit() {
@@ -237,6 +239,8 @@ PythonInit() {
}
};
+}
+
static Reference<XInterface> CreateInstance(const Reference<XComponentContext> & ctx)
{
// tdf#114815 thread-safe static to init python only once
diff --git a/pyuno/source/module/pyuno_callable.cxx b/pyuno/source/module/pyuno_callable.cxx
index 656d1c84cb0e..9be3e1f1aef8 100644
--- a/pyuno/source/module/pyuno_callable.cxx
+++ b/pyuno/source/module/pyuno_callable.cxx
@@ -31,6 +31,8 @@ using com::sun::star::script::XInvocation2;
namespace pyuno
{
+namespace {
+
struct PyUNO_callable_Internals
{
Reference<XInvocation2> xInvocation;
@@ -44,6 +46,8 @@ struct PyUNO_callable
PyUNO_callable_Internals* members;
};
+}
+
static void PyUNO_callable_del (PyObject* self)
{
PyUNO_callable* me;
diff --git a/pyuno/source/module/pyuno_gc.cxx b/pyuno/source/module/pyuno_gc.cxx
index 1be9cd4ed69b..e4ed6cb9d0a6 100644
--- a/pyuno/source/module/pyuno_gc.cxx
+++ b/pyuno/source/module/pyuno_gc.cxx
@@ -28,6 +28,9 @@ namespace pyuno
{
static bool g_destructorsOfStaticObjectsHaveBeenCalled;
+
+namespace {
+
class StaticDestructorGuard
{
public:
@@ -36,6 +39,9 @@ public:
g_destructorsOfStaticObjectsHaveBeenCalled = true;
}
};
+
+}
+
static StaticDestructorGuard guard;
static bool isAfterUnloadOrPy_Finalize()
@@ -44,6 +50,8 @@ static bool isAfterUnloadOrPy_Finalize()
!Py_IsInitialized();
}
+namespace {
+
class GCThread: public salhelper::Thread {
public:
GCThread( PyInterpreterState *interpreter, PyObject * object );
@@ -57,6 +65,8 @@ private:
PyInterpreterState *mPyInterpreter;
};
+}
+
GCThread::GCThread( PyInterpreterState *interpreter, PyObject * object ) :
Thread( "pyunoGCThread" ), mPyObject( object ),
mPyInterpreter( interpreter )