Re: Interest in Converting Macros to Inline Functions

2022-11-14 Thread Koichi Murase
2022年11月15日(火) 8:46 Brent Pappas : > I noticed that Bash code sometimes uses macros where a static inline function > would appear to work equally as well. > For instance, consider the macro ALL_ELEMENT_SUB defined in array.h: The inline keyword is introduced in C99, but Bash is written in C89, an

Interest in Converting Macros to Inline Functions

2022-11-14 Thread Brent Pappas
Hi, I noticed that Bash code sometimes uses macros where a static inline function would appear to work equally as well. For instance, consider the macro ALL_ELEMENT_SUB defined in array.h: #define ALL_ELEMENT_SUB(c) ((c) == '@' || (c) == '*') I imagine this could be turned into a function l