diff options
-rw-r--r-- | .clang-format | 1 | ||||
-rw-r--r-- | NEWS | 5 | ||||
-rw-r--r-- | doc/Doxyfile.in | 1 | ||||
-rw-r--r-- | include/zix/attributes.h | 2 | ||||
-rw-r--r-- | meson.build | 4 |
5 files changed, 9 insertions, 4 deletions
diff --git a/.clang-format b/.clang-format index 87070fc..6245b22 100644 --- a/.clang-format +++ b/.clang-format @@ -28,6 +28,7 @@ StatementMacros: - ZIX_END_DECLS - ZIX_MALLOC_API - ZIX_MALLOC_FUNC + - ZIX_NODISCARD - ZIX_PURE_API - ZIX_PURE_FUNC - ZIX_PURE_WIN_API @@ -1,11 +1,12 @@ -zix (0.4.3) unstable; urgency=medium +zix (0.5.0) unstable; urgency=medium + * Add ZIX_NODISCARD attribute * Avoid fdatasync() on Darwin * Fix library current_version on MacOS * Fix nullability annotations for zix_canonical_path() and friends * Fix ring unit test when mlock() is unavailable - -- David Robillard <d@drobilla.net> Thu, 14 Mar 2024 17:42:49 +0000 + -- David Robillard <d@drobilla.net> Sat, 22 Jun 2024 23:21:21 +0000 zix (0.4.2) stable; urgency=medium diff --git a/doc/Doxyfile.in b/doc/Doxyfile.in index cce012f..741fe1a 100644 --- a/doc/Doxyfile.in +++ b/doc/Doxyfile.in @@ -37,6 +37,7 @@ PREDEFINED = ZIX_ALLOCATED= \ ZIX_END_DECLS= \ ZIX_MALLOC_API= \ ZIX_MALLOC_FUNC= \ + ZIX_NODISCARD= \ ZIX_NONNULL= \ ZIX_NULLABLE= \ ZIX_PURE_API= \ diff --git a/include/zix/attributes.h b/include/zix/attributes.h index eddb80e..a0ed276 100644 --- a/include/zix/attributes.h +++ b/include/zix/attributes.h @@ -38,11 +38,13 @@ # define ZIX_PURE_FUNC __attribute__((pure)) # define ZIX_CONST_FUNC __attribute__((const)) # define ZIX_MALLOC_FUNC __attribute__((malloc)) +# define ZIX_NODISCARD __attribute__((warn_unused_result)) #else # define ZIX_ALWAYS_INLINE_FUNC ///< Should absolutely always be inlined # define ZIX_PURE_FUNC ///< Only reads memory # define ZIX_CONST_FUNC ///< Only reads its parameters # define ZIX_MALLOC_FUNC ///< Allocates memory with no pointers in it +# define ZIX_NODISCARD ///< Returns a value that must be used #endif /// A pure function in the public API that only reads memory diff --git a/meson.build b/meson.build index 3a99f85..f84642b 100644 --- a/meson.build +++ b/meson.build @@ -12,7 +12,7 @@ project( ], license: 'ISC', meson_version: '>= 0.56.0', - version: '0.4.3', + version: '0.5.0', ) zix_src_root = meson.current_source_dir() @@ -410,7 +410,7 @@ libzix = library( versioned_name, sources, c_args: c_suppressions + library_c_args, - darwin_versions: ['0.4.0', meson.project_version()], + darwin_versions: ['0.5.0', meson.project_version()], dependencies: dependencies, gnu_symbol_visibility: 'hidden', include_directories: include_dirs, |