[Libreoffice-commits] core.git: include/sal
Noel Grandin
noel.grandin at collabora.co.uk
Tue May 30 07:08:32 UTC 2017
include/sal/types.h | 9 ++++++---
1 file changed, 6 insertions(+), 3 deletions(-)
New commits:
commit cd3d9ed0ad281dfcc2b71c393e1b124ae78c4dcc
Author: Noel Grandin <noel.grandin at collabora.co.uk>
Date: Tue May 30 09:06:51 2017 +0200
define SAL_RETURNS_NONNULL as LIBO_INTERNAL_ONLY
and improve the comment
Change-Id: I832fa0133810fee920024e7df9ff3c5c1c335582
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
More information about the Libreoffice-commits
mailing list