summaryrefslogtreecommitdiffstats
path: root/include/zix/environment.h
diff options
context:
space:
mode:
authorDavid Robillard <d@drobilla.net>2024-12-11 01:01:58 -0500
committerDavid Robillard <d@drobilla.net>2024-12-11 01:01:58 -0500
commit158e199d0dbc54fe497a53b167c880a8c85a9017 (patch)
treebee7f1aba5c59b4c0ba5a13e68ad8ba9bd7d51c0 /include/zix/environment.h
parent333e0e57888b85df95e319a41a07ee5381b2b117 (diff)
downloadzix-158e199d0dbc54fe497a53b167c880a8c85a9017.tar.gz
zix-158e199d0dbc54fe497a53b167c880a8c85a9017.tar.bz2
zix-158e199d0dbc54fe497a53b167c880a8c85a9017.zip
Consistently use malloc attribute for string-returning functions
These function return newly allocated strings, which can't contain pointers to any other object, so the GCC "malloc" attribute applies.
Diffstat (limited to 'include/zix/environment.h')
-rw-r--r--include/zix/environment.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/include/zix/environment.h b/include/zix/environment.h
index fbbcd0d..095d421 100644
--- a/include/zix/environment.h
+++ b/include/zix/environment.h
@@ -26,7 +26,7 @@ ZIX_BEGIN_DECLS
@param string Input string to expand.
@return A newly allocated copy of `string` with variables expanded, or null.
*/
-ZIX_API char* ZIX_ALLOCATED
+ZIX_MALLOC_API char* ZIX_ALLOCATED
zix_expand_environment_strings(ZixAllocator* ZIX_NULLABLE allocator,
const char* ZIX_NONNULL string);