summaryrefslogtreecommitdiff
path: root/bridges
diff options
context:
space:
mode:
authorOliver Bolte <obo@openoffice.org>2008-02-27 09:01:48 +0000
committerOliver Bolte <obo@openoffice.org>2008-02-27 09:01:48 +0000
commit75f8c42dafaae1f8d376a5cd11f4d33e8a05fe2b (patch)
treec9d9d0a25fcb3c8a38ee2559644d2891478824ed /bridges
parent5d9c5ce4d098e200fedd2630a185ecafb7d800bc (diff)
INTEGRATION: CWS ia64port01_DEV300 (1.3.20); FILE MERGED
2008/02/18 11:07:00 cmc 1.3.20.1: #i84999# follow sb's suggested pattern, stage 1, gcc3_os2_*
Diffstat (limited to 'bridges')
-rw-r--r--bridges/source/cpp_uno/gcc3_os2_intel/cpp2uno.cxx36
1 files changed, 22 insertions, 14 deletions
diff --git a/bridges/source/cpp_uno/gcc3_os2_intel/cpp2uno.cxx b/bridges/source/cpp_uno/gcc3_os2_intel/cpp2uno.cxx
index b227c8f420f8..f5d373e97c69 100644
--- a/bridges/source/cpp_uno/gcc3_os2_intel/cpp2uno.cxx
+++ b/bridges/source/cpp_uno/gcc3_os2_intel/cpp2uno.cxx
@@ -4,9 +4,9 @@
*
* $RCSfile: cpp2uno.cxx,v $
*
- * $Revision: 1.3 $
+ * $Revision: 1.4 $
*
- * last change: $Author: vg $ $Date: 2007-09-25 09:33:55 $
+ * last change: $Author: obo $ $Date: 2008-02-27 10:01:48 $
*
* The Contents of this file are made available subject to
* the terms of GNU Lesser General Public License Version 2.1.
@@ -453,29 +453,37 @@ unsigned char * codeSnippet(
}
-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)
{
+ (*slots) -= functionCount;
+ Slot * s = *slots;
for (sal_Int32 i = 0; i < type->nMembers; ++i) {
typelib_TypeDescription * member = 0;
TYPELIB_DANGER_GET(&member, type->ppMembers[i]);
@@ -483,7 +491,7 @@ unsigned char * bridges::cpp_uno::shared::VtableFactory::addLocalFunctions(
switch (member->eTypeClass) {
case typelib_TypeClass_INTERFACE_ATTRIBUTE:
// Getter:
- *slots++ = code;
+ (s++)->fn = code;
code = codeSnippet(
code, functionOffset++, vtableOffset,
bridges::cpp_uno::shared::isSimpleType(
@@ -495,13 +503,13 @@ 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;
code = codeSnippet(
code, functionOffset++, vtableOffset,
bridges::cpp_uno::shared::isSimpleType(