diff options
author | Thomas Voss <mail@thomasvoss.com> | 2024-03-10 18:45:38 +0100 |
---|---|---|
committer | Thomas Voss <mail@thomasvoss.com> | 2024-03-10 18:45:38 +0100 |
commit | fa566ecd90a09926967275d54cd43222a01595a1 (patch) | |
tree | 2db64c9f79d8d8330ac36beda2629216312ef362 | |
parent | 12076aa0007a686e76ad1e746aaeca9ee05732e6 (diff) |
Make progname() [[gnu::always_inline]] instead of a macro
-rw-r--r-- | include/errors.h | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/include/errors.h b/include/errors.h index 00fe6dc..975fac4 100644 --- a/include/errors.h +++ b/include/errors.h @@ -17,6 +17,11 @@ void vwarnx(const char *, va_list); extern const char *__mlib_errors_progname; -#define progname() (__mlib_errors_progname) +[[gnu::always_inline]] +static inline const char * +progname(void) +{ + return __mlib_errors_progname; +} #endif /* !MLIB_ERRORS_H */ |