[Libreoffice-commits] core.git: include/sal
Stephan Bergmann (via logerrit)
logerrit at kemper.freedesktop.org
Fri Apr 30 07:19:53 UTC 2021
include/sal/types.h | 22 +++++++++-------------
1 file changed, 9 insertions(+), 13 deletions(-)
New commits:
commit ce5702d3c27e2a9de253ee29e02c7f494ba2a2b8
Author: Stephan Bergmann <sbergman at redhat.com>
AuthorDate: Thu Apr 29 10:44:09 2021 +0200
Commit: Stephan Bergmann <sbergman at redhat.com>
CommitDate: Fri Apr 30 09:19:14 2021 +0200
Reshuffle code a bit
Group the various SAL_THROW_EXTERN_C macro definitions more closely together,
and the C++ SAL_THROW_EXTERN_C and COVERITY_NOEXCEPT_FLASE macro definitions do
not need to be inside an extern "C" block.
Change-Id: I8c56f5c2efd287934cc75b20e79c27769e887e24
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/114845
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <sbergman at redhat.com>
diff --git a/include/sal/types.h b/include/sal/types.h
index 4f6f1ba0e817..7733920f20be 100644
--- a/include/sal/types.h
+++ b/include/sal/types.h
@@ -319,13 +319,21 @@ typedef struct _sal_Sequence
#pragma pack(pop)
#endif
-#if defined __cplusplus
+#ifdef __cplusplus
+}
+#endif /* __cplusplus */
/** Nothrow specification for C functions.
This is a macro so it can expand to nothing in C code.
*/
+#if defined __cplusplus
#define SAL_THROW_EXTERN_C() throw ()
+#else
+#define SAL_THROW_EXTERN_C()
+#endif
+
+#ifdef __cplusplus
/** To markup destructors that coverity warns might throw exceptions
which won't throw in practice, or where std::terminate is
@@ -337,18 +345,6 @@ typedef struct _sal_Sequence
# define COVERITY_NOEXCEPT_FALSE
#endif
-#else
-
-#define SAL_THROW_EXTERN_C()
-
-#endif
-
-#ifdef __cplusplus
-}
-#endif /* __cplusplus */
-
-#ifdef __cplusplus
-
enum __sal_NoAcquire
{
/** definition of a no acquire enum for ctors
More information about the Libreoffice-commits
mailing list