mirror of
https://github.com/ultrajson/ultrajson.git
synced 2024-11-23 12:32:02 +01:00
Indentation fixes and other style fixes
This commit is contained in:
parent
42044fef11
commit
6a0d07a7df
@ -297,8 +297,6 @@ JSONObjectEncoder.free or free() as specified when calling this function.
|
||||
*/
|
||||
EXPORTFUNCTION char *JSON_EncodeObject(JSOBJ obj, JSONObjectEncoder *enc, char *buffer, size_t cbBuffer);
|
||||
|
||||
|
||||
|
||||
typedef struct __JSONObjectDecoder
|
||||
{
|
||||
JSOBJ (*newString)(void *prv, wchar_t *start, wchar_t *end);
|
||||
|
@ -496,6 +496,7 @@ FASTCALL_ATTR JSOBJ FASTCALL_MSVC decode_string ( struct DecoderState *ds)
|
||||
return SetError (ds, -1, "Invalid UTF-8 sequence length when decoding 'string'");
|
||||
}
|
||||
case DS_ISESCAPE:
|
||||
{
|
||||
inputOffset ++;
|
||||
switch (*inputOffset)
|
||||
{
|
||||
@ -588,6 +589,7 @@ FASTCALL_ATTR JSOBJ FASTCALL_MSVC decode_string ( struct DecoderState *ds)
|
||||
default: return SetError(ds, -1, "Unrecognized escape sequence when decoding 'string'");
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
||||
case 1:
|
||||
{
|
||||
@ -743,7 +745,8 @@ FASTCALL_ATTR JSOBJ FASTCALL_MSVC decode_object( struct DecoderState *ds)
|
||||
JSOBJ newObj;
|
||||
|
||||
ds->objDepth++;
|
||||
if (ds->objDepth > JSON_MAX_OBJECT_DEPTH) {
|
||||
if (ds->objDepth > JSON_MAX_OBJECT_DEPTH)
|
||||
{
|
||||
return SetError(ds, -1, "Reached object decoding depth limit");
|
||||
}
|
||||
|
||||
|
@ -654,7 +654,6 @@ int Buffer_AppendDoubleUnchecked(JSOBJ obj, JSONObjectEncoder *enc, double value
|
||||
/* 1.5 -> 2, but 2.5 -> 2 */
|
||||
++whole;
|
||||
}
|
||||
|
||||
//vvvvvvvvvvvvvvvvvvv Diff from modp_dto2
|
||||
}
|
||||
else
|
||||
@ -883,7 +882,6 @@ void encode(JSOBJ obj, JSONObjectEncoder *enc, const char *name, size_t cbName)
|
||||
break;
|
||||
}
|
||||
|
||||
|
||||
case JT_NULL:
|
||||
{
|
||||
Buffer_AppendCharUnchecked (enc, 'n');
|
||||
|
Loading…
Reference in New Issue
Block a user