Kaydet (Commit) 91a17ad2 authored tarafından Ariel Constenla-Haile's avatar Ariel Constenla-Haile

i118798 - Fix Pyuno dead-lock

üst cdae5f1e
...@@ -363,20 +363,20 @@ Any Adapter::invoke( const OUString &aFunctionName, ...@@ -363,20 +363,20 @@ Any Adapter::invoke( const OUString &aFunctionName,
void Adapter::setValue( const OUString & aPropertyName, const Any & value ) void Adapter::setValue( const OUString & aPropertyName, const Any & value )
throw( UnknownPropertyException, CannotConvertException, InvocationTargetException,RuntimeException) throw( UnknownPropertyException, CannotConvertException, InvocationTargetException,RuntimeException)
{ {
if( !hasProperty( aPropertyName ) )
{
OUStringBuffer buf;
buf.appendAscii( "pyuno::Adapater: Property " ).append( aPropertyName );
buf.appendAscii( " is unknown." );
throw UnknownPropertyException( buf.makeStringAndClear(), Reference< XInterface > () );
}
PyThreadAttach guard( mInterpreter ); PyThreadAttach guard( mInterpreter );
try try
{ {
Runtime runtime; Runtime runtime;
PyRef obj = runtime.any2PyObject( value ); PyRef obj = runtime.any2PyObject( value );
if( !hasProperty( aPropertyName ) )
{
OUStringBuffer buf;
buf.appendAscii( "pyuno::Adapater: Property " ).append( aPropertyName );
buf.appendAscii( " is unknown." );
throw UnknownPropertyException( buf.makeStringAndClear(), Reference< XInterface > () );
}
PyObject_SetAttrString( PyObject_SetAttrString(
mWrappedObject.get(), (char*)TO_ASCII(aPropertyName), obj.get() ); mWrappedObject.get(), (char*)TO_ASCII(aPropertyName), obj.get() );
raiseInvocationTargetExceptionWhenNeeded( runtime); raiseInvocationTargetExceptionWhenNeeded( runtime);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment