summaryrefslogtreecommitdiff
path: root/pyuno/source/module/pyuno_gc.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'pyuno/source/module/pyuno_gc.cxx')
-rw-r--r--pyuno/source/module/pyuno_gc.cxx10
1 files changed, 10 insertions, 0 deletions
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 )