Skip to content

Commit

Permalink
fix: use _Static_assert instead of static_assert
Browse files Browse the repository at this point in the history
  • Loading branch information
amaanq committed Aug 16, 2023
1 parent ab1065f commit 2c93b82
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 @@ -125,7 +125,7 @@ bool tree_sitter_cpp_external_scanner_scan(void *payload, TSLexer *lexer,
unsigned tree_sitter_cpp_external_scanner_serialize(void *payload,
char *buffer) {
#if defined(__STDC_VERSION__) && __STDC_VERSION__ >= 201112L
static_assert(RAW_STRING_DELIMITER_MAX * sizeof(wchar_t) <
_Static_assert(RAW_STRING_DELIMITER_MAX * sizeof(wchar_t) <
TREE_SITTER_SERIALIZATION_BUFFER_SIZE,
"Serialized delimiter is too long!");
#else
Expand Down

1 comment on commit 2c93b82

@Rumi152
Copy link

@Rumi152 Rumi152 commented on 2c93b82 Jun 3, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is there some reason why was this change reverted? This allows cpp treesitter to work on my Windows 11, but unfortunately it isn't on master, so I need to do some workarounds

Please sign in to comment.