summaryrefslogtreecommitdiff
path: root/bridges
diff options
context:
space:
mode:
authorOliver Bolte <obo@openoffice.org>2008-02-27 08:50:53 +0000
committerOliver Bolte <obo@openoffice.org>2008-02-27 08:50:53 +0000
commit4a22f421e4aa0658696e30be5a19f846dfaa831d (patch)
treee3e454e43208adc4de919e134e161ef62c3b8d29 /bridges
parent3270380c4c94d406ab9be60761624f457c11edd3 (diff)
INTEGRATION: CWS ia64port01_DEV300 (1.3.6); FILE MERGED
2008/02/18 10:40:36 cmc 1.3.6.1: #i84999# follow sb's suggested pattern, stage 1, gcc3_linux_*
Diffstat (limited to 'bridges')
-rw-r--r--bridges/source/cpp_uno/gcc3_linux_arm/cpp2uno.cxx38
1 files changed, 23 insertions, 15 deletions
diff --git a/bridges/source/cpp_uno/gcc3_linux_arm/cpp2uno.cxx b/bridges/source/cpp_uno/gcc3_linux_arm/cpp2uno.cxx
index 02f924e05752..43e588fd2295 100644
--- a/bridges/source/cpp_uno/gcc3_linux_arm/cpp2uno.cxx
+++ b/bridges/source/cpp_uno/gcc3_linux_arm/cpp2uno.cxx
@@ -4,9 +4,9 @@
*
* $RCSfile: cpp2uno.cxx,v $
*
- * $Revision: 1.3 $
+ * $Revision: 1.4 $
*
- * last change: $Author: kz $ $Date: 2007-12-12 15:34:25 $
+ * last change: $Author: obo $ $Date: 2008-02-27 09:50:53 $
*
* The Contents of this file are made available subject to
* the terms of GNU Lesser General Public License Version 2.1.
@@ -447,29 +447,37 @@ namespace
}
}
-void ** bridges::cpp_uno::shared::VtableFactory::mapBlockToVtable(void * block)
+struct bridges::cpp_uno::shared::VtableFactory::Slot { void * fn; };
+
+bridges::cpp_uno::shared::VtableFactory::Slot *
+bridges::cpp_uno::shared::VtableFactory::mapBlockToVtable(void * block)
{
- return static_cast< void ** >(block) + 2;
+ return static_cast< Slot * >(block) + 2;
}
sal_Size bridges::cpp_uno::shared::VtableFactory::getBlockSize(
sal_Int32 slotCount)
{
- return (slotCount + 2) * sizeof (void *) + slotCount * codeSnippetSize;
+ return (slotCount + 2) * sizeof (Slot) + slotCount * codeSnippetSize;
}
-void ** bridges::cpp_uno::shared::VtableFactory::initializeBlock(void * block) {
- void ** slots = mapBlockToVtable(block);
- slots[-2] = 0;
- slots[-1] = 0;
- return slots;
+bridges::cpp_uno::shared::VtableFactory::Slot *
+bridges::cpp_uno::shared::VtableFactory::initializeBlock(
+ void * block, sal_Int32 slotCount)
+{
+ Slot * slots = mapBlockToVtable(block);
+ slots[-2].fn = 0;
+ slots[-1].fn = 0;
+ return slots + slotCount;
}
unsigned char * bridges::cpp_uno::shared::VtableFactory::addLocalFunctions(
- void ** slots, unsigned char * code,
+ Slot ** slots, unsigned char * code,
typelib_InterfaceTypeDescription const * type, sal_Int32 functionOffset,
- sal_Int32 /*functionCount*/, sal_Int32 vtableOffset)
+ sal_Int32 functionCount, sal_Int32 vtableOffset)
{
+ (*slots) -= functionCount;
+ Slot * s = *slots;
for (sal_Int32 i = 0; i < type->nMembers; ++i)
{
typelib_TypeDescription * member = 0;
@@ -479,7 +487,7 @@ unsigned char * bridges::cpp_uno::shared::VtableFactory::addLocalFunctions(
{
case typelib_TypeClass_INTERFACE_ATTRIBUTE:
// Getter:
- *slots++ = code;
+ (s++)->fn = code;
code = codeSnippet(
code, functionOffset++, vtableOffset,
bridges::cpp_uno::shared::isSimpleType(
@@ -491,14 +499,14 @@ unsigned char * bridges::cpp_uno::shared::VtableFactory::addLocalFunctions(
typelib_InterfaceAttributeTypeDescription * >(
member)->bReadOnly)
{
- *slots++ = code;
+ (s++)->fn = code;
code = codeSnippet(
code, functionOffset++, vtableOffset, true);
}
break;
case typelib_TypeClass_INTERFACE_METHOD:
{
- *slots++ = code;
+ (s++)->fn = code;
typelib_InterfaceMethodTypeDescription *pMethodTD =
reinterpret_cast<