summaryrefslogtreecommitdiff
path: root/bridges/source/jni_uno/jni_java2uno.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'bridges/source/jni_uno/jni_java2uno.cxx')
-rw-r--r--bridges/source/jni_uno/jni_java2uno.cxx42
1 files changed, 0 insertions, 42 deletions
diff --git a/bridges/source/jni_uno/jni_java2uno.cxx b/bridges/source/jni_uno/jni_java2uno.cxx
index 079695405d56..98fb8f5bcd00 100644
--- a/bridges/source/jni_uno/jni_java2uno.cxx
+++ b/bridges/source/jni_uno/jni_java2uno.cxx
@@ -178,11 +178,7 @@ jobject Bridge::call_uno(
break;
}
-#ifdef BROKEN_ALLOCA
- char * mem = static_cast<char *>(malloc(
-#else
char * mem = static_cast<char *>(alloca(
-#endif
(nParams * sizeof (void *)) +
return_size + (nParams * sizeof (largest)) ));
void ** uno_args = reinterpret_cast<void **>(mem);
@@ -203,11 +199,7 @@ jobject Bridge::call_uno(
TypeDescr td( type );
if (sal::static_int_cast< sal_uInt32 >(td.get()->nSize)
> sizeof (largest))
-#ifdef BROKEN_ALLOCA
- uno_args[ nPos ] = malloc( td.get()->nSize );
-#else
uno_args[ nPos ] = alloca( td.get()->nSize );
-#endif
}
if (param.bIn)
@@ -235,14 +227,7 @@ jobject Bridge::call_uno(
uno_type_destructData(
uno_args[ n ], p.pTypeRef, nullptr );
}
-#ifdef BROKEN_ALLOCA
- if (uno_args[ nPos ] && uno_args[ nPos ] != &uno_args_mem[ nPos ])
- free( uno_args[ nPos ] );
-#endif
}
-#ifdef BROKEN_ALLOCA
- free( mem );
-#endif
throw;
}
}
@@ -281,16 +266,9 @@ jobject Bridge::call_uno(
{
uno_type_destructData(
uno_args[ n ], pParams[ n ].pTypeRef, nullptr );
-#ifdef BROKEN_ALLOCA
- if (uno_args[ nPos ] && uno_args[ nPos ] != &uno_args_mem[ nPos ])
- free( uno_args[ nPos ] );
-#endif
}
// cleanup uno return value
uno_type_destructData( uno_ret, return_type, nullptr );
-#ifdef BROKEN_ALLOCA
- free( mem );
-#endif
throw;
}
}
@@ -298,10 +276,6 @@ jobject Bridge::call_uno(
typelib_TypeClass_ENUM != type->eTypeClass) // opt
{
uno_type_destructData( uno_args[ nPos ], type, nullptr );
-#ifdef BROKEN_ALLOCA
- if (uno_args[ nPos ] && uno_args[ nPos ] != &uno_args_mem[ nPos ])
- free( uno_args[ nPos ] );
-#endif
}
}
@@ -319,9 +293,6 @@ jobject Bridge::call_uno(
catch (...)
{
uno_type_destructData( uno_ret, return_type, nullptr );
-#ifdef BROKEN_ALLOCA
- free( mem );
-#endif
throw;
}
if (typelib_TypeClass_DOUBLE < return_type->eTypeClass &&
@@ -329,14 +300,8 @@ jobject Bridge::call_uno(
{
uno_type_destructData( uno_ret, return_type, nullptr );
}
-#ifdef BROKEN_ALLOCA
- free( mem );
-#endif
return java_ret.l;
}
-#ifdef BROKEN_ALLOCA
- free( mem );
-#endif
return nullptr; // void return
}
else // exception occurred
@@ -347,16 +312,9 @@ jobject Bridge::call_uno(
typelib_MethodParameter const & param = pParams[ nPos ];
if (param.bIn)
uno_type_destructData( uno_args[ nPos ], param.pTypeRef, nullptr );
-#ifdef BROKEN_ALLOCA
- if (uno_args[ nPos ] && uno_args[ nPos ] != &uno_args_mem[ nPos ])
- free( uno_args[ nPos ] );
-#endif
}
handle_uno_exc( jni, uno_exc );
-#ifdef BROKEN_ALLOCA
- free( mem );
-#endif
return nullptr;
}
}