summaryrefslogtreecommitdiff
path: root/bridges
diff options
context:
space:
mode:
authorOliver Bolte <obo@openoffice.org>2008-02-27 09:01:14 +0000
committerOliver Bolte <obo@openoffice.org>2008-02-27 09:01:14 +0000
commit5d9c5ce4d098e200fedd2630a185ecafb7d800bc (patch)
tree343aa6d67aca74782b830948ac9e6c65d91c933e /bridges
parente2f3a5356cd6f91e17d8d7f2269e6dd19cccdc88 (diff)
INTEGRATION: CWS ia64port01_DEV300 (1.9.54); FILE MERGED
2008/02/18 11:01:40 cmc 1.9.54.1: #i84999# follow sb's suggested pattern, stage 1, gcc3_macosx_*
Diffstat (limited to 'bridges')
-rw-r--r--bridges/source/cpp_uno/gcc3_macosx_powerpc/cpp2uno.cxx37
1 files changed, 22 insertions, 15 deletions
diff --git a/bridges/source/cpp_uno/gcc3_macosx_powerpc/cpp2uno.cxx b/bridges/source/cpp_uno/gcc3_macosx_powerpc/cpp2uno.cxx
index 526da44574ef..bc5e8514fabf 100644
--- a/bridges/source/cpp_uno/gcc3_macosx_powerpc/cpp2uno.cxx
+++ b/bridges/source/cpp_uno/gcc3_macosx_powerpc/cpp2uno.cxx
@@ -4,9 +4,9 @@
*
* $RCSfile: cpp2uno.cxx,v $
*
- * $Revision: 1.9 $
+ * $Revision: 1.10 $
*
- * last change: $Author: vg $ $Date: 2007-01-18 14:15:28 $
+ * last change: $Author: obo $ $Date: 2008-02-27 10:01:14 $
*
* The Contents of this file are made available subject to
* the terms of GNU Lesser General Public License Version 2.1.
@@ -655,30 +655,37 @@ void bridges::cpp_uno::shared::VtableFactory::flushCode(unsigned char const * bp
__asm__ volatile ( "sync;" "isync;" : : : "memory");
}
+struct bridges::cpp_uno::shared::VtableFactory::Slot { void * fn; };
-void ** bridges::cpp_uno::shared::VtableFactory::mapBlockToVtable(void * block)
+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;
// fprintf(stderr, "in addLocalFunctions functionOffset is %x\n",functionOffset);
// fprintf(stderr, "in addLocalFunctions vtableOffset is %x\n",vtableOffset);
@@ -691,7 +698,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(
@@ -704,13 +711,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(