summaryrefslogtreecommitdiff
path: root/bridges/source/cpp_uno/gcc3_solaris_sparc
diff options
context:
space:
mode:
authorRĂ¼diger Timm <rt@openoffice.org>2006-05-02 11:06:16 +0000
committerRĂ¼diger Timm <rt@openoffice.org>2006-05-02 11:06:16 +0000
commit8979a8e5a8b52b94196cd58eddda80b25fd40cad (patch)
tree65f48ea6027a59342458a297b2e146889f471e9e /bridges/source/cpp_uno/gcc3_solaris_sparc
parent3b74909fbf493274b06470befafd808a38dd5134 (diff)
INTEGRATION: CWS mhu12 (1.4.20); FILE MERGED
2006/04/19 12:55:32 sb 1.4.20.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/source/cpp_uno/gcc3_solaris_sparc')
-rw-r--r--bridges/source/cpp_uno/gcc3_solaris_sparc/cpp2uno.cxx26
1 files changed, 14 insertions, 12 deletions
diff --git a/bridges/source/cpp_uno/gcc3_solaris_sparc/cpp2uno.cxx b/bridges/source/cpp_uno/gcc3_solaris_sparc/cpp2uno.cxx
index 5f7b2b51d9e5..214ecc48f479 100644
--- a/bridges/source/cpp_uno/gcc3_solaris_sparc/cpp2uno.cxx
+++ b/bridges/source/cpp_uno/gcc3_solaris_sparc/cpp2uno.cxx
@@ -4,9 +4,9 @@
*
* $RCSfile: cpp2uno.cxx,v $
*
- * $Revision: 1.4 $
+ * $Revision: 1.5 $
*
- * last change: $Author: obo $ $Date: 2006-01-16 13:23:31 $
+ * last change: $Author: rt $ $Date: 2006-05-02 12:06:16 $
*
* 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(