From fa566ecd90a09926967275d54cd43222a01595a1 Mon Sep 17 00:00:00 2001 From: Thomas Voss Date: Sun, 10 Mar 2024 18:45:38 +0100 Subject: Make progname() [[gnu::always_inline]] instead of a macro --- include/errors.h | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'include') 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 */ -- cgit v1.2.3