1
0
mirror of https://github.com/rkd77/elinks.git synced 2024-12-04 14:46:47 -05:00

[util] const in scan_table_data

This commit is contained in:
Witold Filipczyk 2022-02-04 18:36:19 +01:00
parent fb007a41a9
commit 30dcb4d881
2 changed files with 3 additions and 3 deletions

View File

@ -144,7 +144,7 @@ init_scanner_info(struct scanner_info *scanner_info)
scan_table[index] |= info[i].bits;
} else {
char *string = info[i].data.string.source;
const char *string = info[i].data.string.source;
int pos = info[i].data.string.length - 1;
assert(info[i].type == SCAN_STRING && pos >= 0);

View File

@ -42,8 +42,8 @@ struct scanner_token {
enum scan_type { SCAN_RANGE, SCAN_STRING, SCAN_END };
union scan_table_data {
struct { char *source; long length; } string;
struct { unsigned char *start; long end; } range;
struct { const char *source; long length; } string;
struct { const unsigned char *start; long end; } range;
};
struct scan_table_info {