summaryrefslogtreecommitdiff
path: root/pyuno/source
diff options
context:
space:
mode:
authorJörg Budischewski <jbu@openoffice.org>2003-05-24 10:00:56 +0000
committerJörg Budischewski <jbu@openoffice.org>2003-05-24 10:00:56 +0000
commite0a1cd4dc7202795e4a60c73ea1608d86984add7 (patch)
treeafef09c5565055d3e7cabfdf2c4276cb17c23f01 /pyuno/source
parente8fa63cb4c6e632b8d80748b26ea884dc1c38901 (diff)
fixed a deadlock
Diffstat (limited to 'pyuno/source')
-rw-r--r--pyuno/source/module/pyuno.cxx21
1 files changed, 16 insertions, 5 deletions
diff --git a/pyuno/source/module/pyuno.cxx b/pyuno/source/module/pyuno.cxx
index df19b8e36f71..0b9b99679e2e 100644
--- a/pyuno/source/module/pyuno.cxx
+++ b/pyuno/source/module/pyuno.cxx
@@ -2,9 +2,9 @@
*
* $RCSfile: pyuno.cxx,v $
*
- * $Revision: 1.1 $
+ * $Revision: 1.2 $
*
- * last change: $Author: jbu $ $Date: 2003-03-23 12:12:55 $
+ * last change: $Author: jbu $ $Date: 2003-05-24 11:00:56 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -377,6 +377,7 @@ PyObject *PyUNO_str( PyObject * self )
Reference< XMaterialHolder > rHolder(me->members->xInvocation,UNO_QUERY);
if( rHolder.is() )
{
+ PyThreadDetach antiguard;
Any a = rHolder->getMaterial();
OUString s = val2str( (void*) a.getValue(), a.getValueType().getTypeLibType() );
buf.append( OUStringToOString(s,RTL_TEXTENCODING_ASCII_US) );
@@ -385,7 +386,7 @@ PyObject *PyUNO_str( PyObject * self )
else
{
// a common UNO object
-
+ PyThreadDetach antiguard;
buf.append( "pyuno object " );
OUString s = val2str( (void*)me->members->wrappedObject.getValue(),
@@ -489,13 +490,23 @@ PyObject* PyUNO_getattr (PyObject* self, char* name)
if (me->members->xInvocation->hasProperty ( attrName))
{
//Return the value of the property
- PyRef ret = runtime.any2PyObject ( me->members->xInvocation->getValue (attrName) );
+ Any anyRet;
+ {
+ PyThreadDetach antiguard;
+ anyRet = me->members->xInvocation->getValue (attrName);
+ }
+ PyRef ret = runtime.any2PyObject(anyRet);
Py_XINCREF( ret.get() );
return ret.get();
}
if (strcmp (name, "_print") == 0 && me->members->xInvocation->hasProperty (constPrint))
{
- PyRef ret = runtime.any2PyObject ( me->members->xInvocation->getValue(constPrint));
+ Any anyRet;
+ {
+ PyThreadDetach antiguard;
+ anyRet = me->members->xInvocation->getValue(constPrint);
+ }
+ PyRef ret = runtime.any2PyObject ( anyRet );
Py_XINCREF( ret.get() );
return ret.get();
}