@@ -586,7 +586,8 @@ static inline unsigned char search_ascii_only_escape(search_state *search, const
586
586
return 0 ;
587
587
}
588
588
589
- static inline void full_escape_UTF8_char (search_state * search , unsigned char ch_len ) {
589
+ static inline void full_escape_UTF8_char (search_state * search , unsigned char ch_len )
590
+ {
590
591
const unsigned char ch = (unsigned char )* search -> ptr ;
591
592
switch (ch_len ) {
592
593
case 1 : {
@@ -616,7 +617,7 @@ static inline void full_escape_UTF8_char(search_state *search, unsigned char ch_
616
617
617
618
uint32_t wchar = 0 ;
618
619
619
- switch (ch_len ) {
620
+ switch (ch_len ) {
620
621
case 2 :
621
622
wchar = ch & 0x1F ;
622
623
break ;
@@ -776,7 +777,8 @@ static VALUE mHash_to_json(int argc, VALUE *argv, VALUE self)
776
777
* _state_ is a JSON::State object, that can also be used to configure the
777
778
* produced JSON string output further.
778
779
*/
779
- static VALUE mArray_to_json (int argc , VALUE * argv , VALUE self ) {
780
+ static VALUE mArray_to_json (int argc , VALUE * argv , VALUE self )
781
+ {
780
782
rb_check_arity (argc , 0 , 1 );
781
783
VALUE Vstate = cState_from_state_s (cState , argc == 1 ? argv [0 ] : Qnil );
782
784
return cState_partial_generate (Vstate , self , generate_json_array , Qfalse );
@@ -838,7 +840,8 @@ static VALUE mFloat_to_json(int argc, VALUE *argv, VALUE self)
838
840
*
839
841
* Extends _modul_ with the String::Extend module.
840
842
*/
841
- static VALUE mString_included_s (VALUE self , VALUE modul ) {
843
+ static VALUE mString_included_s (VALUE self , VALUE modul )
844
+ {
842
845
VALUE result = rb_funcall (modul , i_extend , 1 , mString_Extend );
843
846
rb_call_super (1 , & modul );
844
847
return result ;
@@ -1083,7 +1086,7 @@ json_object_i(VALUE key, VALUE val, VALUE _arg)
1083
1086
}
1084
1087
1085
1088
VALUE key_to_s ;
1086
- switch (rb_type (key )) {
1089
+ switch (rb_type (key )) {
1087
1090
case T_STRING :
1088
1091
if (RB_LIKELY (RBASIC_CLASS (key ) == rb_cString )) {
1089
1092
key_to_s = key ;
@@ -1167,7 +1170,7 @@ static void generate_json_array(FBuffer *buffer, struct generate_json_data *data
1167
1170
1168
1171
fbuffer_append_char (buffer , '[' );
1169
1172
if (RB_UNLIKELY (data -> state -> array_nl )) fbuffer_append_str (buffer , data -> state -> array_nl );
1170
- for (i = 0 ; i < RARRAY_LEN (obj ); i ++ ) {
1173
+ for (i = 0 ; i < RARRAY_LEN (obj ); i ++ ) {
1171
1174
if (i > 0 ) {
1172
1175
fbuffer_append_char (buffer , ',' );
1173
1176
if (RB_UNLIKELY (data -> state -> array_nl )) fbuffer_append_str (buffer , data -> state -> array_nl );
@@ -1252,7 +1255,7 @@ static void generate_json_string(FBuffer *buffer, struct generate_json_data *dat
1252
1255
search .chunk_base = NULL ;
1253
1256
#endif /* HAVE_SIMD */
1254
1257
1255
- switch (rb_enc_str_coderange (obj )) {
1258
+ switch (rb_enc_str_coderange (obj )) {
1256
1259
case ENC_CODERANGE_7BIT :
1257
1260
case ENC_CODERANGE_VALID :
1258
1261
if (RB_UNLIKELY (data -> state -> ascii_only )) {
@@ -2116,7 +2119,7 @@ void Init_generator(void)
2116
2119
rb_require ("json/ext/generator/state" );
2117
2120
2118
2121
2119
- switch (find_simd_implementation ()) {
2122
+ switch (find_simd_implementation ()) {
2120
2123
#ifdef HAVE_SIMD
2121
2124
#ifdef HAVE_SIMD_NEON
2122
2125
case SIMD_NEON :
0 commit comments