Skip to content

Commit

Permalink
Constify mp_char2escape
Browse files Browse the repository at this point in the history
It's an internal table. It must not be modified by library users.
  • Loading branch information
locker authored and kyukhin committed Feb 2, 2023
1 parent e05a538 commit 28a7421
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion hints.c
Original file line number Diff line number Diff line change
Expand Up @@ -650,7 +650,7 @@ const int8_t mp_parser_hint[256] = {
/* }}} */
};

const char *mp_char2escape[128] = {
const char *const mp_char2escape[128] = {
"\\u0000", "\\u0001", "\\u0002", "\\u0003",
"\\u0004", "\\u0005", "\\u0006", "\\u0007",
"\\b", "\\t", "\\n", "\\u000b",
Expand Down
2 changes: 1 addition & 1 deletion msgpuck.h
Original file line number Diff line number Diff line change
Expand Up @@ -1499,7 +1499,7 @@ mp_frame_advance(struct mp_frame *frame);
/** \cond false */
extern const enum mp_type mp_type_hint[];
extern const int8_t mp_parser_hint[];
extern const char *mp_char2escape[];
extern const char *const mp_char2escape[];
extern const uint8_t mp_ext_hint[];

MP_IMPL MP_ALWAYSINLINE enum mp_type
Expand Down

0 comments on commit 28a7421

Please sign in to comment.