Skip to content

Commit

Permalink
Flag function as const
Browse files Browse the repository at this point in the history
  • Loading branch information
smoeding committed Apr 28, 2024
1 parent e88842c commit a8c3e8c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/scanner.c
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ typedef struct ScannerState {
* name ('a'..'z', '0'..'9', '_').
*/

static inline bool is_variable_name(int32_t c) {
__attribute__((const)) static inline bool is_variable_name(int32_t c) {
return ((isalpha(c) && islower(c)) || isdigit(c) || (c == U'_'));
}

Expand Down

0 comments on commit a8c3e8c

Please sign in to comment.