summaryrefslogtreecommitdiff
path: root/bridges
diff options
context:
space:
mode:
authorRüdiger Timm <rt@openoffice.org>2006-05-02 11:03:36 +0000
committerRüdiger Timm <rt@openoffice.org>2006-05-02 11:03:36 +0000
commit5687b94e85f1466ee68a4ace82ffb16dc16771cc (patch)
treea9253b8cee2098e6a0ac01efed0f35195dccf06f /bridges
parent16e0b8d0848331f11729a67fc0c171537a2adc64 (diff)
INTEGRATION: CWS mhu12 (1.4.8); FILE MERGED
2006/04/19 12:55:31 sb 1.4.8.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_x86-64/cpp2uno.cxx26
1 files changed, 15 insertions, 11 deletions
diff --git a/bridges/source/cpp_uno/gcc3_linux_x86-64/cpp2uno.cxx b/bridges/source/cpp_uno/gcc3_linux_x86-64/cpp2uno.cxx
index 8f0cabc4dd3f..16a304db89c0 100644
--- a/bridges/source/cpp_uno/gcc3_linux_x86-64/cpp2uno.cxx
+++ b/bridges/source/cpp_uno/gcc3_linux_x86-64/cpp2uno.cxx
@@ -4,9 +4,9 @@
*
* $RCSfile: cpp2uno.cxx,v $
*
- * $Revision: 1.4 $
+ * $Revision: 1.5 $
*
- * last change: $Author: rt $ $Date: 2006-03-08 08:50:13 $
+ * last change: $Author: rt $ $Date: 2006-05-02 12:03:36 $
*
* The Contents of this file are made available subject to
* the terms of GNU Lesser General Public License Version 2.1.
@@ -462,22 +462,26 @@ unsigned char * codeSnippet( unsigned char * code,
}
//==================================================================================================
-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 ];
+ return ( slotCount + 2 ) * sizeof( void * ) + slotCount * codeSnippetSize;
+}
- *slots = mapBlockToVtable( block );
- (*slots)[-2] = 0;
- (*slots)[-1] = 0;
+//==================================================================================================
+void ** bridges::cpp_uno::shared::VtableFactory::initializeBlock( void * block )
+{
+ void ** slots = mapBlockToVtable( block );
+ slots[-2] = 0;
+ slots[-1] = 0;
- return block;
+ return slots;
}
//==================================================================================================