diff options
author | Stephan Bergmann <sbergman@redhat.com> | 2021-04-29 10:44:09 +0200 |
---|---|---|
committer | Stephan Bergmann <sbergman@redhat.com> | 2021-04-30 09:19:14 +0200 |
commit | ce5702d3c27e2a9de253ee29e02c7f494ba2a2b8 (patch) | |
tree | 285dcd7d65f96b5dfc2c3295a0b05081a5a27d6f /include/sal | |
parent | b5586bd42a35d294e014d665bc47c49ae4dfbde5 (diff) |
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@redhat.com>
Diffstat (limited to 'include/sal')
-rw-r--r-- | include/sal/types.h | 22 |
1 files changed, 9 insertions, 13 deletions
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 |