summaryrefslogtreecommitdiff
path: root/bridges
diff options
context:
space:
mode:
authorRüdiger Timm <rt@openoffice.org>2006-05-02 11:02:54 +0000
committerRüdiger Timm <rt@openoffice.org>2006-05-02 11:02:54 +0000
commit16e0b8d0848331f11729a67fc0c171537a2adc64 (patch)
tree0bdee46682031579cb43fb79257448683d9ea411 /bridges
parent71a538e53034ddc759b67b5542803ed0bbdcde2a (diff)
INTEGRATION: CWS mhu12 (1.9.26); FILE MERGED
2006/04/19 12:55:31 sb 1.9.26.1: #i47132# Adapted to new functionality from rtl/alloc.h to obtain executable memory for the raw vtable blocks (which contain code snippets together with the vtables).
Diffstat (limited to 'bridges')
-rw-r--r--bridges/source/cpp_uno/gcc3_linux_sparc/cpp2uno.cxx26
1 files changed, 14 insertions, 12 deletions
diff --git a/bridges/source/cpp_uno/gcc3_linux_sparc/cpp2uno.cxx b/bridges/source/cpp_uno/gcc3_linux_sparc/cpp2uno.cxx
index e10c9fda2b48..8aa8dfee2af6 100644
--- a/bridges/source/cpp_uno/gcc3_linux_sparc/cpp2uno.cxx
+++ b/bridges/source/cpp_uno/gcc3_linux_sparc/cpp2uno.cxx
@@ -4,9 +4,9 @@
*
* $RCSfile: cpp2uno.cxx,v $
*
- * $Revision: 1.9 $
+ * $Revision: 1.10 $
*
- * last change: $Author: obo $ $Date: 2005-12-21 15:38:28 $
+ * last change: $Author: rt $ $Date: 2006-05-02 12:02:54 $
*
* The Contents of this file are made available subject to
* the terms of GNU Lesser General Public License Version 2.1.
@@ -488,20 +488,22 @@ unsigned char * codeSnippet(
} //end of namespace
-void ** bridges::cpp_uno::shared::VtableFactory::mapBlockToVtable(char * block)
+void ** bridges::cpp_uno::shared::VtableFactory::mapBlockToVtable(void * block)
{
- return reinterpret_cast< void ** >(block) + 2;
+ return static_cast< void ** >(block) + 2;
}
-char * bridges::cpp_uno::shared::VtableFactory::createBlock(
- sal_Int32 slotCount, void *** slots)
+sal_Size bridges::cpp_uno::shared::VtableFactory::getBlockSize(
+ sal_Int32 slotCount)
{
- char * block = new char[
- (slotCount + 2) * sizeof (void *) + slotCount * codeSnippetSize];
- *slots = mapBlockToVtable(block);
- (*slots)[-2] = 0; //null
- (*slots)[-1] = 0; //destructor
- return block;
+ return (slotCount + 2) * sizeof (void *) + slotCount * codeSnippetSize;
+}
+
+void ** bridges::cpp_uno::shared::VtableFactory::initializeBlock(void * block) {
+ void ** slots = mapBlockToVtable(block);
+ slots[-2] = 0; //null
+ slots[-1] = 0; //destructor
+ return slots;
}
unsigned char * bridges::cpp_uno::shared::VtableFactory::addLocalFunctions(