There is no need for this to be a macro. Making it a function allows stronger
type safety, safe to use with impure arguments, and reduces bracketing noise.
return 0;
}
- /* alphanumeric, '.', '-', or non-ascii; basically, chars used in unquoted ids */
-#define is_id_char(c) (isalnum(c) || ((c) == '.') || ((c) == '-') || !isascii(c))
+// alphanumeric, '.', '-', or non-ascii; basically, chars used in unquoted ids
+static bool is_id_char(char c) {
+ return isalnum(c) || c == '.' || c == '-' || !isascii(c);
+}
/* _agstrcanon:
* Canonicalize ordinary strings.