diff options
author | Noel Grandin <noel.grandin@collabora.co.uk> | 2017-05-30 09:06:51 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2017-05-30 09:07:49 +0200 |
commit | cd3d9ed0ad281dfcc2b71c393e1b124ae78c4dcc (patch) | |
tree | f9cebfde9ca09e1bf6b56fe7425716b294e54bae /include/sal | |
parent | a909257abdc869a8d56a79f29b2de12725b74e68 (diff) |
define SAL_RETURNS_NONNULL as LIBO_INTERNAL_ONLY
and improve the comment
Change-Id: I832fa0133810fee920024e7df9ff3c5c1c335582
Diffstat (limited to 'include/sal')
-rw-r--r-- | include/sal/types.h | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/include/sal/types.h b/include/sal/types.h index b6d6730e88a5..053e53d87b8d 100644 --- a/include/sal/types.h +++ b/include/sal/types.h @@ -687,9 +687,9 @@ inline char16_t const * SAL_U(wchar_t const * p) /// @endcond #endif - -/** Indicate where function/methods that return a pointer always - return a non-nullptr value. +/// @cond INTERNAL +/** Annotate pointer-returning functions to indicate that such a pointer + is never nullptr. Note that MSVC supports this feature via it's SAL _Ret_notnull_ annotation, but since it's in a completely different place on @@ -697,11 +697,14 @@ inline char16_t const * SAL_U(wchar_t const * p) @since LibreOffice 5.5 */ +#if defined LIBO_INTERNAL_ONLY #if (defined __GNUC__ && __GNUC__ > 4) || defined __clang__ #define SAL_RETURNS_NONNULL __attribute__((returns_nonnull)) #else #define SAL_RETURNS_NONNULL #endif +#endif +/// @endcond #endif // INCLUDED_SAL_TYPES_H |