summaryrefslogtreecommitdiff
path: root/pyuno
diff options
context:
space:
mode:
authorVladimir Glazunov <vg@openoffice.org>2009-11-24 16:10:44 +0100
committerVladimir Glazunov <vg@openoffice.org>2009-11-24 16:10:44 +0100
commit8fd3f31eb907c32d01f16e5d87ed0ed203db8e6e (patch)
treecbb7d952f717d8d28660440aac5ca0cd2d777a93 /pyuno
parente1704615dc732f1638489a9123408a3cf137ae77 (diff)
parent6fbe08854a2eea99e2d8700927209f7e0e5abdc8 (diff)
CWS-TOOLING: integrate CWS cmcfixes64
Notes
split repo tag: ure_ooo/DEV300_m66
Diffstat (limited to 'pyuno')
-rw-r--r--pyuno/source/loader/makefile.mk2
-rw-r--r--pyuno/source/module/makefile.mk2
-rw-r--r--pyuno/source/module/pyuno_gc.cxx10
3 files changed, 10 insertions, 4 deletions
diff --git a/pyuno/source/loader/makefile.mk b/pyuno/source/loader/makefile.mk
index 6e4f96ed7014..f9f00e4f13ae 100644
--- a/pyuno/source/loader/makefile.mk
+++ b/pyuno/source/loader/makefile.mk
@@ -42,7 +42,7 @@ DLLPRE =
#-------------------------------------------------------------------
-.IF "$(OS)$(CPU)$(COMEX)" == "SOLARISS4"
+.IF "$(OS)$(COMEX)" == "SOLARIS4"
# no -Bdirect for SunWS CC
DIRECT = $(LINKFLAGSDEFS)
.ENDIF
diff --git a/pyuno/source/module/makefile.mk b/pyuno/source/module/makefile.mk
index 2357d0062ed0..2928d29668aa 100644
--- a/pyuno/source/module/makefile.mk
+++ b/pyuno/source/module/makefile.mk
@@ -42,7 +42,7 @@ LINKFLAGSDEFS = # do not fail with missing symbols
.IF "$(L10N_framework)"==""
#-------------------------------------------------------------------
-.IF "$(OS)$(CPU)$(COMEX)" == "SOLARISS4"
+.IF "$(OS)$(COMEX)" == "SOLARIS4"
# no -Bdirect for SunWS CC
DIRECT = $(LINKFLAGSDEFS)
.ENDIF
diff --git a/pyuno/source/module/pyuno_gc.cxx b/pyuno/source/module/pyuno_gc.cxx
index 513c14a99378..1e0ca08ff954 100644
--- a/pyuno/source/module/pyuno_gc.cxx
+++ b/pyuno/source/module/pyuno_gc.cxx
@@ -43,6 +43,12 @@ public:
};
StaticDestructorGuard guard;
+static bool isAfterUnloadOrPy_Finalize()
+{
+ return g_destructorsOfStaticObjectsHaveBeenCalled ||
+ !Py_IsInitialized();
+}
+
class GCThread : public ::osl::Thread
{
PyObject *mPyObject;
@@ -64,7 +70,7 @@ GCThread::GCThread( PyInterpreterState *interpreter, PyObject * object ) :
void GCThread::run()
{
// otherwise we crash here, when main has been left already
- if( g_destructorsOfStaticObjectsHaveBeenCalled )
+ if( isAfterUnloadOrPy_Finalize() )
return;
try
{
@@ -100,7 +106,7 @@ void GCThread::onTerminated()
void decreaseRefCount( PyInterpreterState *interpreter, PyObject *object )
{
// otherwise we crash in the last after main ...
- if( g_destructorsOfStaticObjectsHaveBeenCalled )
+ if( isAfterUnloadOrPy_Finalize() )
return;
// delegate to a new thread, because there does not seem