diff options
author | Roman Stratiienko <r.stratiienko@gmail.com> | 2023-08-10 16:14:02 +0300 |
---|---|---|
committer | Marge Bot <emma+marge@anholt.net> | 2023-08-12 18:46:57 +0000 |
commit | 21dcde096f351f83a2df7aa9f42a7276b5454c81 (patch) | |
tree | 42fc579c5b27e3c2c36cd298b0febdfc7771b65f /meson.build | |
parent | 9bf104f9348d5e7a04268399a5d68523e886d487 (diff) | |
download | mesa-21dcde096f351f83a2df7aa9f42a7276b5454c81.tar.gz mesa-21dcde096f351f83a2df7aa9f42a7276b5454c81.tar.bz2 mesa-21dcde096f351f83a2df7aa9f42a7276b5454c81.zip |
util: Add NONNULL macro
Macro leverages __attribute__((__nonnull__)) to help users mark
the function parameter that isn't allowed to be NULL.
Suggested-by: Eric Engestrom <eric@igalia.com>
Signed-off-by: Roman Stratiienko <r.stratiienko@gmail.com>
Reviewed-by: Eric Engestrom <eric@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18215>
Diffstat (limited to 'meson.build')
-rw-r--r-- | meson.build | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/meson.build b/meson.build index 83f4e9cf66d..3fac5d2eb58 100644 --- a/meson.build +++ b/meson.build @@ -916,6 +916,7 @@ endforeach _attributes = [ 'const', 'flatten', 'malloc', 'pure', 'unused', 'warn_unused_result', 'weak', 'format', 'packed', 'returns_nonnull', 'alias', 'noreturn', + 'nonnull', ] foreach a : cc.get_supported_function_attributes(_attributes) pre_args += '-DHAVE_FUNC_ATTRIBUTE_@0@'.format(a.to_upper()) |