[Libreoffice-commits] core.git: bridges/source

Stephan Bergmann sbergman at redhat.com
Tue Apr 8 01:36:32 PDT 2014


 bridges/source/cpp_uno/gcc3_linux_x86-64/call.hxx    |   34 +++++++++++++++++++
 bridges/source/cpp_uno/gcc3_linux_x86-64/cpp2uno.cxx |    3 +
 bridges/source/cpp_uno/shared/cppinterfaceproxy.cxx  |    4 +-
 bridges/source/cpp_uno/shared/vtablefactory.cxx      |    8 ++--
 4 files changed, 42 insertions(+), 7 deletions(-)

New commits:
commit f598a018f153d005887bc994f93719e2da37c9cf
Author: Stephan Bergmann <sbergman at redhat.com>
Date:   Tue Apr 8 10:35:57 2014 +0200

    Clean up function declarations
    
    Change-Id: I5d3ed0a266f327dbc8d506090221c43ef89fbcc0

diff --git a/bridges/source/cpp_uno/gcc3_linux_x86-64/call.hxx b/bridges/source/cpp_uno/gcc3_linux_x86-64/call.hxx
new file mode 100644
index 0000000..3e5d316
--- /dev/null
+++ b/bridges/source/cpp_uno/gcc3_linux_x86-64/call.hxx
@@ -0,0 +1,34 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ * This file incorporates work covered by the following license notice:
+ *
+ *   Licensed to the Apache Software Foundation (ASF) under one or more
+ *   contributor license agreements. See the NOTICE file distributed
+ *   with this work for additional information regarding copyright
+ *   ownership. The ASF licenses this file to you under the Apache
+ *   License, Version 2.0 (the "License"); you may not use this file
+ *   except in compliance with the License. You may obtain a copy of
+ *   the License at http://www.apache.org/licenses/LICENSE-2.0 .
+ */
+
+#ifndef INCLUDED_BRIDGES_SOURCE_CPP_UNO_GCC3_LINUX_X86_64_CALL_HXX
+#define INCLUDED_BRIDGES_SOURCE_CPP_UNO_GCC3_LINUX_X86_64_CALL_HXX
+
+#include <sal/config.h>
+
+#include <sal/types.h>
+
+extern "C" typelib_TypeClass cpp_vtable_call(
+    sal_Int32 nFunctionIndex, sal_Int32 nVtableOffset,
+    void ** gpreg, void ** fpreg, void ** ovrflw,
+    sal_uInt64 * pRegisterReturn /* space for register return */ );
+
+#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
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 1756977..2373769 100644
--- a/bridges/source/cpp_uno/gcc3_linux_x86-64/cpp2uno.cxx
+++ b/bridges/source/cpp_uno/gcc3_linux_x86-64/cpp2uno.cxx
@@ -36,6 +36,7 @@
 #include "bridges/cpp_uno/shared/vtablefactory.hxx"
 
 #include "abi.hxx"
+#include "call.hxx"
 #include "share.hxx"
 
 using namespace ::osl;
@@ -252,7 +253,7 @@ static typelib_TypeClass cpp2uno_call(
 }
 
 
-extern "C" typelib_TypeClass cpp_vtable_call(
+typelib_TypeClass cpp_vtable_call(
     sal_Int32 nFunctionIndex, sal_Int32 nVtableOffset,
     void ** gpreg, void ** fpreg, void ** ovrflw,
     sal_uInt64 * pRegisterReturn /* space for register return */ )
diff --git a/bridges/source/cpp_uno/shared/cppinterfaceproxy.cxx b/bridges/source/cpp_uno/shared/cppinterfaceproxy.cxx
index e511627..4488e74 100644
--- a/bridges/source/cpp_uno/shared/cppinterfaceproxy.cxx
+++ b/bridges/source/cpp_uno/shared/cppinterfaceproxy.cxx
@@ -39,8 +39,8 @@
 static bridges::cpp_uno::shared::VtableFactory * pInstance;
 
 #if defined(__GNUG__) && !defined(__MINGW32__)
-void dso_init(void) __attribute__((constructor));
-void dso_exit(void) __attribute__((destructor));
+extern "C" void dso_init(void) __attribute__((constructor));
+extern "C" void dso_exit(void) __attribute__((destructor));
 #endif
 
 void dso_init(void) {
diff --git a/bridges/source/cpp_uno/shared/vtablefactory.cxx b/bridges/source/cpp_uno/shared/vtablefactory.cxx
index 43a5c81..f6e9e7c 100644
--- a/bridges/source/cpp_uno/shared/vtablefactory.cxx
+++ b/bridges/source/cpp_uno/shared/vtablefactory.cxx
@@ -35,6 +35,7 @@
 #include "sal/types.h"
 #include "typelib/typedescription.hxx"
 
+#include <boost/noncopyable.hpp>
 #include <boost/unordered_map.hpp>
 #include <new>
 #include <vector>
@@ -120,7 +121,9 @@ extern "C" void SAL_CALL freeExec(
 
 }
 
-class VtableFactory::GuardedBlocks: public std::vector< Block > {
+class VtableFactory::GuardedBlocks:
+    public std::vector<Block>, private boost::noncopyable
+{
 public:
     GuardedBlocks(VtableFactory const & factory):
         m_factory(factory), m_guarded(true) {}
@@ -130,9 +133,6 @@ public:
     void unguard() { m_guarded = false; }
 
 private:
-    GuardedBlocks(GuardedBlocks &); // not implemented
-    void operator =(GuardedBlocks); // not implemented
-
     VtableFactory const & m_factory;
     bool m_guarded;
 };


More information about the Libreoffice-commits mailing list