https://bugs.documentfoundation.org/show_bug.cgi?id=91831
Bug ID: 91831
Summary: sharing gcc / UNO bridges code ...
Product: LibreOffice
Version: unspecified
Hardware: Other
OS: All
Status: UNCONFIRMED
Severity: normal
Priority: medium
Component: sdk
Assignee: [email protected]
Reporter: [email protected]
If you poke into bridges/ you can see that a ton of the gcc bridge code is
horribly cut/paste.
We should hack the bridges/Library_cpp_uno.mk to link in a set of gcc_shared/
code - that isolates this into one place. This should then help eg. implement
RTTI for Linux so that dynamic_cast<> works properly for bridged objects.
$ cd bridges
$ git grep initializeBlock
for example. At least these two guys should be shared.
sal_Size bridges::cpp_uno::shared::VtableFactory::getBlockSize(
sal_Int32 slotCount)
{
return (slotCount + 2) * sizeof (Slot) + slotCount * codeSnippetSize;
}
bridges::cpp_uno::shared::VtableFactory::Slot *
bridges::cpp_uno::shared::VtableFactory::initializeBlock(
void * block, sal_Int32 slotCount, sal_Int32,
typelib_InterfaceTypeDescription *)
{
Slot * slots = mapBlockToVtable(block);
slots[-2].fn = 0;
slots[-1].fn = 0;
return slots + slotCount;
}
I'd start by sharing only these two - and of course carefully checking that
they are in fact copy/paste identical across all of the gcc backend/bridges =)
Thanks !
--
You are receiving this mail because:
You are the assignee for the bug.
_______________________________________________
Libreoffice-bugs mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/libreoffice-bugs