File tree Expand file tree Collapse file tree 1 file changed +15
-0
lines changed Expand file tree Collapse file tree 1 file changed +15
-0
lines changed Original file line number Diff line number Diff line change @@ -591,6 +591,21 @@ json_eat_comments(JSON_ParserState *state)
591591static inline void
592592json_eat_whitespace (JSON_ParserState * state )
593593{
594+ #if defined(__BYTE_ORDER__ ) && __BYTE_ORDER__ == __ORDER_LITTLE_ENDIAN__
595+ if (RB_UNLIKELY (state -> cursor < state -> end && * state -> cursor == '\n' )) {
596+ state -> cursor ++ ;
597+
598+ while (state -> cursor + sizeof (uint64_t ) <= state -> end ) {
599+ uint64_t chunk ;
600+ memcpy (& chunk , state -> cursor , sizeof (uint64_t ));
601+ if (chunk != 0x2020202020202020 ) {
602+ break ;
603+ }
604+ state -> cursor += sizeof (uint64_t );
605+ }
606+ }
607+ #endif
608+
594609 while (state -> cursor < state -> end && RB_UNLIKELY (whitespace [(unsigned char )* state -> cursor ])) {
595610 if (RB_LIKELY (* state -> cursor != '/' )) {
596611 state -> cursor ++ ;
You can’t perform that action at this time.
0 commit comments