Skip to content

Commit 7b284d4

Browse files
eregonbyroot
authored andcommitted
ALWAYS_INLINE for json_match_keyword()
1 parent 65904e8 commit 7b284d4

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

ext/json/ext/parser/parser.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1454,7 +1454,7 @@ static inline void json_value_completed(json_frame *frame)
14541454
frame->phase = (enum json_frame_phase) frame->type;
14551455
}
14561456

1457-
static inline bool json_match_keyword(JSON_ParserState *state, const char *keyword, size_t offset)
1457+
ALWAYS_INLINE(static) bool json_match_keyword(JSON_ParserState *state, const char *keyword, size_t offset)
14581458
{
14591459
// It is assumed that since `keyword` is always a literal, the compiler is able to constantize this
14601460
// `strlen` and several other computations in that routine, such as eliminating the `if (resumable)` branch.

0 commit comments

Comments
 (0)