summaryrefslogtreecommitdiff
path: root/bridges
diff options
context:
space:
mode:
authorRüdiger Timm <rt@openoffice.org>2008-08-27 12:39:04 +0000
committerRüdiger Timm <rt@openoffice.org>2008-08-27 12:39:04 +0000
commit7acbf6d9a4253d58f8f59bea4f68071cb3f4e8c0 (patch)
treefba31c4b38b1bc29ec6266ca42b1187747681756 /bridges
parent95e62efda4a9c3a757f2a4f42287f6f2b5b101a3 (diff)
INTEGRATION: CWS sb91 (1.4.6); FILE MERGED
2008/07/16 06:51:36 sb 1.4.6.2: #i91567# the previous fix had to be improved further; all integral and pointer types need to be sign or zero extended to 64 bit 2008/07/14 13:29:07 sb 1.4.6.1: #i91567# apparently, SPARC 64 C++ ABI requires that small return types like unsigned char (sal_Bool) are returned zero extended
Diffstat (limited to 'bridges')
-rw-r--r--bridges/source/cpp_uno/cc5_solaris_sparc64/cpp2uno.cxx44
1 files changed, 39 insertions, 5 deletions
diff --git a/bridges/source/cpp_uno/cc5_solaris_sparc64/cpp2uno.cxx b/bridges/source/cpp_uno/cc5_solaris_sparc64/cpp2uno.cxx
index 296bb3cd04f6..ad40d673513f 100644
--- a/bridges/source/cpp_uno/cc5_solaris_sparc64/cpp2uno.cxx
+++ b/bridges/source/cpp_uno/cc5_solaris_sparc64/cpp2uno.cxx
@@ -8,7 +8,7 @@
*
* $RCSfile: cpp2uno.cxx,v $
*
- * $Revision: 1.4 $
+ * $Revision: 1.5 $
*
* This file is part of OpenOffice.org.
*
@@ -347,12 +347,49 @@ void call(
if (directReturn) {
if (rtd != NULL) {
switch (rtd->eTypeClass) {
+ case typelib_TypeClass_VOID:
+ break;
+ case typelib_TypeClass_BOOLEAN:
+ callStack[0] = *reinterpret_cast< sal_Bool * >(retbuf);
+ break;
+ case typelib_TypeClass_BYTE:
+ callStack[0] = *reinterpret_cast< sal_Int8 * >(retbuf);
+ break;
+ case typelib_TypeClass_SHORT:
+ callStack[0] = *reinterpret_cast< sal_Int16 * >(retbuf);
+ break;
+ case typelib_TypeClass_UNSIGNED_SHORT:
+ callStack[0] = *reinterpret_cast< sal_uInt16 * >(retbuf);
+ break;
+ case typelib_TypeClass_LONG:
+ case typelib_TypeClass_ENUM:
+ callStack[0] = *reinterpret_cast< sal_Int32 * >(retbuf);
+ break;
+ case typelib_TypeClass_UNSIGNED_LONG:
+ callStack[0] = *reinterpret_cast< sal_uInt32 * >(retbuf);
+ break;
+ case typelib_TypeClass_HYPER:
+ callStack[0] = *reinterpret_cast< sal_Int64 * >(retbuf);
+ break;
+ case typelib_TypeClass_UNSIGNED_HYPER:
+ callStack[0] = *reinterpret_cast< sal_uInt64 * >(retbuf);
+ break;
case typelib_TypeClass_FLOAT:
fp_loadf0(reinterpret_cast< float * >(retbuf));
break;
case typelib_TypeClass_DOUBLE:
fp_loadd0(reinterpret_cast< double * >(retbuf));
break;
+ case typelib_TypeClass_CHAR:
+ callStack[0] = *reinterpret_cast< sal_Unicode * >(retbuf);
+ break;
+ case typelib_TypeClass_STRING:
+ case typelib_TypeClass_TYPE:
+ case typelib_TypeClass_SEQUENCE:
+ case typelib_TypeClass_INTERFACE:
+ callStack[0] = reinterpret_cast< unsigned long >(
+ *reinterpret_cast< void ** >(retbuf));
+ break;
case typelib_TypeClass_STRUCT:
loadFpRegsFromStruct(rtd, retbuf);
// fall through
@@ -360,10 +397,7 @@ void call(
std::memcpy(callStack, retbuf, rtd->nSize);
break;
default:
- OSL_ASSERT(rtd->nSize <= 8);
- std::memcpy(
- reinterpret_cast< char * >(callStack) + (8 - rtd->nSize),
- retbuf, rtd->nSize);
+ OSL_ASSERT(false);
break;
}
}