summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ext/json/generator/generator.c20
-rw-r--r--ext/json/parser/parser.c14
-rw-r--r--ext/json/parser/parser.rl14
3 files changed, 24 insertions, 24 deletions
diff --git a/ext/json/generator/generator.c b/ext/json/generator/generator.c
index 8917cce57e7..c72ab61b762 100644
--- a/ext/json/generator/generator.c
+++ b/ext/json/generator/generator.c
@@ -62,7 +62,7 @@ static const char trailingBytesForUTF8[256] = {
* in a UTF-8 sequence.
*/
static const UTF32 offsetsFromUTF8[6] = { 0x00000000UL, 0x00003080UL, 0x000E2080UL,
- 0x03C82080UL, 0xFA082080UL, 0x82082080UL };
+ 0x03C82080UL, 0xFA082080UL, 0x82082080UL };
/*
* Utility routine to tell whether a sequence of bytes is legal UTF-8.
@@ -358,23 +358,23 @@ static void fbuffer_append_char(FBuffer *fb, char newchr)
static void freverse(char *start, char *end)
{
- char c;
+ char c;
- while (end > start) {
- c = *end, *end-- = *start, *start++ = c;
+ while (end > start) {
+ c = *end, *end-- = *start, *start++ = c;
}
}
static long fltoa(long number, char *buf)
{
- static char digits[] = "0123456789";
- long sign = number;
- char* tmp = buf;
+ static char digits[] = "0123456789";
+ long sign = number;
+ char* tmp = buf;
- if (sign < 0) number = -number;
+ if (sign < 0) number = -number;
do *tmp++ = digits[number % 10]; while (number /= 10);
- if (sign < 0) *tmp++ = '-';
- freverse(buf, tmp - 1);
+ if (sign < 0) *tmp++ = '-';
+ freverse(buf, tmp - 1);
return tmp - buf;
}
diff --git a/ext/json/parser/parser.c b/ext/json/parser/parser.c
index 74068971abc..1e168eebb7f 100644
--- a/ext/json/parser/parser.c
+++ b/ext/json/parser/parser.c
@@ -1404,13 +1404,13 @@ tr2:
{
*result = json_string_unescape(*result, json->memo + 1, p);
if (NIL_P(*result)) {
- p--;
- {p++; cs = 8; goto _out;}
- } else {
- FORCE_UTF8(*result);
- {p = (( p + 1))-1;}
- }
- }
+ p--;
+ {p++; cs = 8; goto _out;}
+ } else {
+ FORCE_UTF8(*result);
+ {p = (( p + 1))-1;}
+ }
+ }
#line 468 "parser.rl"
{ p--; {p++; cs = 8; goto _out;} }
goto st8;
diff --git a/ext/json/parser/parser.rl b/ext/json/parser/parser.rl
index 75889403c6a..9531e3a9661 100644
--- a/ext/json/parser/parser.rl
+++ b/ext/json/parser/parser.rl
@@ -457,13 +457,13 @@ static VALUE json_string_unescape(VALUE result, char *string, char *stringEnd)
action parse_string {
*result = json_string_unescape(*result, json->memo + 1, p);
if (NIL_P(*result)) {
- fhold;
- fbreak;
- } else {
- FORCE_UTF8(*result);
- fexec p + 1;
- }
- }
+ fhold;
+ fbreak;
+ } else {
+ FORCE_UTF8(*result);
+ fexec p + 1;
+ }
+ }
action exit { fhold; fbreak; }